pub struct DsaSelectScratch { /* private fields */ }Expand description
Scratch the pipeline writes through, allocated once and reused across steps.
Sized from a worst-case geometry so a growing context never reallocates mid-serve;
Self::fits refuses a pass that would outgrow it rather than overrunning.
Implementations§
Source§impl DsaSelectScratch
impl DsaSelectScratch
Sourcepub fn alloc(
gpu: &dyn GpuBackend,
cfg: &Glm5NextDsaConfig,
geom: &DsaSelectGeometry,
) -> Result<Self>
pub fn alloc( gpu: &dyn GpuBackend, cfg: &Glm5NextDsaConfig, geom: &DsaSelectGeometry, ) -> Result<Self>
Allocate for the worst case this layer will ever see.
Sourcepub fn row(&self, row: usize, cfg: &Glm5NextDsaConfig) -> Self
pub fn row(&self, row: usize, cfg: &Glm5NextDsaConfig) -> Self
The same scratch with tokens pointing at row row.
A K-row verify selects one row at a time (q_rows == 1) but attends all K rows in
one launch, so each pass has to land in its own slot of the [max_rows, out_width]
output instead of all of them overwriting row 0. Everything else in the scratch is a
within-pass temporary and is deliberately shared.
Sourcepub fn fits(
&self,
cfg: &Glm5NextDsaConfig,
geom: &DsaSelectGeometry,
) -> Result<()>
pub fn fits( &self, cfg: &Glm5NextDsaConfig, geom: &DsaSelectGeometry, ) -> Result<()>
Whether geom fits what was allocated. Checked on every pass: a context that
grew past the reservation must fail loudly, not scribble past a buffer — the
A25 recv-buffer class of bug.
pub fn free(self, gpu: &dyn GpuBackend) -> Result<()>
Trait Implementations§
Source§impl Clone for DsaSelectScratch
impl Clone for DsaSelectScratch
Source§fn clone(&self) -> DsaSelectScratch
fn clone(&self) -> DsaSelectScratch
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more