Custom CUDA reduction, scan, stream compaction, and radix sort, benchmarked against Thrust and OpenMP, driving a real-time boids simulation rendered via CUDA-Vulkan interop.
  • C++ 93.4%
  • CMake 6.6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-03 00:44:51 -05:00
src Implement reduce and prefix-sum for single-thread CPU 2026-11-03 00:06:13 -05:00
tests Add unit tests for reduce and prefix-sum (CPU and OpenMP implementations) 2026-11-03 00:39:34 -05:00
.gitignore Add GoogleTests into CMake, from Google's tutorial 2026-10-29 18:36:27 -04:00
CMakeLists.txt Implement reduce and prefix-sum for single-thread CPU 2026-11-03 00:06:13 -05:00
CMakePresets.json Add GoogleTests into CMake, from Google's tutorial 2026-10-29 18:36:27 -04:00
README.md Add milestones plan in README.md 2026-11-03 00:39:58 -05:00

Plan

Milestones

  1. Implement and unit test reduction and prefix-sum on the CPU (single/multi threaded)
  2. Implement and unit test reduction and prefix-sum on the GPU (naive and optimized)
  3. Benchmark GPU code against Thrust and generate Nsight performance numbers
  4. Implement, unit test and benchmark stream compaction on CPU and GPU
  5. Implement, unit test and benchmark radix sort on CPU and GPU
  6. CPU (single thread) boid simulation (just console output)
  7. OpenMP boid simulation and compare performance (just console output)
  8. Vulkan renderer
  9. CUDA naive boid simulation
  10. CUDA optimized boid simulation
  11. Debug overlays (age color, bounding box wireframe, grid heatmap toggle), backend hotkey switch, config-based max counts per backend
  12. Benchmark harness automation (Nsight Compute/Systems capture scripts, chart generation), README writeup, screen-capture video

How to Run

Run CMake

cmake --preset release

Then, either build the simulation...

cmake --build --preset simulation

... or the benchmark code

cmake --build --preset benchmark

To run the simulation...

build/simulation

... or the benchmark

build/benchmark

Test

Run CMake and build

cmake --preset dev
cmake --build --preset dev

Then run the tests

ctest --preset dev