pub struct BufferPool { /* private fields */ }Expand description
High-performance buffer pool for reducing allocation overhead.
This pool maintains pre-allocated buffers of various sizes to minimize runtime allocations during matrix operations.
Implementations§
Source§impl BufferPool
impl BufferPool
Sourcepub fn get_buffer(&mut self, min_size: usize) -> Vec<Precision> ⓘ
pub fn get_buffer(&mut self, min_size: usize) -> Vec<Precision> ⓘ
Get a buffer of at least the requested size.
Sourcepub fn return_buffer(&mut self, buffer: Vec<Precision>)
pub fn return_buffer(&mut self, buffer: Vec<Precision>)
Return a buffer to the pool.
Sourcepub fn stats(&self) -> BufferPoolStats
pub fn stats(&self) -> BufferPoolStats
Get buffer pool statistics.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BufferPool
impl RefUnwindSafe for BufferPool
impl Send for BufferPool
impl Sync for BufferPool
impl Unpin for BufferPool
impl UnwindSafe for BufferPool
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