pub struct GlobalMemoryOptimizer { /* private fields */ }Expand description
Global memory optimization manager
Implementations§
Source§impl GlobalMemoryOptimizer
impl GlobalMemoryOptimizer
Sourcepub fn with_config(config: MemoryConfig) -> Self
pub fn with_config(config: MemoryConfig) -> Self
Create with custom configuration
Sourcepub fn get_pool<T: TensorElement>(&self) -> Option<&AdvancedMemoryPool<T>>
pub fn get_pool<T: TensorElement>(&self) -> Option<&AdvancedMemoryPool<T>>
Get pool for specific type
Sourcepub fn global_defragmentation(&self) -> Result<Vec<DefragmentationReport>>
pub fn global_defragmentation(&self) -> Result<Vec<DefragmentationReport>>
Run global defragmentation across all pools
Sourcepub fn get_aggregate_stats(&self) -> AggregateMemoryStats
pub fn get_aggregate_stats(&self) -> AggregateMemoryStats
Get aggregate memory statistics
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GlobalMemoryOptimizer
impl RefUnwindSafe for GlobalMemoryOptimizer
impl !Send for GlobalMemoryOptimizer
impl !Sync for GlobalMemoryOptimizer
impl Unpin for GlobalMemoryOptimizer
impl UnsafeUnpin for GlobalMemoryOptimizer
impl UnwindSafe for GlobalMemoryOptimizer
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> 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