pub struct OpenCLExecutionContext { /* private fields */ }

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

Wrap the specified raw pointer Read more

Return an the underlying raw pointer while consuming this wrapper. Read more

Return the underlying raw pointer. Read more

Return the underlying mutable raw pointer Read more

Forwards to infallible Self::default()

Executes the destructor for this type. Read more

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

Bind this OpenCL execution context to current thread. 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

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.