Prefix Sums (Scan)

Running totals in parallel — the doubling ladder, exclusive scans, and the offsets every variable-sized output depends on.

6 tasks

  1. The Sum So Far
  2. Everyone Sums Their Own Prefix
  3. The Doubling Ladder
  4. Inclusive, Exclusive, and Why It Matters
  5. Work-Efficient: Upsweep, Downsweep
  6. Payoff: Offsets Place the Data

Start this module →

This page is an interactive exercise — the editor, the GPU runner and your saved progress need JavaScript. The text above is the full brief.