Expand description
RnsBatch — the single flat buffer format shared by both backends.
Having one canonical layout means there is no reformatting when switching
between the CPU (rayon) and GPU (wgpu) backends: residues are stored natively
as u32 (every basis prime is < 2^16), so the GPU storage buffer is this
struct’s data and the bytemuck cast is genuinely zero-copy.
Layout is row-major [batch_size × n_channels]: element
data[b * n_channels + c] is the residue of item b in channel c.
Structs§
- RnsBatch
- A batch of RNS values in a flat, backend-agnostic
u32buffer.