pub struct AdaptiveMemoryManager { /* private fields */ }Expand description
Adaptive memory allocation strategies
Implementations§
Source§impl AdaptiveMemoryManager
impl AdaptiveMemoryManager
Sourcepub fn new(strategy: AllocationStrategy) -> Self
pub fn new(strategy: AllocationStrategy) -> Self
Create a new adaptive memory manager
Sourcepub fn with_memory_limit(self, limit: usize) -> Self
pub fn with_memory_limit(self, limit: usize) -> Self
Set maximum memory limit
Sourcepub fn allocate_graph_memory(
&self,
graph: &FxGraph,
) -> TorshResult<GraphMemoryLayout>
pub fn allocate_graph_memory( &self, graph: &FxGraph, ) -> TorshResult<GraphMemoryLayout>
Allocate memory for graph operations
Sourcepub fn deallocate_graph_memory(&self, layout: &GraphMemoryLayout)
pub fn deallocate_graph_memory(&self, layout: &GraphMemoryLayout)
Deallocate memory for graph operations
Auto Trait Implementations§
impl Freeze for AdaptiveMemoryManager
impl RefUnwindSafe for AdaptiveMemoryManager
impl Send for AdaptiveMemoryManager
impl Sync for AdaptiveMemoryManager
impl Unpin for AdaptiveMemoryManager
impl UnsafeUnpin for AdaptiveMemoryManager
impl UnwindSafe for AdaptiveMemoryManager
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