This repo contains my experiments with implementing N-Body simulations in Odin. The goal is to investigate the algorithms used and the approaches to optimization that are effective for them.
To run the demo:
odin run .
I recommend using the optimization flag speed: odin run . -o:speed
Also included in the src/utils.odin file are some benchmarking functions of varying usefulness. This should definitely be run with the speed optimization flag:
odin run ./src -o:speed
- Baseline
- SOA (?)
- Multi-threading
- SIMD
- Compute shader
- Baseline
- Particle Reordering
- Threaded force accumulation
- Threaded tree building (?)
- Compute Shader
The core functionality currently has no third party dependencies, but the basic visualization present in the main function relies on having my work in progress game framework/engine dial