Examples /

Prefix sum + reduction

Exclusive scan and reduction, with checked u32 results.

EXCLUSIVE PREFIX SUM

————————
Sum —

GPU results are verified against u32 CPU arithmetic. Nothing is sent to a server.

Ready to dispatchwgpu-kit 2.2.0

How it works

createScan computes exclusive prefix sums and createReduce sums the same input. Readback is intentional here: the UI displays and checks the numeric results. Overflow follows u32 wraparound semantics.

Read the related guide →

Search concepts, APIs, and examples