![]() |
Peano
|
Task Number. More...
#include <TaskNumber.h>
Public Types | |
enum class | TaskAssociation { TouchVertexFirstTime = 0 , TouchCellFirstTime = 1 , TouchVertexLastTime = 2 , NumberOfEntries = 3 } |
Public Member Functions | |
TaskNumber (int number0, TaskAssociation number1) | |
Construct new task number. | |
std::string | toString () const |
tarch::multicore::TaskNumber | flatten () const |
bool | operator< (const TaskNumber &rhs) const |
Total order on object. | |
bool | equals (const TaskNumber &rhs) const |
Static Public Attributes | |
static const TaskNumber | NoOutDependencies {tarch::multicore::NoOutDependencies, TaskAssociation::TouchVertexFirstTime} |
Defines the max indices for each entry in TaskNumber. | |
Private Attributes | |
int | _taskCounter |
TaskAssociation | _taskAssociation |
Task Number.
A task number in SWIFT is an integer tuple:
We construct our task graph over these tuples and then flatten them down into a normal integer just before we spawn the tasks into the Peano tarch::multicore.
Definition at line 29 of file TaskNumber.h.
|
strong |
Enumerator | |
---|---|
TouchVertexFirstTime | |
TouchCellFirstTime | |
TouchVertexLastTime | |
NumberOfEntries |
Definition at line 31 of file TaskNumber.h.
swift2::TaskNumber::TaskNumber | ( | int | number0, |
TaskAssociation | number1 ) |
Construct new task number.
number0 | Typically the "real" task counter, i.e. a unique number from a very vast range which distinguishes different task types. Pass in tarch::multicore::NoOutDependencies if you want to actually construct the object NoOutDependencies. In this case, the other arguments are ignored. |
number1 | Typically the type of mesh entity to which the task is tied to. |
number2 | Typically some kind of species or task type counter. |
Definition at line 12 of file TaskNumber.cpp.
References _taskCounter, assertion1, NoOutDependencies, tarch::multicore::NoOutDependencies, NumberOfEntries, and toString().
bool swift2::TaskNumber::equals | ( | const TaskNumber & | rhs | ) | const |
Definition at line 35 of file TaskNumber.cpp.
Referenced by operator!=(), and operator==().
tarch::multicore::TaskNumber swift2::TaskNumber::flatten | ( | ) | const |
Definition at line 75 of file TaskNumber.cpp.
References assertionEquals, tarch::Enumerator::NoNumber, tarch::multicore::NoOutDependencies, and NumberOfEntries.
bool swift2::TaskNumber::operator< | ( | const TaskNumber & | rhs | ) | const |
Total order on object.
Required to store task numbers in sets.
Definition at line 26 of file TaskNumber.cpp.
std::string swift2::TaskNumber::toString | ( | ) | const |
Definition at line 50 of file TaskNumber.cpp.
References tarch::multicore::NoOutDependencies.
Referenced by TaskNumber().
|
private |
Definition at line 69 of file TaskNumber.h.
|
private |
Definition at line 68 of file TaskNumber.h.
Referenced by TaskNumber().
|
static |
Defines the max indices for each entry in TaskNumber.
Definition at line 9 of file TaskNumber.h.
Referenced by swift2::flatten(), and TaskNumber().