Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
benches formatting Jul 23, 2018
src fix unused Result in nbody example Nov 9, 2018
Cargo.toml Update examples to use core_arch Jan 31, 2019
readme.md improve docs of mandelbrot and nbody Aug 2, 2018

readme.md

N-Body

This is the n-body benchmark from the benchmarksgame. It models the orbits of Jovian planets, using the same simple symplectic-integrator.

Usage

It takes two arguments in this order:

  • n: the number of iterations to perform
  • (optional) algorithm: the algorithm to use - defaults to the fastest one.
    • 0: scalar algorithm
    • 1: SIMD algorithm

Implementation

There are three kernels, two of which are only run twice independently of the number of iterations (offset_momentum and energy). The advance kernel is run once per iterations and uses 100% of the running time.