#[non_exhaustive]pub enum GpuDeviceMemoryLimit {
Automatic {
headroom_bytes: u64,
fallback_bytes: u64,
fraction: Option<GpuMemoryFraction>,
},
Explicit {
limit_bytes: u64,
},
}Expand description
Soft admission capacity calculation for one device.
Automatic resolves at build time, after the device is discovered, to the
owned capacity minus headroom_bytes, or to fallback_bytes when the
subtraction leaves nothing; fraction further caps the result at that
share of the owned capacity. Explicit is accepted as given and is
rejected when it exceeds the owned capacity: at validation for a static
partition, at build for a whole device. Both describe the ledger’s
configured limit; admission commits grants against it, and neither
constrains the allocator installed on the device.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Automatic
Discovers admission capacity from the promised owned device capacity. The default reserves 500 MiB, falls back to 256 MiB and applies no fraction.
Fields
fraction: Option<GpuMemoryFraction>Optional further cap on the share of owned capacity.
Explicit
Declares an immutable byte limit checked against owned device capacity.
Trait Implementations§
Source§impl Clone for GpuDeviceMemoryLimit
impl Clone for GpuDeviceMemoryLimit
Source§fn clone(&self) -> GpuDeviceMemoryLimit
fn clone(&self) -> GpuDeviceMemoryLimit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for GpuDeviceMemoryLimit
Source§impl Debug for GpuDeviceMemoryLimit
impl Debug for GpuDeviceMemoryLimit
Source§impl Default for GpuDeviceMemoryLimit
impl Default for GpuDeviceMemoryLimit
Source§fn default() -> GpuDeviceMemoryLimit
fn default() -> GpuDeviceMemoryLimit
impl Eq for GpuDeviceMemoryLimit
Source§impl Hash for GpuDeviceMemoryLimit
impl Hash for GpuDeviceMemoryLimit
Source§impl PartialEq for GpuDeviceMemoryLimit
impl PartialEq for GpuDeviceMemoryLimit
impl StructuralPartialEq for GpuDeviceMemoryLimit
Auto Trait Implementations§
impl Freeze for GpuDeviceMemoryLimit
impl RefUnwindSafe for GpuDeviceMemoryLimit
impl Send for GpuDeviceMemoryLimit
impl Sync for GpuDeviceMemoryLimit
impl Unpin for GpuDeviceMemoryLimit
impl UnsafeUnpin for GpuDeviceMemoryLimit
impl UnwindSafe for GpuDeviceMemoryLimit
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request