pub enum MemAdvice {
SetReadMostly,
UnsetReadMostly,
SetPreferredLocation(PrefetchTarget),
UnsetPreferredLocation,
SetAccessedBy(PrefetchTarget),
UnsetAccessedBy(PrefetchTarget),
}Expand description
Memory advisory hints. Each maps 1:1 to a CU_MEM_ADVISE_*
variant. The Set* variants take a target location; the Unset*
variants ignore it but require it to typecheck (CUDA accepts the
arg either way).
Variants§
SetReadMostly
Hint that the range is read predominantly. CUDA may duplicate pages across processors.
UnsetReadMostly
SetPreferredLocation(PrefetchTarget)
Pin the range to target’s memory.
UnsetPreferredLocation
SetAccessedBy(PrefetchTarget)
Advise that target will access the range; CUDA configures
page-table mappings accordingly.
UnsetAccessedBy(PrefetchTarget)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MemAdvice
impl RefUnwindSafe for MemAdvice
impl Send for MemAdvice
impl Sync for MemAdvice
impl Unpin for MemAdvice
impl UnsafeUnpin for MemAdvice
impl UnwindSafe for MemAdvice
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