pub struct BakingScratch { /* private fields */ }Expand description
Caller-owned reusable scratch buffers for bake_rows_into_template.
The merge needs five intermediate buffers, all sized from the inputs of the
current call. Constructing one BakingScratch and passing &mut to every
bake reuses these allocations: each buffer is clear()-ed and re-grown at
the start of a call without ever calling shrink_to_fit, so at steady state
(once the largest seen template/batch has been processed) a bake allocates
no temporaries.
The fields are private; the struct is an opaque buffer bag. The buffers are, in element type and per-call length:
cut_nz_per_col: Vec<u32>— lengthnum_cols; per-column count of CSR contributions (count pass).col_list_start: Vec<u32>— lengthnum_cols + 1; prefix-sum column-offset table into the flat CSR-grouped buffers.col_list_row: Vec<i32>— lengthrows_nnz; flat row-index buffer grouped by column.col_list_val: Vec<f64>— lengthrows_nnz; flat value buffer grouped by column.write_cursor: Vec<u32>— lengthnum_cols; per-column write offset within the flat buffers.
Implementations§
Source§impl BakingScratch
impl BakingScratch
Trait Implementations§
Source§impl Debug for BakingScratch
impl Debug for BakingScratch
Source§impl Default for BakingScratch
impl Default for BakingScratch
Source§fn default() -> BakingScratch
fn default() -> BakingScratch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BakingScratch
impl RefUnwindSafe for BakingScratch
impl Send for BakingScratch
impl Sync for BakingScratch
impl Unpin for BakingScratch
impl UnsafeUnpin for BakingScratch
impl UnwindSafe for BakingScratch
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