Expand description
CPU-side simulation of a wgpu compute pipeline abstraction.
Provides data layout and dispatch logic that mirrors a typical GPU compute pipeline, with all computation running on the CPU.
Structs§
- Compute
Buffer - A CPU-resident buffer that mirrors a GPU buffer.
- Compute
Pass - A single compute pass in a multi-pass pipeline.
- CpuCompute
Dispatch - Dispatcher that executes compute kernels on the CPU.
- GpuStats
- Accumulated statistics for compute dispatches.
- Multi
Pass Pipeline - A sequence of compute passes that execute in order.
- Pipeline
Cache - A simple LRU-eviction cache for compiled compute pipelines.
- Pipeline
Stats - Fine-grained statistics for compute pipeline usage.
- Workgroup
Size - Workgroup dimensions for a compute dispatch.
Enums§
- Buffer
Usage - Intended usage of a
ComputeBuffer. - Compute
Kernel Kind - The kind of compute kernel to dispatch.
Functions§
- compute_
linf_ residual - Compute the L∞ residual of a 2D Poisson discretisation.
- dispatch_
neighbor_ search - O(n²) neighbor search for 2D interleaved positions
[x0, y0, x1, y1, …]. - jacobi_
step_ 2d - Single Jacobi sweep over an
nx × nypressure grid. - pressure_
poisson_ solve - Iterative Jacobi pressure-Poisson solver.
- red_
black_ gauss_ seidel_ step - Red-black Gauss-Seidel sweep (in-place) on an
nx × nygrid. - sor_
step_ 2d - Single SOR (Successive Over-Relaxation) sweep over an
nx × nygrid. - validate_
pipeline - Validate all passes in a multi-pass pipeline.
- validate_
resource_ bindings - Validate resource bindings for a single compute pass.