Struct ocl_core::types::abs::MemMap

source ·
#[repr(C)]
pub struct MemMap<T>(/* private fields */);
Expand description

A pointer to a region of mapped (pinned) memory.

Implementations§

source§

impl<T: OclPrm> MemMap<T>

source

pub unsafe fn from_raw(ptr: *mut T) -> MemMap<T>

Only call this when passing the original newly created pointer directly from clCreate.... Do not use this to clone or copy.

source

pub fn as_ptr(&self) -> *const T

source

pub fn as_mut_ptr(&mut self) -> *mut T

source

pub fn as_void_ptr(&self) -> *mut c_void

source

pub unsafe fn as_slice<'a>(&self, len: usize) -> &'a [T]

source

pub unsafe fn as_slice_mut<'a>(&mut self, len: usize) -> &'a mut [T]

Trait Implementations§

source§

impl<T> AsMem<T> for MemMap<T>where T: OclPrm,

source§

fn as_mem(&self) -> &Mem

source§

impl<T: Debug> Debug for MemMap<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T: OclPrm> MemCmdRw for &'a MemMap<T>

source§

impl<'a, T: OclPrm> MemCmdRw for &'a mut MemMap<T>

source§

impl<T: OclPrm> MemCmdRw for MemMap<T>

source§

impl<T: OclPrm> Send for MemMap<T>

Auto Trait Implementations§

§

impl<T> RefUnwindSafe for MemMap<T>where T: RefUnwindSafe,

§

impl<T> !Sync for MemMap<T>

§

impl<T> Unpin for MemMap<T>

§

impl<T> UnwindSafe for MemMap<T>where T: RefUnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.