[][src]Function open_cl_low_level::program::cl_create_program_with_binary

pub unsafe fn cl_create_program_with_binary(
    context: cl_context,
    device: cl_device_id,
    binary: &[u8]
) -> Output<cl_program>

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...