Why it matters

Prefix sum unlocks many parallel algorithms. Understanding shapes parallel computing.

Advertisement

The architecture

Up-sweep: build tree of partial sums.

Down-sweep: propagate sums.

Work-efficient O(n).

Blelloch scan flowUp-sweepbuild sum treeSet root to 0clear rootDown-sweeppropagateCUDA CUB + Thrust scan primitives; foundation for compaction, sort, histogram
Parallel prefix sum.
Advertisement

How it works end to end

Blelloch 1990.

Hillis-Steele: O(n log n) work, simpler.

CUDA CUB scan library.

Warp-level primitives.