clSetKernelExecInfo: None,
clGetKernelSubGroupInfoKHR: None,
clCloneKernel: Some(cl_clone_kernel),
- clCreateProgramWithIL: None,
+ clCreateProgramWithIL: Some(cl_create_program_with_il),
clEnqueueSVMMigrateMem: None,
clGetDeviceAndHostTimer: None,
clGetHostTimer: None,
clGetKernelSubGroupInfo: None,
clSetDefaultDeviceCommandQueue: None,
clSetProgramReleaseCallback: None,
- clSetProgramSpecializationConstant: None,
+ clSetProgramSpecializationConstant: Some(cl_set_program_specialization_constant),
clCreateBufferWithProperties: None,
clCreateImageWithProperties: None,
clSetContextDestructorCallback: Some(cl_set_context_destructor_callback),
match_obj!(clone_kernel(source_kernel), errcode_ret)
}
+extern "C" fn cl_create_program_with_il(
+ context: cl_context,
+ il: *const ::std::os::raw::c_void,
+ length: usize,
+ errcode_ret: *mut cl_int,
+) -> cl_program {
+ match_obj!(create_program_with_il(context, il, length), errcode_ret)
+}
+
+extern "C" fn cl_set_program_specialization_constant(
+ program: cl_program,
+ spec_id: cl_uint,
+ spec_size: usize,
+ spec_value: *const ::std::os::raw::c_void,
+) -> cl_int {
+ match_err!(set_program_specialization_constant(
+ program, spec_id, spec_size, spec_value
+ ))
+}
+
extern "C" fn cl_set_context_destructor_callback(
context: cl_context,
pfn_notify: ::std::option::Option<DeleteContextCB>,
.collect(),
)
}
+ CL_PROGRAM_IL => Vec::new(),
CL_PROGRAM_KERNEL_NAMES => cl_prop::<String>(prog.kernels().join(";")),
CL_PROGRAM_NUM_DEVICES => cl_prop::<cl_uint>(prog.devs.len() as cl_uint),
CL_PROGRAM_NUM_KERNELS => cl_prop::<usize>(prog.kernels().len()),
//• CL_INVALID_BINARY if an invalid program binary was encountered for any device. binary_status will return specific status for each device.
}
+pub fn create_program_with_il(
+ context: cl_context,
+ _il: *const ::std::os::raw::c_void,
+ _length: usize,
+) -> CLResult<cl_program> {
+ let _c = context.get_ref()?;
+
+ println!("create_program_with_il not implemented");
+ Err(CL_INVALID_OPERATION)
+ //• CL_INVALID_CONTEXT if context is not a valid context.
+ //• CL_INVALID_OPERATION if no devices in context support intermediate language programs.
+ //• CL_INVALID_VALUE if il is NULL or if length is zero.
+ //• CL_INVALID_VALUE if the length-byte memory pointed to by il does not contain well-formed intermediate language input that can be consumed by the OpenCL runtime.
+}
+
pub fn build_program(
program: cl_program,
num_devices: cl_uint,
//• CL_INVALID_LINKER_OPTIONS if the linker options specified by options are invalid.
//• CL_INVALID_OPERATION if the rules for devices containing compiled binaries or libraries as described in input_programs argument above are not followed.
}
+
+pub fn set_program_specialization_constant(
+ _program: cl_program,
+ _spec_id: cl_uint,
+ _spec_size: usize,
+ _spec_value: *const ::std::os::raw::c_void,
+) -> CLResult<()> {
+ println!("set_program_specialization_constantnot implemented");
+ Err(CL_INVALID_OPERATION)
+}