[−][src]Struct opencv::core::OpenCLExecutionContext
Implementations
impl OpenCLExecutionContext
[src]
pub fn as_raw_OpenCLExecutionContext(&self) -> *const c_void
[src]
pub fn as_raw_mut_OpenCLExecutionContext(&mut self) -> *mut c_void
[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]
unnamed: &mut OpenCLExecutionContext
) -> Result<OpenCLExecutionContext>
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]
platform_name: &str,
platform_id: *mut c_void,
context: *mut c_void,
device_id: *mut c_void
) -> Result<OpenCLExecutionContext>
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]
context: &Context,
device: &Device,
queue: &Queue
) -> Result<OpenCLExecutionContext>
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]
context: &Context,
device: &Device
) -> Result<OpenCLExecutionContext>
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]
unsafe fn from_raw(ptr: *mut c_void) -> Self
[src]
fn into_raw(self) -> *mut c_void
[src]
fn as_raw(&self) -> *const c_void
[src]
fn as_raw_mut(&mut self) -> *mut c_void
[src]
impl Drop for OpenCLExecutionContext
[src]
impl OpenCLExecutionContextTrait for OpenCLExecutionContext
[src]
fn as_raw_OpenCLExecutionContext(&self) -> *const c_void
[src]
fn as_raw_mut_OpenCLExecutionContext(&mut self) -> *mut c_void
[src]
fn get_context(&self) -> Result<Context>
[src]
fn get_device(&self) -> Result<Device>
[src]
fn get_queue(&self) -> Result<Queue>
[src]
fn use_opencl(&self) -> Result<bool>
[src]
fn set_use_opencl(&mut self, flag: bool) -> Result<()>
[src]
fn bind(&self) -> Result<()>
[src]
fn clone_with_new_queue(&self, q: &Queue) -> Result<OpenCLExecutionContext>
[src]
fn clone_with_new_queue_1(&self) -> Result<OpenCLExecutionContext>
[src]
fn empty(&self) -> Result<bool>
[src]
fn release(&mut self) -> Result<()>
[src]
impl Send for OpenCLExecutionContext
[src]
Auto Trait Implementations
impl RefUnwindSafe for OpenCLExecutionContext
impl !Sync for OpenCLExecutionContext
impl Unpin for OpenCLExecutionContext
impl UnwindSafe for OpenCLExecutionContext
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,