pub unsafe fn cl_create_program_with_binary(
context: cl_context,
device: cl_device_id,
binary: &[u8],
) -> Output<cl_program>
Expand description
Low level helper function for calling the OpenCL FFI function clCreateProgramWithBinary.
§Safety
If the context or device is in an invalid state this function will cause undefined behavior. WRT the clippy::cast_ptr_alignment below the dereferncing of the pointer happens on the other side of the C FFI. So it cannot be any more unsafe that in already is…