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: &Queue) -> 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§
fn as_raw_OpenCLExecutionContext(&self) -> *const c_void
Provided Methods§
sourcefn get_context(&self) -> Result<Context>
fn get_context(&self) -> Result<Context>
Get associated ocl::Context
sourcefn get_device(&self) -> Result<Device>
fn get_device(&self) -> Result<Device>
Get the single default associated ocl::Device
sourcefn get_queue(&self) -> Result<Queue>
fn get_queue(&self) -> Result<Queue>
Get the single ocl::Queue that is associated with the ocl::Context and the single default ocl::Device
fn use_opencl(&self) -> Result<bool>
sourcefn bind(&self) -> Result<()>
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
sourcefn clone_with_new_queue(&self, q: &Queue) -> Result<OpenCLExecutionContext>
fn clone_with_new_queue(&self, q: &Queue) -> Result<OpenCLExecutionContext>
sourcefn clone_with_new_queue_1(&self) -> Result<OpenCLExecutionContext>
fn clone_with_new_queue_1(&self) -> Result<OpenCLExecutionContext>
Creates new execution context with same OpenCV context and device
Parameters
- q: OpenCL queue