pub enum MemoryAdvice {
SetReadMostly,
ClearReadMostly,
SetPreferredLocation,
ClearPreferredLocation,
SetAccessedByDevice,
ClearAccessedByDevice,
BiasCached,
BiasUncached,
}Expand description
Memory-advise hints applied to a shared/device USM range.
These mirror ze_memory_advice_t. The hints are pure metadata that the
driver uses to steer page migration for shared USM; we model the intent
here so a planner can validate and accumulate hints before issuing the
device-gated zeCommandListAppendMemAdvise.
Variants§
SetReadMostly
ZE_MEMORY_ADVICE_SET_READ_MOSTLY — pages are read far more than written.
ClearReadMostly
ZE_MEMORY_ADVICE_CLEAR_READ_MOSTLY.
SetPreferredLocation
ZE_MEMORY_ADVICE_SET_PREFERRED_LOCATION — pin to the device.
ClearPreferredLocation
ZE_MEMORY_ADVICE_CLEAR_PREFERRED_LOCATION.
SetAccessedByDevice
ZE_MEMORY_ADVICE_SET_ACCESSED_BY_DEVICE.
ClearAccessedByDevice
ZE_MEMORY_ADVICE_CLEAR_ACCESSED_BY_DEVICE.
BiasCached
ZE_MEMORY_ADVICE_BIAS_CACHED.
BiasUncached
ZE_MEMORY_ADVICE_BIAS_UNCACHED.
Implementations§
Source§impl MemoryAdvice
impl MemoryAdvice
Sourcepub fn clearing_advice(self) -> Option<MemoryAdvice>
pub fn clearing_advice(self) -> Option<MemoryAdvice>
The advice that clears this one, if it is a set/clear pair.
Trait Implementations§
Source§impl Clone for MemoryAdvice
impl Clone for MemoryAdvice
Source§fn clone(&self) -> MemoryAdvice
fn clone(&self) -> MemoryAdvice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for MemoryAdvice
Source§impl Debug for MemoryAdvice
impl Debug for MemoryAdvice
impl Eq for MemoryAdvice
Source§impl PartialEq for MemoryAdvice
impl PartialEq for MemoryAdvice
Source§fn eq(&self, other: &MemoryAdvice) -> bool
fn eq(&self, other: &MemoryAdvice) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MemoryAdvice
Auto Trait Implementations§
impl Freeze for MemoryAdvice
impl RefUnwindSafe for MemoryAdvice
impl Send for MemoryAdvice
impl Sync for MemoryAdvice
impl Unpin for MemoryAdvice
impl UnsafeUnpin for MemoryAdvice
impl UnwindSafe for MemoryAdvice
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