pub enum UsmKind {
Device,
Host,
Shared,
}Expand description
The kind of Unified Shared Memory backing an allocation.
Variants§
Device
Device-local memory (zeMemAllocDevice). Not CPU-accessible.
Host
Host memory (zeMemAllocHost). CPU + GPU accessible.
Migratable shared memory (zeMemAllocShared).
Implementations§
Source§impl UsmKind
impl UsmKind
Sourcepub fn is_host_accessible(self) -> bool
pub fn is_host_accessible(self) -> bool
Returns true when this kind is directly readable/writable by the CPU.
Sourcepub fn alloc_desc_stype(self) -> u32
pub fn alloc_desc_stype(self) -> u32
The ze_structure_type_t value of the corresponding alloc descriptor.
Device → ZE_STRUCTURE_TYPE_DEVICE_MEM_ALLOC_DESC (0x15),
Host → ZE_STRUCTURE_TYPE_HOST_MEM_ALLOC_DESC (0x16). Shared uses the
device descriptor with a chained host descriptor in pNext.
Trait Implementations§
impl Copy for UsmKind
impl Eq for UsmKind
impl StructuralPartialEq for UsmKind
Auto Trait Implementations§
impl Freeze for UsmKind
impl RefUnwindSafe for UsmKind
impl Send for UsmKind
impl Sync for UsmKind
impl Unpin for UsmKind
impl UnsafeUnpin for UsmKind
impl UnwindSafe for UsmKind
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