|
Orrery
A GPU-accelerated N-body gravitational simulator
|
The unit in which the cost of a force evaluation is reported. More...
#include <cstdint>Go to the source code of this file.
Classes | |
| struct | orrery::solvers::InteractionCount |
| What a solver has done since the count was last reset. More... | |
The unit in which the cost of a force evaluation is reported.
The whole point of a tree solver is that it computes fewer interactions than direct summation for an answer that is nearly as good, and the whole point of keeping the direct solver afterwards is to say how much nearly is. Neither statement can be made in seconds. A timing compares two implementations on one machine on one afternoon, and it moves with the thread count, the vector width, the memory layout and the temperature of the laptop. An interaction count is a property of the algorithm alone: it is the same number on any machine, it is what the O(N^2) and O(N log N) in the two names refer to, and it is the denominator that turns a timing into a rate that can be put beside the roofline of Phase 7.
So the counter is written now, in the phase that has only one algorithm to count, rather than in Phase 8 where it would arrive alongside the result it is meant to substantiate.