pub struct MemoryConfig {
pub enable_pooling: bool,
pub pool_size: usize,
pub max_cached_per_size: usize,
pub enable_compression: bool,
pub compression_threshold: usize,
pub enable_numa_awareness: bool,
pub cache_line_size: usize,
pub enable_predictive_allocation: bool,
pub memory_pressure_threshold: f64,
}Expand description
Advanced memory optimization configuration
Fields§
§enable_pooling: boolEnable memory pooling for frequent allocations
pool_size: usizeTarget pool size in bytes
max_cached_per_size: usizeMaximum number of cached allocations per size class
enable_compression: boolEnable memory compression for large tensors
compression_threshold: usizeCompression threshold in bytes
enable_numa_awareness: boolEnable NUMA-aware allocation
cache_line_size: usizeCache line size for alignment optimization
enable_predictive_allocation: boolEnable predictive pre-allocation
memory_pressure_threshold: f64Memory pressure monitoring threshold (0.0-1.0)
Trait Implementations§
Source§impl Clone for MemoryConfig
impl Clone for MemoryConfig
Source§fn clone(&self) -> MemoryConfig
fn clone(&self) -> MemoryConfig
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 Debug for MemoryConfig
impl Debug for MemoryConfig
Auto Trait Implementations§
impl Freeze for MemoryConfig
impl RefUnwindSafe for MemoryConfig
impl Send for MemoryConfig
impl Sync for MemoryConfig
impl Unpin for MemoryConfig
impl UnsafeUnpin for MemoryConfig
impl UnwindSafe for MemoryConfig
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