AutoPas  3.0.0
Loading...
Searching...
No Matches
VectorizationPatternOption.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <set>
10
12
13namespace autopas {
14inline namespace options {
15
26class VectorizationPatternOption : public Option<VectorizationPatternOption> {
27 public:
31 enum Value {
36
76 pVecx1
77 };
78
83
88 constexpr VectorizationPatternOption(Value option) : _value(option) {}
89
94 constexpr operator Value() const { return _value; }
95
100 static std::set<VectorizationPatternOption> getDiscouragedOptions() { return {}; }
101
106 static std::set<VectorizationPatternOption> getAllApplicablePatterns() {
107 auto s = getAllOptions();
108 s.erase(NA);
109 return s;
110 }
111
116 static std::map<VectorizationPatternOption, std::string> getOptionNames() {
117 return {
118 {NA, "NotApplicable"},
119 {p1xVec, "1xVectorLength"},
120 {p2xVecDiv2, "2xVectorLengthDiv2"},
121 {pVecDiv2x2, "VectorLengthDiv2x2"},
122 {pVecx1, "VectorLengthx1"},
123 };
124 }
125
126 private:
127 Value _value{Value(-1)};
128};
129
130} // namespace options
131} // namespace autopas
Base class for autopas options.
Definition: Option.h:26
static std::set< VectorizationPatternOption > getAllOptions()
Provides a way to iterate over the possible options.
Definition: Option.h:38
Class representing the choices of possible vectorization patterns for the Pairwise Functors.
Definition: VectorizationPatternOption.h:26
Value
Possible choices for the vector patterns.
Definition: VectorizationPatternOption.h:31
@ pVecDiv2x2
Interact half the vector length from the first list with two particles from the second list.
Definition: VectorizationPatternOption.h:66
@ p1xVec
Interact one particle from the first list with the full vector length from the second list.
Definition: VectorizationPatternOption.h:46
@ NA
Not Applicable.
Definition: VectorizationPatternOption.h:35
@ pVecx1
Interact the full vector length from the first list with one particle from the second list.
Definition: VectorizationPatternOption.h:76
@ p2xVecDiv2
Interact two particles from the first list with half the vector length from the second list.
Definition: VectorizationPatternOption.h:56
static std::set< VectorizationPatternOption > getDiscouragedOptions()
Set of options that are very unlikely to be interesting.
Definition: VectorizationPatternOption.h:100
static std::map< VectorizationPatternOption, std::string > getOptionNames()
Provides a way to iterate over the possible choices of Vectorization Patterns.
Definition: VectorizationPatternOption.h:116
static std::set< VectorizationPatternOption > getAllApplicablePatterns()
Set of all options, excluding NA (not applicable).
Definition: VectorizationPatternOption.h:106
constexpr VectorizationPatternOption(Value option)
Constructor from value.
Definition: VectorizationPatternOption.h:88
VectorizationPatternOption()=default
Constructor.
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:34