AutoPas  3.0.0
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
autopas::SortingThresholdInfo2B Struct Reference

Per-Newton3-state, per-SortingDirectionOption pair-sorting thresholds for a 2-body CellFunctor. More...

#include <SortingThresholdInfo2B.h>

Inheritance diagram for autopas::SortingThresholdInfo2B:
Inheritance graph
[legend]
Collaboration diagram for autopas::SortingThresholdInfo2B:
Collaboration graph
[legend]

Public Member Functions

 SortingThresholdInfo2B (size_t uniformThreshold)
 Constructor setting every Newton3-state / SortingDirectionOption / bidirectional combination to the same value.
 
 SortingThresholdInfo2B (size_t noN3FaceThresholdBidirectional, size_t noN3FaceThresholdUnidirectional, size_t noN3EdgeThresholdBidirectional, size_t noN3EdgeThresholdUnidirectional, size_t noN3CornerThresholdBidirectional, size_t noN3CornerThresholdUnidirectional, size_t n3FaceThreshold, size_t n3EdgeThreshold, size_t n3CornerThreshold)
 Constructor to set each per Newton3/CellDirection/bidirectional combination value explicitly.
 
size_t getThresholdByConfig (bool newton3, std::array< double, 3 > sortingDirection, bool bidirectional) const
 Getter to automatically get the correct threshold based on current newton3/CellDirection/bidirectional configuration.
 
void setThresholdByOption (Newton3Option n3, SortingDirectionOption cellDirection, bool bidirectional, size_t value)
 Setter to set struct values by configuration, represented by options.
 
- Public Member Functions inherited from autopas::SortingThresholdInfoInterface
virtual ~SortingThresholdInfoInterface ()=default
 Default destructor to make this a pure virtual struct.
 

Public Attributes

size_t noN3FaceThresholdBidirectional
 Threshold for config {n3: off, cellDirection: Face, bidirectional: true}.
 
size_t noN3FaceThresholdUnidirectional
 Threshold for config {n3: off, cellDirection: Face, bidirectional: false}.
 
size_t noN3EdgeThresholdBidirectional
 Threshold for config {n3: off, cellDirection: Edge, bidirectional: true}.
 
size_t noN3EdgeThresholdUnidirectional
 Threshold for config {n3: off, cellDirection: Edge, bidirectional: false}.
 
size_t noN3CornerThresholdBidirectional
 Threshold for config {n3: off, cellDirection: Corner, bidirectional: true}.
 
size_t noN3CornerThresholdUnidirectional
 Threshold for config {n3: off, cellDirection: Corner, bidirectional: false}.
 
size_t n3FaceThreshold
 Threshold for config {n3: on, cellDirection: Face}.
 
size_t n3EdgeThreshold
 Threshold for config {n3: on, cellDirection: Edge}.
 
size_t n3CornerThreshold
 Threshold for config {n3: on, cellDirection: Corner}.
 

Detailed Description

Per-Newton3-state, per-SortingDirectionOption pair-sorting thresholds for a 2-body CellFunctor.

Provides publicly accessible named data as well as a getter to easily get the correct Value from a configuration.

Constructor & Destructor Documentation

◆ SortingThresholdInfo2B() [1/2]

autopas::SortingThresholdInfo2B::SortingThresholdInfo2B ( size_t  uniformThreshold)
inlineexplicit

Constructor setting every Newton3-state / SortingDirectionOption / bidirectional combination to the same value.

Parameters
uniformThresholdThreshold value applied to all nine combinations.

◆ SortingThresholdInfo2B() [2/2]

autopas::SortingThresholdInfo2B::SortingThresholdInfo2B ( size_t  noN3FaceThresholdBidirectional,
size_t  noN3FaceThresholdUnidirectional,
size_t  noN3EdgeThresholdBidirectional,
size_t  noN3EdgeThresholdUnidirectional,
size_t  noN3CornerThresholdBidirectional,
size_t  noN3CornerThresholdUnidirectional,
size_t  n3FaceThreshold,
size_t  n3EdgeThreshold,
size_t  n3CornerThreshold 
)
inline

Constructor to set each per Newton3/CellDirection/bidirectional combination value explicitly.

Newton3-on values are not split by bidirectional, since bidirectional only affects the measured timing when Newton3 is off.

Parameters
noN3FaceThresholdBidirectional
noN3FaceThresholdUnidirectional
noN3EdgeThresholdBidirectional
noN3EdgeThresholdUnidirectional
noN3CornerThresholdBidirectional
noN3CornerThresholdUnidirectional
n3FaceThreshold
n3EdgeThreshold
n3CornerThreshold

Member Function Documentation

◆ getThresholdByConfig()

size_t autopas::SortingThresholdInfo2B::getThresholdByConfig ( bool  newton3,
std::array< double, 3 >  sortingDirection,
bool  bidirectional 
) const
inline

Getter to automatically get the correct threshold based on current newton3/CellDirection/bidirectional configuration.

bidirectional is ignored when newton3 is enabled, since it does not affect the timing of the newton3-on path (see SortingThresholdBenchmark).

Parameters
newton3whether the newton3 optimization is enabled or not.
sortingDirectionthe cell axis used for sorting. CellDirection is deduced from this.
bidirectionalwhether the CellFunctor processing this cell pair needs to compute both interaction directions itself. Only relevant when newton3 is disabled.
Returns
correct threshold value for the given configuration.

◆ setThresholdByOption()

void autopas::SortingThresholdInfo2B::setThresholdByOption ( Newton3Option  n3,
SortingDirectionOption  cellDirection,
bool  bidirectional,
size_t  value 
)
inline

Setter to set struct values by configuration, represented by options.

bidirectional is ignored when n3 is Newton3Option::enabled, since it does not affect the timing of the newton3-on path (see SortingThresholdBenchmark).

Parameters
n3Whether the Newton3 optimization is used.
cellDirectionHow the cells are placed in relation to each other.
bidirectionalWhether the CellFunctor processing this cell pair needs to compute both interaction directions itself. Only relevant when n3 is Newton3Option::disabled.
valueThe value to set.

The documentation for this struct was generated from the following file: