pub struct BlockArena { /* private fields */ }Expand description
Bump allocator for per-block f32 scratch buffers.
Processors borrow zeroed slices from the arena during a process call; the
graph calls BlockArena::reset before each node so its capacity is reused
without per-block heap allocation.
Implementations§
Source§impl BlockArena
impl BlockArena
Sourcepub fn with_f32_capacity(capacity: usize) -> Self
pub fn with_f32_capacity(capacity: usize) -> Self
Creates an arena pre-sized for capacity f32 cells.
Sourcepub fn f32_capacity(&self) -> usize
pub fn f32_capacity(&self) -> usize
Returns the total f32 capacity of the arena.
Trait Implementations§
Source§impl Clone for BlockArena
impl Clone for BlockArena
Source§fn clone(&self) -> BlockArena
fn clone(&self) -> BlockArena
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BlockArena
impl Debug for BlockArena
Source§impl Default for BlockArena
impl Default for BlockArena
Source§fn default() -> BlockArena
fn default() -> BlockArena
Returns the “default value” for a type. Read more
Source§impl PartialEq for BlockArena
impl PartialEq for BlockArena
Source§fn eq(&self, other: &BlockArena) -> bool
fn eq(&self, other: &BlockArena) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BlockArena
Auto Trait Implementations§
impl Freeze for BlockArena
impl RefUnwindSafe for BlockArena
impl Send for BlockArena
impl Sync for BlockArena
impl Unpin for BlockArena
impl UnsafeUnpin for BlockArena
impl UnwindSafe for BlockArena
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