pub struct VirtualMemoryAnalysis<T = f32> { /* private fields */ }Expand description
Statistics about a memory optimization operation
Implementations§
Source§impl<T> VirtualMemoryAnalysis<T>
impl<T> VirtualMemoryAnalysis<T>
pub fn new() -> Selfwhere
T: Default,
Sourcepub const fn features_before(&self) -> usize
pub const fn features_before(&self) -> usize
returns the number of features before optimization
Sourcepub fn features_before_mut(&mut self) -> &mut usize
pub fn features_before_mut(&mut self) -> &mut usize
returns a mutable reference to the number of features before optimization
Sourcepub const fn features_after(&self) -> usize
pub const fn features_after(&self) -> usize
returns the number of features after optimization
Sourcepub fn features_after_mut(&mut self) -> &mut usize
pub fn features_after_mut(&mut self) -> &mut usize
returns a mutable reference to the number of features after optimization
Sourcepub const fn pruned_count(&self) -> usize
pub const fn pruned_count(&self) -> usize
returns the number of features that were pruned
Sourcepub fn pruned_count_mut(&mut self) -> &mut usize
pub fn pruned_count_mut(&mut self) -> &mut usize
returns a mutable reference to the number of features that were pruned
Sourcepub const fn memory_pressure(&self) -> &T
pub const fn memory_pressure(&self) -> &T
returns the memory pressure metric (ratio of features to target)
Sourcepub fn memory_pressure_mut(&mut self) -> &mut T
pub fn memory_pressure_mut(&mut self) -> &mut T
returns a mutable reference to the memory pressure metric (ratio of features to target)
Sourcepub const fn importance_threshold(&self) -> &T
pub const fn importance_threshold(&self) -> &T
returns the importance threshold used for pruning
Sourcepub fn importance_threshold_mut(&mut self) -> &mut T
pub fn importance_threshold_mut(&mut self) -> &mut T
returns a mutable reference to the importance threshold used for pruning
Trait Implementations§
Source§impl<T: Clone> Clone for VirtualMemoryAnalysis<T>
impl<T: Clone> Clone for VirtualMemoryAnalysis<T>
Source§fn clone(&self) -> VirtualMemoryAnalysis<T>
fn clone(&self) -> VirtualMemoryAnalysis<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for VirtualMemoryAnalysis<T>
impl<T: Debug> Debug for VirtualMemoryAnalysis<T>
Source§impl<T: Default> Default for VirtualMemoryAnalysis<T>
impl<T: Default> Default for VirtualMemoryAnalysis<T>
Source§fn default() -> VirtualMemoryAnalysis<T>
fn default() -> VirtualMemoryAnalysis<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for VirtualMemoryAnalysis<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for VirtualMemoryAnalysis<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: Hash> Hash for VirtualMemoryAnalysis<T>
impl<T: Hash> Hash for VirtualMemoryAnalysis<T>
Source§impl<T: Ord> Ord for VirtualMemoryAnalysis<T>
impl<T: Ord> Ord for VirtualMemoryAnalysis<T>
Source§fn cmp(&self, other: &VirtualMemoryAnalysis<T>) -> Ordering
fn cmp(&self, other: &VirtualMemoryAnalysis<T>) -> Ordering
1.21.0 · 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<T: PartialEq> PartialEq for VirtualMemoryAnalysis<T>
impl<T: PartialEq> PartialEq for VirtualMemoryAnalysis<T>
Source§impl<T: PartialOrd> PartialOrd for VirtualMemoryAnalysis<T>
impl<T: PartialOrd> PartialOrd for VirtualMemoryAnalysis<T>
Source§impl<T> Serialize for VirtualMemoryAnalysis<T>where
T: Serialize,
impl<T> Serialize for VirtualMemoryAnalysis<T>where
T: Serialize,
impl<T: Copy> Copy for VirtualMemoryAnalysis<T>
impl<T: Eq> Eq for VirtualMemoryAnalysis<T>
impl<T> StructuralPartialEq for VirtualMemoryAnalysis<T>
Auto Trait Implementations§
impl<T> Freeze for VirtualMemoryAnalysis<T>where
T: Freeze,
impl<T> RefUnwindSafe for VirtualMemoryAnalysis<T>where
T: RefUnwindSafe,
impl<T> Send for VirtualMemoryAnalysis<T>where
T: Send,
impl<T> Sync for VirtualMemoryAnalysis<T>where
T: Sync,
impl<T> Unpin for VirtualMemoryAnalysis<T>where
T: Unpin,
impl<T> UnwindSafe for VirtualMemoryAnalysis<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<T>,
impl<T> AsWeight<T> for Twhere
T: Clone + IntoWeight<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
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
Compare self to
key and return true if they are equal.Source§impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
impl<K, S> Identity<K> for Swhere
S: Borrow<K>,
K: Identifier,
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>
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 moreSource§impl<T> IntoWeight<T> for T
impl<T> IntoWeight<T> for T
fn into_weight(self) -> Weight<T>
Source§impl<A, B, C> PercentDifference<B> for A
impl<A, B, C> PercentDifference<B> for A
type Output = C
Source§fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
fn percent_diff(self, rhs: B) -> <A as PercentDifference<B>>::Output
Computes the percent difference between two values.