pub enum HostResidency {
Pinned,
Locked,
Pageable,
}Expand description
Residency class of one layer’s expert bank.
The string forms are the wire values FreeToken uses
("pinned" / "locked" / "pageable"), so a label written by
either side reads the same.
Variants§
Pinned
Page-locked and device-addressable: the only class the GPU expert path can DMA from.
Locked
Resident (unswappable) but CPU-only: no device address.
Pageable
An ordinary mapping; may be swapped out.
Implementations§
Source§impl HostResidency
impl HostResidency
pub fn as_str(self) -> &'static str
Sourcepub fn from_label(label: &str) -> Option<Self>
pub fn from_label(label: &str) -> Option<Self>
Sourcepub fn is_device_addressable(self) -> bool
pub fn is_device_addressable(self) -> bool
Whether the GPU can read this bank directly. The single question every consumer of a label actually asks.
Trait Implementations§
Source§impl Clone for HostResidency
impl Clone for HostResidency
Source§fn clone(&self) -> HostResidency
fn clone(&self) -> HostResidency
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 HostResidency
Source§impl Debug for HostResidency
impl Debug for HostResidency
Source§impl Default for HostResidency
impl Default for HostResidency
Source§fn default() -> HostResidency
fn default() -> HostResidency
Returns the “default value” for a type. Read more
Source§impl Display for HostResidency
impl Display for HostResidency
impl Eq for HostResidency
Source§impl Hash for HostResidency
impl Hash for HostResidency
Source§impl Ord for HostResidency
impl Ord for HostResidency
Source§fn cmp(&self, other: &HostResidency) -> Ordering
fn cmp(&self, other: &HostResidency) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HostResidency
impl PartialEq for HostResidency
Source§impl PartialOrd for HostResidency
impl PartialOrd for HostResidency
impl StructuralPartialEq for HostResidency
Auto Trait Implementations§
impl Freeze for HostResidency
impl RefUnwindSafe for HostResidency
impl Send for HostResidency
impl Sync for HostResidency
impl Unpin for HostResidency
impl UnsafeUnpin for HostResidency
impl UnwindSafe for HostResidency
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more