pub struct Context { /* private fields */ }
Implementations
sourceimpl 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: &mut 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
sourceimpl Boxed for Context
impl Boxed for Context
sourceimpl ContextTrait for Context
impl ContextTrait for Context
fn as_raw_mut_Context(&mut self) -> *mut c_void
sourcefn create_with_type(&mut self, dtype: i32) -> Result<bool>
fn create_with_type(&mut self, dtype: i32) -> Result<bool>
@deprecated
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<()>
sourceimpl 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>
sourcefn 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
fn use_svm(&self) -> Result<bool>
fn empty(&self) -> Result<bool>
impl Send for Context
Auto Trait Implementations
impl RefUnwindSafe for Context
impl !Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more