#[repr(C)]pub struct ClPointer<T: Copy> { /* private fields */ }
Expand description
ClPointer is a very short-lived struct that is used to homogenize the returns from many of the CL API calls. If a call to an OpenCL C function successfully returns a ClPointer that ClPointer MUST BE CONSUMED; Failure to consume the ClPointer will lead to a panic when the ClPointer struct is dropped.
Implementations§
Source§impl ClPointer<u8>
Only u8 ClPointers can become String
impl ClPointer<u8>
Only u8 ClPointers can become String
pub unsafe fn into_string(self) -> String
Source§impl<T: Copy> ClPointer<T>
impl<T: Copy> ClPointer<T>
pub unsafe fn new(count: usize, ptr: *mut T) -> ClPointer<T>
pub unsafe fn from_vec(v: Vec<T>) -> ClPointer<T>
pub unsafe fn new_empty() -> ClPointer<T>
pub fn is_empty(&self) -> bool
pub fn is_null(&self) -> bool
pub unsafe fn into_one(self) -> T
pub unsafe fn into_vec(self) -> Vec<T>
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for ClPointer<T>
impl<T> RefUnwindSafe for ClPointer<T>where
T: RefUnwindSafe,
impl<T> !Send for ClPointer<T>
impl<T> !Sync for ClPointer<T>
impl<T> Unpin for ClPointer<T>where
T: Unpin,
impl<T> UnwindSafe for ClPointer<T>where
T: RefUnwindSafe + UnwindSafe,
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