Function opencl3::context::context::create_context_from_type [−][src]
pub fn create_context_from_type(
device_type: u64,
properties: *const isize,
pfn_notify: Option<extern "C" fn(*const i8, *const c_void, usize, *mut c_void)>,
user_data: *mut c_void
) -> Result<*mut c_void, i32>
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.