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§