This class provides the balanced sliced traversal. More...
#include <LCSlicedBalancedTraversal.h>


Public Member Functions | |
| LCSlicedBalancedTraversal (const std::array< unsigned long, 3 > &dims, PairwiseFunctor &pairwiseFunctor, double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3) | |
| Constructor of the balanced sliced traversal. | |
| void | traverseParticles () override |
| Traverse the particles by pairs, triplets etc. | |
| TraversalOption | getTraversalType () const override |
| Return a enum representing the name of the traversal class. | |
| void | setAoSSortingThreshold (size_t aosSortingThreshold) override |
| Set the aos-sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks. | |
| void | setSoASortingThreshold (size_t soaSortingThreshold) override |
| Set the SoA sorting-threshold for traversals that use the CellFunctor. | |
Public Member Functions inherited from autopas::SlicedBalancedBasedTraversal< ParticleCell, PairwiseFunctor > | |
| SlicedBalancedBasedTraversal (const std::array< unsigned long, 3 > &dims, PairwiseFunctor &functor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3, bool spaciallyForward) | |
| Constructor of the balanced sliced traversal. | |
| void | initSliceThickness (unsigned long minSliceThickness) override |
| Calculates slice thickness according to estimates loads. | |
Public Member Functions inherited from autopas::SlicedLockBasedTraversal< ParticleCell, Functor > | |
| SlicedLockBasedTraversal (const std::array< unsigned long, 3 > &dims, Functor &functor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3, bool spaciallyForward) | |
| Constructor of the sliced traversal. | |
Public Member Functions inherited from autopas::SlicedBasedTraversal< ParticleCell, Functor > | |
| SlicedBasedTraversal (const std::array< unsigned long, 3 > &dims, Functor &functor, const double interactionLength, const std::array< double, 3 > &cellLength, DataLayoutOption dataLayout, bool useNewton3, bool spaciallyForward) | |
| Constructor of the sliced traversal. | |
| bool | isApplicableToDomain () const override |
| Checks if the traversal is applicable to the current state of the domain. | |
| virtual void | initSliceThickness (unsigned long minSliceThickness) |
| Sets up the slice thicknesses to create as many slices as possible while respecting minSliceThickness. | |
| void | initTraversal () override |
| Load Data Layouts and sets up slice thicknesses. | |
| void | endTraversal () override |
| Write Data to AoS if cells have been set through setCellsToTraverse(). | |
Public Member Functions inherited from autopas::CellTraversal< ParticleCell > | |
| CellTraversal (const std::array< unsigned long, 3 > &dims) | |
| Constructor of CellTraversal. | |
| virtual | ~CellTraversal ()=default |
| Destructor of CellTraversal. | |
| virtual void | setCellsToTraverse (std::vector< ParticleCell > &cells) |
| Sets the cells to iterate over. | |
| virtual void | setAoSSortingThreshold (size_t aosSortingThreshold)=0 |
| Set the aos-sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks. | |
| virtual void | setSoASortingThreshold (size_t soaSortingThreshold)=0 |
| Set the SoA sorting-threshold for traversals that use the CellFunctor. | |
Public Member Functions inherited from autopas::TraversalInterface | |
| virtual | ~TraversalInterface ()=default |
| Destructor of TraversalInterface. | |
| TraversalInterface (DataLayoutOption dataLayout, bool useNewton3) | |
| Constructor of the TraversalInterface. | |
| virtual TraversalOption | getTraversalType () const =0 |
| Return a enum representing the name of the traversal class. | |
| virtual bool | isApplicableToDomain () const =0 |
| Checks if the traversal is applicable to the current state of the domain. | |
| virtual void | initTraversal ()=0 |
| Initializes the traversal. | |
| virtual void | traverseParticles ()=0 |
| Traverse the particles by pairs, triplets etc. | |
| virtual void | endTraversal ()=0 |
| Finalizes the traversal. | |
| bool | getUseNewton3 () const |
| Return whether the traversal uses newton 3. | |
| DataLayoutOption | getDataLayout () const |
| Return the data layout option. | |
Public Member Functions inherited from autopas::BalancedTraversal | |
| void | setLoadEstimator (EstimatorFunction loadEstimator) |
| Setter for load estimation algorithm. | |
Additional Inherited Members | |
Public Types inherited from autopas::BalancedTraversal | |
| using | EstimatorFunction = std::function< unsigned long(const std::array< unsigned long, 3 > &, const std::array< unsigned long, 3 > &, const std::array< unsigned long, 3 > &)> |
| Type signature for load estimators. | |
Protected Member Functions inherited from autopas::SlicedLockBasedTraversal< ParticleCell, Functor > | |
| template<typename LoopBody > | |
| void | slicedTraversal (LoopBody &&loopBody) |
| The main traversal of the sliced traversal. | |
Protected Member Functions inherited from autopas::SlicedBasedTraversal< ParticleCell, Functor > | |
| void | init () |
| Resets the cell structure of the traversal. | |
| virtual void | loadDataLayout () |
| Load Data Layouts required for this Traversal if cells have been set through setCellsToTraverse(). | |
| void | reinitForVCL (const VerletClusterLists< typename ParticleCell::ParticleType > *vcl) |
| Update cell information based on VerletClusterLists. | |
Protected Attributes inherited from autopas::SlicedLockBasedTraversal< ParticleCell, Functor > | |
| bool | _dynamic = true |
| whether to use static or dynamic scheduling. | |
Protected Attributes inherited from autopas::SlicedBasedTraversal< ParticleCell, Functor > | |
| std::array< unsigned long, 3 > | _overlap |
| Overlap of interacting cells. | |
| std::array< int, 3 > | _dimsSortedByLength |
| Store ids of dimensions (0, 1, 2 = x, y, z) sorted by in decreasing order of number of cells in that dimension. | |
| unsigned long | _overlapLongestAxis |
| Overlap of interacting cells along the longest axis. | |
| std::vector< unsigned long > | _sliceThickness |
| The number of cells per slice in the dimension that was sliced. | |
| bool | _spaciallyForward |
| Whether the base step only covers neigboring cells tha are spacially forward (for example c08). | |
| std::array< double, 3 > | _cellLength |
| Cell length in CellBlock3D. | |
Protected Attributes inherited from autopas::CellTraversal< ParticleCell > | |
| std::array< unsigned long, 3 > | _cellsPerDimension |
| The dimensions of the cellblock. | |
| std::vector< ParticleCell > * | _cells |
| The cells to traverse. | |
Protected Attributes inherited from autopas::TraversalInterface | |
| DataLayoutOption | _dataLayout |
| The datalayout used by this traversal. | |
| bool | _useNewton3 |
| If this traversal makes use of newton3. | |
Protected Attributes inherited from autopas::BalancedTraversal | |
| EstimatorFunction | _loadEstimator |
| Algorithm to use for estimating load. | |
This class provides the balanced sliced traversal.
The traversal finds the longest dimension of the simulation domain and cuts the domain along this dimension in one slice (block) per thread. The cut positions are calculated to even out load among the threads. Slices are assigned to the threads in a round robin fashion. Each thread locks the cells on the boundary wall to the previous slice with one lock. This lock is lifted as soon the boundary wall is fully processed.
| ParticleCell | the type of cells |
| PairwiseFunctor | The functor that defines the interaction of two particles. |
|
inlineexplicit |
Constructor of the balanced sliced traversal.
| dims | The dimensions of the cellblock, i.e. the number of cells in x, y and z direction. |
| pairwiseFunctor | The functor that defines the interaction of two particles. |
| interactionLength | Interaction length (cutoff + skin). |
| cellLength | cell length. |
| dataLayout | The data layout with which this traversal should be initialized. |
| useNewton3 | Parameter to specify whether the traversal makes use of newton3 or not. |
|
inlineoverridevirtual |
Return a enum representing the name of the traversal class.
Implements autopas::TraversalInterface.
|
inlineoverridevirtual |
Set the aos-sorting-threshold for traversals that use the CellFunctor If the sum of the number of particles in two cells is greater or equal to that value, the CellFunctor creates a sorted view of the particles to avoid unnecessary distance checks.
| aosSortingThreshold | Sum of the number of particles in two cells from which sorting should be enabled |
Implements autopas::CellTraversal< ParticleCell >.
|
inlineoverridevirtual |
Set the SoA sorting-threshold for traversals that use the CellFunctor.
If the sum of the SoA buffer sizes of two cells exceeds this value, the SoA path uses SoAFunctorPairSorted. Traversals that hold a CellFunctor should forward to it; others should explicitly override with an empty body.
Implements autopas::CellTraversal< ParticleCell >.
|
inlineoverridevirtual |
Traverse the particles by pairs, triplets etc.
as determined by the Functor type.
Implements autopas::TraversalInterface.