pub struct PoolConfig {
pub max_tensors_per_size: usize,
pub max_total_memory: usize,
pub enable_analytics: bool,
pub pre_allocate_sizes: Vec<Vec<usize>>,
pub enable_cache_awareness: bool,
pub memory_alignment: usize,
pub auto_gc_threshold: f64,
pub enable_adaptive_sizing: bool,
pub pressure_check_interval_ms: u64,
pub min_cache_tracked_size: usize,
}Expand description
Configuration for memory pool behavior
Fields§
§max_tensors_per_size: usizeMaximum number of tensors to keep in each size pool
max_total_memory: usizeMaximum total memory usage in bytes
enable_analytics: boolWhether to enable memory usage analytics
pre_allocate_sizes: Vec<Vec<usize>>Pre-allocate common tensor sizes
enable_cache_awareness: boolEnable cache-aware allocation strategies
memory_alignment: usizeMemory alignment for cache-friendly allocations (bytes)
auto_gc_threshold: f64Automatic garbage collection threshold (fragmentation score 0.0-1.0)
enable_adaptive_sizing: boolEnable adaptive pool sizing based on usage patterns
pressure_check_interval_ms: u64Memory pressure monitoring interval (milliseconds)
min_cache_tracked_size: usizeMinimum allocation size to track for cache analysis
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
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 PoolConfig
impl Debug for PoolConfig
Auto Trait Implementations§
impl Freeze for PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnsafeUnpin for PoolConfig
impl UnwindSafe for PoolConfig
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