[−][src]Function opencv::core::attach_context
pub fn attach_context(
platform_name: &str,
platform_id: &mut c_void,
context: &mut c_void,
device_id: &mut c_void
) -> Result<()>
Attaches OpenCL context to OpenCV
Note:
OpenCV will check if available OpenCL platform has platformName name, then assign context to
OpenCV and call clRetainContext
function. The deviceID device will be used as target device and
new command queue will be created.
Parameters
- platformName: name of OpenCL platform to attach, this string is used to check if platform is available to OpenCV at runtime
- platformID: ID of platform attached context was created for
- context: OpenCL context to be attached to OpenCV
- deviceID: ID of device, must be created from attached context