Determines the per-Newton3-state, per-direction-type particle-count threshold at which using a sorted cell-pair interaction path becomes faster than the unsorted path, separately for the AoS path (SortedCellView vs.
More...
|
| | SortingThresholdBenchmark (size_t aosSortingThresholdDefault, size_t soaSortingThresholdDefault) |
| | Constructs a benchmark whose thresholds default to the given uniform values until/unless a benchmark run overwrites them.
|
| |
| std::shared_ptr< const SortingThresholdInfoInterface > | getSoAThreshold () const |
| | Return all per-Newton3-state, per-direction-type SoA sorting thresholds if hasRunSoA() is true, otherwise the uniform default passed to the constructor.
|
| |
| std::shared_ptr< const SortingThresholdInfoInterface > | getAoSThreshold () const |
| | Return all per-Newton3-state, per-direction-type AoS pair-sorting thresholds if hasRunAoS() is true, otherwise the uniform default passed to the constructor.
|
| |
| bool | hasRunSoA () const |
| | Returns whether runSoABenchmark() has already been called.
|
| |
| bool | hasRunAoS () const |
| | Returns whether runAoSBenchmark() has already been called.
|
| |
| template<class Functor_T , class Particle_T > |
| void | runSoABenchmark (Functor_T &functor, const Particle_T &defaultParticle) |
| | Runs the micro-benchmark for the SoA sorting threshold, sweeping both Newton3 (and bidirectional for N3Off) states and all three direction types, and storing the resulting thresholds.
|
| |
| template<class Functor_T , class Particle_T > |
| void | runAoSBenchmark (Functor_T &functor, const Particle_T &defaultParticle) |
| | Runs the micro-benchmark for the AoS sorting threshold, sweeping both Newton3 (and bidirectional for N3Off) states and all three direction types, and storing the resulting thresholds.
|
| |
Determines the per-Newton3-state, per-direction-type particle-count threshold at which using a sorted cell-pair interaction path becomes faster than the unsorted path, separately for the AoS path (SortedCellView vs.
the unsorted double loop) and the SoA path (SoAFunctorPairSorted vs. SoAFunctorPair).
The AoS half is benchmarked for any pairwise functor. The SoA half is only benchmarked for functors with Functor_T::supportsSoASorting == true (see runSoABenchmark()).
Stores one threshold per Newton3 state and direction type.
The search performed in runSearch() is deliberately biased towards a conservative (higher) threshold, to avoid noisy measurements influencing the threshold to be too low. A too low threshold would actively regress performance while a too high threshold would at worst still perform the same as baseline. One goal of these thresholds is to avoid any performance regression against the non sorted case.
template<class Functor_T , class Particle_T >
| void autopas::SortingThresholdBenchmark::runAoSBenchmark |
( |
Functor_T & |
functor, |
|
|
const Particle_T & |
defaultParticle |
|
) |
| |
|
inline |
Runs the micro-benchmark for the AoS sorting threshold, sweeping both Newton3 (and bidirectional for N3Off) states and all three direction types, and storing the resulting thresholds.
Sets hasRunAoS() to true.
- Template Parameters
-
| Functor_T | Pairwise functor type. |
| Particle_T | Particle type. |
- Parameters
-
| functor | Functor instance used to drive the benchmark cells. |
| defaultParticle | Template particle (e.g. sampled from the particle container) whose non-positional properties are copied onto every particle generated for the benchmark cells. |
template<class Functor_T , class Particle_T >
| void autopas::SortingThresholdBenchmark::runSoABenchmark |
( |
Functor_T & |
functor, |
|
|
const Particle_T & |
defaultParticle |
|
) |
| |
|
inline |
Runs the micro-benchmark for the SoA sorting threshold, sweeping both Newton3 (and bidirectional for N3Off) states and all three direction types, and storing the resulting thresholds.
Sets hasRunSoA() to true. Callers should only instantiate this for functors with Functor_T::supportsSoASorting == true.
- Template Parameters
-
| Functor_T | Pairwise functor type. |
| Particle_T | Particle type. |
- Parameters
-
| functor | Functor instance used to drive the benchmark cells. |
| defaultParticle | Template particle (e.g. sampled from the particle container) whose non-positional properties are copied onto every particle generated for the benchmark cells. |