pub struct Context { /* private fields */ }
Implementations§
source§impl Context
impl Context
pub fn default() -> Context
pub fn new_with_type(dtype: i32) -> Result<Context>
pub fn copy(c: &Context) -> Result<Context>
pub fn copy_mut(c: Context) -> Context
sourcepub fn get_default(initialize: bool) -> Result<Context>
pub fn get_default(initialize: bool) -> Result<Context>
C++ default parameters
- initialize: true
sourcepub unsafe fn from_handle(context: *mut c_void) -> Result<Context>
pub unsafe fn from_handle(context: *mut c_void) -> Result<Context>
Parameters
- context: OpenCL handle (cl_context). clRetainContext() is called on success
pub fn from_device(device: &Device) -> Result<Context>
pub fn create(configuration: &str) -> Result<Context>
Trait Implementations§
source§impl Boxed for Context
impl Boxed for Context
source§impl ContextTrait for Context
impl ContextTrait for Context
fn as_raw_mut_Context(&mut self) -> *mut c_void
fn get_prog(
&mut self,
prog: &ProgramSource,
buildopt: &str,
errmsg: &mut String
) -> Result<Program>
fn unload_prog(&mut self, prog: &mut Program) -> Result<()>
fn set_use_svm(&mut self, enabled: bool) -> Result<()>
fn release(&mut self) -> Result<()>
source§impl ContextTraitConst for Context
impl ContextTraitConst for Context
fn as_raw_Context(&self) -> *const c_void
fn ndevices(&self) -> Result<size_t>
fn device(&self, idx: size_t) -> Result<Device>
source§fn get_opencl_context_property(&self, property_id: i32) -> Result<*mut c_void>
fn get_opencl_context_property(&self, property_id: i32) -> Result<*mut c_void>
Get OpenCL context property specified on context creation Read more