Compute an 8-bit grayscale histogram three ways: global atomics, per-warp privatization, and per-block shared-memory privatization.
// PREREQUISITES
// PROJECT PHASES
Global-memory atomics
atomicAdd directly into a 256-bin global histogram.
Shared-memory privatization
Each block maintains its own histogram in shared memory.
Warp-level privatization
Each warp maintains separate bins.
Benchmark
Measure atomic contention at different input sizes.
// SANDBOX
GPU execution// EXPECTED OUTPUT
Global atomics: 48 ms (~330 Mpix/s) Shared memory: 12 ms (~1.3 Gpix/s)
// YOUR PROGRESS
Log in to save progress
// DETAILS
// MORE IN ALGORITHMS
// LEARN THE THEORY
Algorithms concepts