Struct opencv::core::OpenCLExecutionContext [−][src]
pub struct OpenCLExecutionContext { /* fields omitted */ }
Implementations
Get OpenCL execution context of current thread.
Initialize OpenCL execution context if it is empty
- create new
- reuse context of the main thread (threadID = 0)
Get OpenCL execution context of current thread (can be empty)
Creates OpenCL execution context OpenCV will check if available OpenCL platform has platformName name, then assign context to OpenCV. The deviceID device will be used as target device and a new command queue will be created.
Note: On success, ownership of one reference of the context and device is taken.
The caller should additionally call clRetainContext
and/or clRetainDevice
to increase the reference count if it wishes to continue using them.
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 (cl_platform_id)
- context: OpenCL context to be attached to OpenCV (cl_context)
- deviceID: OpenCL device (cl_device_id)
Creates OpenCL execution context
Parameters
- context: non-empty OpenCL context
- device: non-empty OpenCL device (must be a part of context)
- queue: non-empty OpenCL queue for provided context and device
Creates OpenCL execution context
Parameters
- context: non-empty OpenCL context
- device: non-empty OpenCL device (must be a part of context)
- queue: non-empty OpenCL queue for provided context and device
Overloaded parameters
Trait Implementations
Get associated ocl::Context
Get the single default associated ocl::Device
Get the single ocl::Queue that is associated with the ocl::Context and the single default ocl::Device Read more
Creates new execution context with same OpenCV context and device Read more
Creates new execution context with same OpenCV context and device Read more