AutoPas  3.0.0
Loading...
Searching...
No Matches
DataLayoutOption.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <set>
10
12
13namespace autopas {
14inline namespace options {
18class DataLayoutOption : public Option<DataLayoutOption> {
19 public:
23 enum Value {
32 };
33
37 DataLayoutOption() = default;
38
43 constexpr DataLayoutOption(Value option) : _value(option) {}
44
49 constexpr operator Value() const { return _value; }
50
55 static std::set<DataLayoutOption> getDiscouragedOptions() { return {}; }
56
61 static std::map<DataLayoutOption, std::string> getOptionNames() {
62 return {
63 {DataLayoutOption::aos, "AoS"},
64 {DataLayoutOption::soa, "SoA"},
65 };
66 };
67
68 private:
69 Value _value{Value(-1)};
70};
71} // namespace options
72} // namespace autopas
Class representing the traversal choices.
Definition: DataLayoutOption.h:18
constexpr DataLayoutOption(Value option)
Constructor from value.
Definition: DataLayoutOption.h:43
static std::set< DataLayoutOption > getDiscouragedOptions()
Set of options that are very unlikely to be interesting.
Definition: DataLayoutOption.h:55
static std::map< DataLayoutOption, std::string > getOptionNames()
Provides a way to iterate over the possible choices of TraversalOption.
Definition: DataLayoutOption.h:61
DataLayoutOption()=default
Constructor.
Value
Possible choices for the particle data layout.
Definition: DataLayoutOption.h:23
@ soa
Structure of arrays (SoA) : One Vector for each particle property.
Definition: DataLayoutOption.h:31
@ aos
Array of structure (AoS) : Particles are stored as Objects in a vector.
Definition: DataLayoutOption.h:27
Base class for autopas options.
Definition: Option.h:25
This is the main namespace of AutoPas.
Definition: AutoPasDecl.h:32