#include <Functor.h>

Public Types | |
| using | SoAArraysType = typename Particle_T::SoAArraysType |
| Structure of the SoAs defined by the particle. | |
| using | Functor_T = CRTP_T |
| Make the Implementation type template publicly available. | |
Public Member Functions | |
| Functor (double cutoff) | |
| Constructor. | |
| virtual void | initTraversal () |
| This function is called at the start of each traversal. | |
| virtual void | endTraversal (bool newton3) |
| This function is called at the end of each traversal. | |
| template<class ParticleCell > | |
| void | SoALoader (ParticleCell &cell, SoA< SoAArraysType > &soa, size_t offset, bool skipSoAResize) |
| Copies the AoS data of the given cell in the given soa. | |
| template<typename ParticleCell > | |
| void | SoAExtractor (ParticleCell &cell, SoA< SoAArraysType > &soa, size_t offset) |
| Copies the data stored in the soa back into the cell. | |
| virtual bool | allowsNewton3 ()=0 |
| Specifies whether the functor is capable of Newton3-like functors. | |
| virtual bool | allowsNonNewton3 ()=0 |
| Specifies whether the functor is capable of non-Newton3-like functors. | |
| virtual bool | isVecPatternAllowed (const VectorizationPatternOption::Value vecPattern)=0 |
| Specifies whether the functor is capable of using the specified Vectorization Pattern in the SoA functor. | |
| virtual bool | isRelevantForTuning ()=0 |
| Specifies whether the functor should be considered for the auto-tuning process. | |
| virtual std::string | getName ()=0 |
| Returns name of functor. | |
| double | getCutoff () const |
| Getter for the functor's cutoff. | |
| virtual void | setVecPattern (const VectorizationPatternOption::Value vecPattern) |
| Setter for the vectorization pattern to be used. | |
| virtual size_t | getNumFLOPs () const |
| Get the number of FLOPs. | |
| virtual double | getHitRate () const |
| Get the hit rate. | |
Static Public Member Functions | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getNeededAttr () |
| Get attributes needed for computation. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getNeededAttr (std::false_type) |
| Get attributes needed for computation without N3 optimization. | |
| static constexpr std::array< typename Particle_T::AttributeNames, 0 > | getComputedAttr () |
| Get attributes computed by this functor. | |
Functor base class.
Both an array of structure (AoS) and a structure of array (SoA) are supported to be used with functors. Newton3: A functor does not have to implement both a newton3 and a non-newton3 version. Instead you can specify, which version you use by overriding allowsNonNewton3 resp. allowsNewton3
| Particle_T | the type of Particle |
| CRTP_T | the actual type of the functor |
|
inlineexplicit |
Constructor.
| cutoff |
|
pure virtual |
Specifies whether the functor is capable of Newton3-like functors.
If the functor provides an interface to soa or aos functions that utilize Newton's third law of motion (actio = reactio) to reduce the computational complexity this function should return true. If this is not the case this function should return false.
Implemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, sphLib::SPHCalcDensityFunctor< Particle_T >, sphLib::SPHCalcHydroForceFunctor< Particle_T >, autopas::internal::AsBuildPairGeneratorFunctor< Particle_T, callCheckInstead >, autopas::VerletListHelpers< Particle_T >::VerletListGeneratorFunctor, autopas::VerletListHelpers< Particle_T >::VerletListValidityCheckerFunctor, and EmptyPairwiseFunctor< Particle_T >.
|
pure virtual |
Specifies whether the functor is capable of non-Newton3-like functors.
If the functor provides an interface to soa or aos functions that do not utilize Newton's third law of motion (actio = reactio) this function should return true. If this is not the case this function should return false.
Implemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, sphLib::SPHCalcDensityFunctor< Particle_T >, sphLib::SPHCalcHydroForceFunctor< Particle_T >, autopas::internal::AsBuildPairGeneratorFunctor< Particle_T, callCheckInstead >, autopas::VerletListHelpers< Particle_T >::VerletListGeneratorFunctor, autopas::VerletListHelpers< Particle_T >::VerletListValidityCheckerFunctor, and EmptyPairwiseFunctor< Particle_T >.
|
inlinevirtual |
This function is called at the end of each traversal.
You may accumulate values in this step.
| newton3 |
Reimplemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, and mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >.
|
inlinestaticconstexpr |
Get attributes computed by this functor.
|
inline |
Getter for the functor's cutoff.
|
inlinevirtual |
Get the hit rate.
Implementation required if FLOPLogger used.
If derived class provides no implementation, the FLOPLogger interprets the default NaN output as invalid and leaves "Not Implemented" in the log.
Reimplemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, and mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >.
|
pure virtual |
Returns name of functor.
Intended for use with the iteration logger, to differentiate between calls to computeInteractions using different functors in the logs.
Implemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, sphLib::SPHCalcDensityFunctor< Particle_T >, sphLib::SPHCalcHydroForceFunctor< Particle_T >, autopas::internal::AsBuildPairGeneratorFunctor< Particle_T, callCheckInstead >, autopas::VerletListHelpers< Particle_T >::VerletListGeneratorFunctor, autopas::VerletListHelpers< Particle_T >::VerletListValidityCheckerFunctor, and EmptyPairwiseFunctor< Particle_T >.
|
inlinestaticconstexpr |
Get attributes needed for computation.
|
inlinestaticconstexpr |
Get attributes needed for computation without N3 optimization.
|
inlinevirtual |
Get the number of FLOPs.
Implementation required if FLOPLogger used.
If derived class provides no implementation, the FLOPLogger interprets the default numeric_limits<size_t>::max() output as invalid and leaves "Not Implemented" the log.
Reimplemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, and mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >.
|
inlinevirtual |
This function is called at the start of each traversal.
Use it for resetting global values or initializing them.
Reimplemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, and mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >.
|
pure virtual |
Specifies whether the functor should be considered for the auto-tuning process.
Implemented in mdLib::AxilrodTellerMutoFunctor< Particle_T, useMixing, useNewton3, calculateGlobals, countFLOPs >, mdLib::LJFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorAVX< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorHWY< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJFunctorSVE< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, mdLib::LJMultisiteFunctor< Particle_T, applyShift, useMixing, useNewton3, calculateGlobals, countFLOPs, relevantForTuning >, sphLib::SPHCalcDensityFunctor< Particle_T >, sphLib::SPHCalcHydroForceFunctor< Particle_T >, autopas::internal::AsBuildPairGeneratorFunctor< Particle_T, callCheckInstead >, autopas::VerletListHelpers< Particle_T >::VerletListGeneratorFunctor, autopas::VerletListHelpers< Particle_T >::VerletListValidityCheckerFunctor, and EmptyPairwiseFunctor< Particle_T >.
|
pure virtual |
Specifies whether the functor is capable of using the specified Vectorization Pattern in the SoA functor.
| vecPattern |
Implemented in autopas::PairwiseFunctor< Particle_T, CRTP_T >, autopas::PairwiseFunctor< Particle_T, EmptyPairwiseFunctor< Particle_T > >, autopas::PairwiseFunctor< Particle_T, VerletListGeneratorFunctor >, autopas::PairwiseFunctor< Particle_T, VerletListValidityCheckerFunctor >, autopas::PairwiseFunctor< Particle_T, AsBuildPairGeneratorFunctor< Particle_T, false > >, autopas::PairwiseFunctor< Particle_T, LJFunctor< Particle_T, false, false, autopas::FunctorN3Modes::Both, false, false, true > >, autopas::PairwiseFunctor< Particle_T, LJFunctorAVX< Particle_T, false, false, autopas::FunctorN3Modes::Both, false, false, true > >, autopas::PairwiseFunctor< Particle_T, LJFunctorHWY< Particle_T, false, false, autopas::FunctorN3Modes::Both, false, false, true > >, autopas::PairwiseFunctor< Particle_T, LJFunctorSVE< Particle_T, false, false, autopas::FunctorN3Modes::Both, false, false, true > >, autopas::PairwiseFunctor< Particle_T, LJMultisiteFunctor< Particle_T, false, false, autopas::FunctorN3Modes::Both, false, true, false > >, autopas::PairwiseFunctor< Particle_T, SPHCalcDensityFunctor< Particle_T > >, autopas::PairwiseFunctor< Particle_T, SPHCalcHydroForceFunctor< Particle_T > >, autopas::TriwiseFunctor< Particle_T, CRTP_T >, and autopas::TriwiseFunctor< Particle_T, AxilrodTellerMutoFunctor< Particle_T, false, autopas::FunctorN3Modes::Both, false, false > >.
|
inlinevirtual |
Setter for the vectorization pattern to be used.
| vecPattern |
|
inline |
Copies the data stored in the soa back into the cell.
| cell | Cell where the data should be stored. |
| soa | Structure of arrays from where the data is loaded. |
| offset | Offset within the SoA. The data of the soa should be extracted starting at offset. |
| ParticleCell | Type of the cell. |
|
inline |
Copies the AoS data of the given cell in the given soa.
| cell | Cell from where the data is loaded. |
| soa | Structure of arrays where the data is copied to. |
| offset | Offset within the SoA. The data of the cell should be added to the SoA with the specified offset. |
| skipSoAResize | If resizing of the SoA buffers should be skipped or not. If this is called with true, it must be ensured before the call that there is sufficient capacity in the SoA. |
| ParticleCell | Type of the cell. |