pub enum MemType {
SysMem,
AlignedSysMem {
align_bytes: usize,
},
NumaMem {
node: u16,
page_type: PageType,
},
NumaPinnedMem {
node: u16,
page_type: PageType,
},
DistributedNumaMem {
nodes: Box<[NodeRatio]>,
page_type: PageType,
},
DistributedNumaMemWithLen {
nodes: Box<[NodeLen]>,
page_type: PageType,
},
CudaPinnedMem,
CudaUniMem,
CudaDevMem,
}
Expand description
Memory type specifier
Some memory types cannot be directly accessed on the host, e.g., CudaDevMem.
Variants
SysMem
System memory allocated with Rust’s global allocator
AlignedSysMem
Fields
align_bytes: usize
Aligned system memory allocated with Rust’s global allocator
Alignment is specified in bytes.
NumaMem
NUMA memory allocated on the specified NUMA node and with the specified page type
NumaPinnedMem
NUMA memory allocated on the specified NUMA node and pinned with CUDA
DistributedNumaMem
NUMA memory distributed in proportion to a ratio over multiple NUMA nodes
DistributedNumaMemWithLen
NUMA memory distributed over multiple NUMA nodes using a length per node
CudaPinnedMem
CUDA pinned memory (using cudaHostAlloc())
CudaUniMem
CUDA unified memory
CudaDevMem
CUDA device memory
Implementations
Trait Implementations
sourceimpl From<DerefMemType> for MemType
impl From<DerefMemType> for MemType
sourcefn from(dmt: DerefMemType) -> Self
fn from(dmt: DerefMemType) -> Self
Performs the conversion.
sourceimpl From<MemType> for CacheSpillType
impl From<MemType> for CacheSpillType
sourcefn from(mem_type: MemType) -> CacheSpillType
fn from(mem_type: MemType) -> CacheSpillType
Performs the conversion.
sourceimpl TryFrom<MemType> for DerefMemType
impl TryFrom<MemType> for DerefMemType
impl StructuralPartialEq for MemType
Auto Trait Implementations
impl RefUnwindSafe for MemType
impl Send for MemType
impl Sync for MemType
impl Unpin for MemType
impl UnwindSafe for MemType
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
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more