Trait OpenCLExecutionContextTraitConst

Source
pub trait OpenCLExecutionContextTraitConst {
    // Required method
    fn as_raw_OpenCLExecutionContext(&self) -> *const c_void;

    // Provided methods
    fn get_context(&self) -> Result<Context> { ... }
    fn get_device(&self) -> Result<Device> { ... }
    fn get_queue(&self) -> Result<Queue> { ... }
    fn use_opencl(&self) -> Result<bool> { ... }
    fn bind(&self) -> Result<()> { ... }
    fn clone_with_new_queue(
        &self,
        q: &impl QueueTraitConst,
    ) -> Result<OpenCLExecutionContext> { ... }
    fn clone_with_new_queue_1(&self) -> Result<OpenCLExecutionContext> { ... }
    fn empty(&self) -> Result<bool> { ... }
}
Expand description

Constant methods for core::OpenCLExecutionContext

Required Methods§

Provided Methods§

Source

fn get_context(&self) -> Result<Context>

Get associated ocl::Context

Source

fn get_device(&self) -> Result<Device>

Get the single default associated ocl::Device

Source

fn get_queue(&self) -> Result<Queue>

Get the single ocl::Queue that is associated with the ocl::Context and the single default ocl::Device

Source

fn use_opencl(&self) -> Result<bool>

Source

fn bind(&self) -> Result<()>

Bind this OpenCL execution context to current thread.

Context can’t be empty.

Note: clFinish is not called for queue of previous execution context

Source

fn clone_with_new_queue( &self, q: &impl QueueTraitConst, ) -> Result<OpenCLExecutionContext>

Creates new execution context with same OpenCV context and device

§Parameters
  • q: OpenCL queue
Source

fn clone_with_new_queue_1(&self) -> Result<OpenCLExecutionContext>

Creates new execution context with same OpenCV context and device

§Parameters
  • q: OpenCL queue
§Overloaded parameters
Source

fn empty(&self) -> Result<bool>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§