Week 14 — Coding Projects

Core

Implement inclusive and exclusive scan.

  • NumPy: Implement scan sequentially. Use it to solve stream compaction or histogram prefix problems.
  • Metal: Implement Blelloch scan or Hillis-Steele scan. Use scan for stream compaction. · Reading: MBT — advanced compute patterns, multi-pass buffer algorithms.
  • Vulkan: Compute-based scan with multi-dispatch orchestration. · Reading: Vulkan Book — prefix-scan friendly workgroup structure, multi-dispatch orchestration.
  • CUDA: Parallel scan with hierarchical structure for large arrays. · Reading: CUDA Book — scan/prefix-sum patterns, hierarchical scans.
  • Stretch: Use scan to build radix-sort components. Add segmented scan if ambitious.
  • Verify: Inclusive and exclusive outputs are correct · Stream compaction preserves order · Work decomposition is understood.