Skip to main content

Module compute_pipeline

Module compute_pipeline 

Source
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§

ComputeBuffer
A CPU-resident buffer that mirrors a GPU buffer.
ComputePass
A single compute pass in a multi-pass pipeline.
CpuComputeDispatch
Dispatcher that executes compute kernels on the CPU.
GpuStats
Accumulated statistics for compute dispatches.
MultiPassPipeline
A sequence of compute passes that execute in order.
PipelineCache
A simple LRU-eviction cache for compiled compute pipelines.
PipelineStats
Fine-grained statistics for compute pipeline usage.
WorkgroupSize
Workgroup dimensions for a compute dispatch.

Enums§

BufferUsage
Intended usage of a ComputeBuffer.
ComputeKernelKind
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 × ny pressure grid.
pressure_poisson_solve
Iterative Jacobi pressure-Poisson solver.
red_black_gauss_seidel_step
Red-black Gauss-Seidel sweep (in-place) on an nx × ny grid.
sor_step_2d
Single SOR (Successive Over-Relaxation) sweep over an nx × ny grid.
validate_pipeline
Validate all passes in a multi-pass pipeline.
validate_resource_bindings
Validate resource bindings for a single compute pass.