pub struct MatrixMemoryPool { /* private fields */ }Expand description
Memory pool for efficient matrix allocation
Implementations§
Source§impl MatrixMemoryPool
impl MatrixMemoryPool
Sourcepub fn get_matrix(
&mut self,
rows: usize,
cols: usize,
) -> Result<AlignedMatrix<Float>>
pub fn get_matrix( &mut self, rows: usize, cols: usize, ) -> Result<AlignedMatrix<Float>>
Get matrix from pool or allocate new one
Sourcepub fn return_matrix(&mut self, matrix: AlignedMatrix<Float>)
pub fn return_matrix(&mut self, matrix: AlignedMatrix<Float>)
Return matrix to pool
Sourcepub fn get_statistics(&self) -> PoolStatistics
pub fn get_statistics(&self) -> PoolStatistics
Get pool statistics
Auto Trait Implementations§
impl Freeze for MatrixMemoryPool
impl RefUnwindSafe for MatrixMemoryPool
impl Send for MatrixMemoryPool
impl Sync for MatrixMemoryPool
impl Unpin for MatrixMemoryPool
impl UnwindSafe for MatrixMemoryPool
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