Function cl3::context::create_context_from_type [−][src]
pub fn create_context_from_type(
device_type: cl_device_type,
properties: *const cl_context_properties,
pfn_notify: Option<extern "C" fn(_: *const c_char, _: *const c_void, _: size_t, _: *mut c_void)>,
user_data: *mut c_void
) -> Result<cl_context, cl_int>
Expand description
Create an OpenCL context from a specific device type.
Calls clCreateContextFromType to create an OpenCL context.
device_type
- the type of OpenCL device, see: Device Types.properties
- a null terminated list of cl_context_properties, see: Context Properties.pfn_notify
- an optional callback function that can be registered by the application.user_data
- passed as the user_data argument when pfn_notify is called.
returns a Result containing the new OpenCL context or the error code from the OpenCL C API function.