Peano
Loading...
Searching...
No Matches
swift2::TaskNumber Struct Reference

Task Number. More...

#include <TaskNumber.h>

Collaboration diagram for swift2::TaskNumber:

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
 

Detailed Description

Task Number.

A task number in SWIFT is an integer tuple:

  • The first index is the vertex or cell index that we use.
  • The second index identifies the event used.

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.

Member Enumeration Documentation

◆ TaskAssociation

Enumerator
TouchVertexFirstTime 
TouchCellFirstTime 
TouchVertexLastTime 
NumberOfEntries 

Definition at line 31 of file TaskNumber.h.

Constructor & Destructor Documentation

◆ TaskNumber()

swift2::TaskNumber::TaskNumber ( int number0,
TaskAssociation number1 )

Construct new task number.

Parameters
number0Typically 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.
number1Typically the type of mesh entity to which the task is tied to.
number2Typically 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().

Here is the call graph for this function:

Member Function Documentation

◆ equals()

bool swift2::TaskNumber::equals ( const TaskNumber & rhs) const

Definition at line 35 of file TaskNumber.cpp.

Referenced by operator!=(), and operator==().

Here is the caller graph for this function:

◆ flatten()

tarch::multicore::TaskNumber swift2::TaskNumber::flatten ( ) const

◆ operator<()

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.

◆ toString()

std::string swift2::TaskNumber::toString ( ) const

Definition at line 50 of file TaskNumber.cpp.

References tarch::multicore::NoOutDependencies.

Referenced by TaskNumber().

Here is the caller graph for this function:

Field Documentation

◆ _taskAssociation

TaskAssociation swift2::TaskNumber::_taskAssociation
private

Definition at line 69 of file TaskNumber.h.

◆ _taskCounter

int swift2::TaskNumber::_taskCounter
private

Definition at line 68 of file TaskNumber.h.

Referenced by TaskNumber().

◆ NoOutDependencies

const swift2::TaskNumber swift2::TaskNumber::NoOutDependencies {tarch::multicore::NoOutDependencies, TaskAssociation::TouchVertexFirstTime}
static

Defines the max indices for each entry in TaskNumber.

Definition at line 9 of file TaskNumber.h.

Referenced by swift2::flatten(), and TaskNumber().


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