pub enum Mem<T: DeviceCopy> {
SysMem(Vec<T>),
BoxedSysMem(Box<[T]>),
NumaMem(NumaMemory<T>),
DistributedNumaMem(DistributedNumaMemory<T>),
CudaPinnedMem(LockedBuffer<T>),
CudaDevMem(DeviceBuffer<T>),
CudaUniMem(UnifiedBuffer<T>),
}
Variants
SysMem(Vec<T>)
System memory allocated with Rust’s global allocator
BoxedSysMem(Box<[T]>)
System memory allocated with Rust’s global allocator but as a Rust Box
Useful for wrapping aliged memory.
NumaMem(NumaMemory<T>)
NUMA memory allocated on the specified NUMA node
DistributedNumaMem(DistributedNumaMemory<T>)
NUMA memory distributed over multiple NUMA nodes
CudaPinnedMem(LockedBuffer<T>)
CUDA pinned memory (using cudaHostAlloc())
CudaDevMem(DeviceBuffer<T>)
CUDA unified memory
CudaUniMem(UnifiedBuffer<T>)
CUDA device memory
Implementations
sourceimpl<T: DeviceCopy> Mem<T>
impl<T: DeviceCopy> Mem<T>
pub fn len(&self) -> usize
pub fn mem_type(&self) -> MemType
pub fn as_ptr(&self) -> *const T
pub fn as_mut_ptr(&mut self) -> *mut T
pub fn as_launchable_slice(&self) -> LaunchableSlice<'_, T>
pub fn as_launchable_mut_slice(&mut self) -> LaunchableMutSlice<'_, T>
pub fn as_launchable_ptr(&self) -> LaunchablePtr<T>
pub fn as_launchable_mut_ptr(&mut self) -> LaunchableMutPtr<T>
sourceimpl<T: Copy + DeviceCopy> Mem<T>
impl<T: Copy + DeviceCopy> Mem<T>
pub fn copy_from_mem(&mut self, src: &Self) -> Result<()>
Trait Implementations
sourceimpl<T: DeviceCopy> MemProtect for Mem<T>
impl<T: DeviceCopy> MemProtect for Mem<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Mem<T> where
T: RefUnwindSafe,
impl<T> Send for Mem<T> where
T: Send,
impl<T> Sync for Mem<T> where
T: Sync,
impl<T> Unpin for Mem<T> where
T: Unpin,
impl<T> UnwindSafe for Mem<T> where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more