[][src]Struct opencv::core::OpenCLExecutionContext

pub struct OpenCLExecutionContext { /* fields omitted */ }

Implementations

impl OpenCLExecutionContext[src]

impl OpenCLExecutionContext[src]

pub fn default() -> Result<OpenCLExecutionContext>[src]

pub fn copy(unnamed: &OpenCLExecutionContext) -> Result<OpenCLExecutionContext>[src]

pub fn copy_mut(
    unnamed: &mut OpenCLExecutionContext
) -> Result<OpenCLExecutionContext>
[src]

pub fn get_current() -> Result<OpenCLExecutionContext>[src]

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)

pub fn get_current_ref() -> Result<OpenCLExecutionContext>[src]

Get OpenCL execution context of current thread (can be empty)

pub fn create(
    platform_name: &str,
    platform_id: *mut c_void,
    context: *mut c_void,
    device_id: *mut c_void
) -> Result<OpenCLExecutionContext>
[src]

Creates OpenCL execution context 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.

Note: Lifetime of passed handles is transferred to OpenCV wrappers on success

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)

pub fn create_1(
    context: &Context,
    device: &Device,
    queue: &Queue
) -> Result<OpenCLExecutionContext>
[src]

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

pub fn create_2(
    context: &Context,
    device: &Device
) -> Result<OpenCLExecutionContext>
[src]

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

impl Boxed for OpenCLExecutionContext[src]

impl Drop for OpenCLExecutionContext[src]

impl OpenCLExecutionContextTrait for OpenCLExecutionContext[src]

impl Send for OpenCLExecutionContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.