opencv::mod_prelude

Trait ContextTraitConst

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

    // Provided methods
    fn ndevices(&self) -> Result<size_t> { ... }
    fn device(&self, idx: size_t) -> Result<Device> { ... }
    fn ptr(&self) -> Result<*mut c_void> { ... }
    fn get_opencl_context_property(
        &self,
        property_id: i32,
    ) -> Result<*mut c_void> { ... }
    fn use_svm(&self) -> Result<bool> { ... }
    fn empty(&self) -> Result<bool> { ... }
}
Expand description

Constant methods for core::Context

Required Methods§

Provided Methods§

Source

fn ndevices(&self) -> Result<size_t>

Source

fn device(&self, idx: size_t) -> Result<Device>

Source

fn ptr(&self) -> Result<*mut c_void>

§Returns

cl_context value

Source

fn get_opencl_context_property(&self, property_id: i32) -> Result<*mut c_void>

Get OpenCL context property specified on context creation

§Parameters
  • propertyId: Property id (CL_CONTEXT_* as defined in cl_context_properties type)
§Returns

Property value if property was specified on clCreateContext, or NULL if context created without the property

Source

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

Source

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

Implementors§