Struct opencv::core::Context

source ·
pub struct Context { /* private fields */ }

Implementations§

source§

impl Context

source

pub fn default() -> Context

source

pub fn new_with_type(dtype: i32) -> Result<Context>

source

pub fn copy(c: &Context) -> Result<Context>

source

pub fn copy_mut(c: Context) -> Context

source

pub fn get_default(initialize: bool) -> Result<Context>

C++ default parameters
  • initialize: true
source

pub unsafe fn from_handle(context: *mut c_void) -> Result<Context>

Parameters
  • context: OpenCL handle (cl_context). clRetainContext() is called on success
source

pub fn from_device(device: &Device) -> Result<Context>

source

pub fn create(configuration: &str) -> Result<Context>

Trait Implementations§

source§

impl Boxed for Context

source§

unsafe fn from_raw(ptr: *mut c_void) -> Self

Wrap the specified raw pointer Read more
source§

fn into_raw(self) -> *mut c_void

Return an the underlying raw pointer while consuming this wrapper. Read more
source§

fn as_raw(&self) -> *const c_void

Return the underlying raw pointer. Read more
source§

fn as_raw_mut(&mut self) -> *mut c_void

Return the underlying mutable raw pointer Read more
source§

impl ContextTrait for Context

source§

fn as_raw_mut_Context(&mut self) -> *mut c_void

source§

fn create(&mut self) -> Result<bool>

@deprecated
source§

fn create_with_type(&mut self, dtype: i32) -> Result<bool>

@deprecated
source§

fn get_prog( &mut self, prog: &ProgramSource, buildopt: &str, errmsg: &mut String ) -> Result<Program>

source§

fn unload_prog(&mut self, prog: &mut Program) -> Result<()>

source§

fn set_use_svm(&mut self, enabled: bool) -> Result<()>

source§

fn release(&mut self) -> Result<()>

source§

impl ContextTraitConst for Context

source§

fn as_raw_Context(&self) -> *const c_void

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 Read more
source§

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

Get OpenCL context property specified on context creation Read more
source§

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

source§

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

source§

impl Default for Context

source§

fn default() -> Self

Forwards to infallible Self::default()

source§

impl Drop for Context

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Send for Context

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.