#[repr(C)]pub struct Context(/* private fields */);
Expand description
cl_context
Implementations§
source§impl Context
impl Context
sourcepub unsafe fn from_raw_create_ptr(ptr: cl_context) -> Context
pub unsafe fn from_raw_create_ptr(ptr: cl_context) -> Context
Only call this when passing the original newly created pointer
directly from clCreate...
. Do not use this to clone or copy.
sourcepub unsafe fn from_raw_copied_ptr(ptr: cl_context) -> Context
pub unsafe fn from_raw_copied_ptr(ptr: cl_context) -> Context
Only call this when passing a copied pointer such as from an
clGet*****Info
function.
sourcepub fn as_ptr(&self) -> cl_context
pub fn as_ptr(&self) -> cl_context
Returns a pointer, do not store it.
sourcepub fn devices(&self) -> OclCoreResult<Vec<DeviceId>>
pub fn devices(&self) -> OclCoreResult<Vec<DeviceId>>
Returns the devices associated with this context.
sourcepub fn platform(&self) -> OclCoreResult<Option<PlatformId>>
pub fn platform(&self) -> OclCoreResult<Option<PlatformId>>
Returns the platform associated with this context, if any.
Errors upon the usual OpenCL errors.
Returns None
if the context properties do not specify a platform.
Trait Implementations§
source§impl<'a> ClContextPtr for &'a Context
impl<'a> ClContextPtr for &'a Context
fn as_ptr(&self) -> cl_context
source§impl<'a> ClVersions for &'a Context
impl<'a> ClVersions for &'a Context
fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>
fn platform_version(&self) -> OclCoreResult<OpenclVersion>
fn verify_device_versions( &self, required_version: [u16; 2] ) -> OclCoreResult<()>
fn verify_platform_version( &self, required_version: [u16; 2] ) -> OclCoreResult<()>
source§impl ClVersions for Context
impl ClVersions for Context
fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>
fn platform_version(&self) -> OclCoreResult<OpenclVersion>
fn verify_device_versions( &self, required_version: [u16; 2] ) -> OclCoreResult<()>
fn verify_platform_version( &self, required_version: [u16; 2] ) -> OclCoreResult<()>
source§impl PartialEq for Context
impl PartialEq for Context
impl Send for Context
impl Sync for Context
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more