walberla::executiontree Namespace Reference

Namespaces

 internal
 

Classes

class  EveryNth
 
class  Functor
 
class  FunctorCUDA
 
class  IFunctionNode
 
class  IFunctionNodeCUDA
 
class  LoggingStamp
 
class  LoggingStampManager
 
class  Loop
 
class  Sequence
 
class  SequenceCUDA
 
class  SharedFunctor
 
class  SharedSweep
 
class  Sweep
 
class  SweepCUDA
 

Typedefs

using IFunctionNodeCUDAPtr = shared_ptr< IFunctionNodeCUDA >
 
using IFunctionNodePtr = shared_ptr< IFunctionNode >
 
using TimingTreePtr = shared_ptr< WcTimingTree >
 

Functions

template<typename FunctorType >
IFunctionNodeCUDAPtr functorCUDA (const FunctorType &t, const std::string &name="", const TimingTreePtr &timingTree=nullptr)
 
shared_ptr< SequenceCUDAsequenceCUDA (std::initializer_list< IFunctionNodeCUDAPtr > initializerList, const std::string &name, cudaStream_t defaultStream=0, bool parallel=false, int priority=0, const TimingTreePtr &timingTree=nullptr)
 
template<typename FunctorClass >
void CUDART_CB functorCUDAStartTimer (void *data)
 
template<typename FunctorClass >
void CUDART_CB functorCUDAStopTimer (void *data)
 
template<typename FunctorType >
IFunctionNodeCUDAPtr functorCUDA (const FunctorType &t, const std::string &name, const shared_ptr< WcTimingTree > &timingTree)
 
template<typename FunctorType >
IFunctionNodeCUDAPtr sweepCUDA (BlockStorage &bs, const FunctorType &t, const std::string &name="", const TimingTreePtr &timingTree=nullptr)
 
template<typename FunctorType >
IFunctionNodeCUDAPtr sweepCUDA (const shared_ptr< StructuredBlockStorage > &bs, const FunctorType &t, const std::string &name="", const TimingTreePtr &tt=nullptr)
 
template<typename FunctorType >
IFunctionNodeCUDAPtr sweepCUDA (BlockStorage &bs, FunctorType t, const std::string &name, const shared_ptr< WcTimingTree > &timingTree)
 
void printNode (std::ostream &os, const IFunctionNode &node, uint_t indentation)
 
std::ostream & operator<< (std::ostream &os, const IFunctionNode &node)
 
template<typename FunctorType >
IFunctionNodePtr functor (FunctorType t, const std::string &name="", const shared_ptr< WcTimingTree > &timingTree=nullptr)
 Creates a functor node around any callable object. More...
 
shared_ptr< Sequencesequence (std::initializer_list< IFunctionNodePtr > initializerList, const std::string &name="", const TimingTreePtr &timingTree=nullptr)
 Combine multiple task nodes into a (named) sequence. More...
 
shared_ptr< SequenceparallelSequence (std::initializer_list< IFunctionNodePtr > initializerList, const std::string &name="", const TimingTreePtr &timingTree=nullptr)
 All subtasks of this region are executed in parallel using OpenMP. More...
 
shared_ptr< EveryNtheveryNth (const IFunctionNodePtr &node, uint_t interval, bool onFirst=false, uint_t startValue=0)
 Note that runs its contents only every n'th call. More...
 
shared_ptr< Looploop (const IFunctionNodePtr &body, uint_t iterations, bool logTimeStep=true)
 Runs the child node for the given amount of iterations. More...
 
template<typename FunctorType >
IFunctionNodePtr functor (FunctorType t, const std::string &name, const TimingTreePtr &timingTree)
 
template<typename FunctorType >
IFunctionNodePtr sweep (BlockStorage &bs, const FunctorType &functor, const std::string &name, const TimingTreePtr &timingTree=nullptr)
 
template<typename FunctorType >
IFunctionNodePtr sweep (const shared_ptr< StructuredBlockStorage > &bs, const FunctorType &functor, const std::string &name, const TimingTreePtr &timingTree=nullptr)
 

Typedef Documentation

◆ IFunctionNodeCUDAPtr

◆ IFunctionNodePtr

◆ TimingTreePtr

Function Documentation

◆ everyNth()

shared_ptr< EveryNth > walberla::executiontree::everyNth ( const IFunctionNodePtr node,
uint_t  interval,
bool  onFirst = false,
uint_t  startValue = 0 
)
inline

Note that runs its contents only every n'th call.

Parameters
nodetask that is only run every n'th call
namethe interval i.e. "n"
onFirstif false the task is not run at the first call
startValueinitial call counter

◆ functor() [1/2]

template<typename FunctorType >
IFunctionNodePtr walberla::executiontree::functor ( FunctorType  t,
const std::string &  name,
const TimingTreePtr timingTree 
)

◆ functor() [2/2]

template<typename FunctorType >
IFunctionNodePtr walberla::executiontree::functor ( FunctorType  t,
const std::string &  name = "",
const shared_ptr< WcTimingTree > &  timingTree = nullptr 
)

Creates a functor node around any callable object.

The wrapped functor is copied.

Parameters
anycallable object. The object is copied - if its state has to be modified later, pass a shared_ptr to a functor instead
nameoptional name of the functor node
timingTreeoptional timing tree object to time all executions of this functor

◆ functorCUDA() [1/2]

template<typename FunctorType >
IFunctionNodeCUDAPtr walberla::executiontree::functorCUDA ( const FunctorType &  t,
const std::string &  name,
const shared_ptr< WcTimingTree > &  timingTree 
)

◆ functorCUDA() [2/2]

template<typename FunctorType >
IFunctionNodeCUDAPtr walberla::executiontree::functorCUDA ( const FunctorType &  t,
const std::string &  name = "",
const TimingTreePtr timingTree = nullptr 
)

◆ functorCUDAStartTimer()

template<typename FunctorClass >
void CUDART_CB walberla::executiontree::functorCUDAStartTimer ( void *  data)

◆ functorCUDAStopTimer()

template<typename FunctorClass >
void CUDART_CB walberla::executiontree::functorCUDAStopTimer ( void *  data)

◆ loop()

shared_ptr< Loop > walberla::executiontree::loop ( const IFunctionNodePtr body,
uint_t  iterations,
bool  logTimeStep = true 
)
inline

Runs the child node for the given amount of iterations.

◆ operator<<()

std::ostream & walberla::executiontree::operator<< ( std::ostream &  os,
const IFunctionNode node 
)

◆ parallelSequence()

shared_ptr< Sequence > walberla::executiontree::parallelSequence ( std::initializer_list< IFunctionNodePtr initializerList,
const std::string &  name = "",
const TimingTreePtr timingTree = nullptr 
)
inline

All subtasks of this region are executed in parallel using OpenMP.

◆ printNode()

void walberla::executiontree::printNode ( std::ostream &  os,
const IFunctionNode node,
uint_t  indentation 
)

◆ sequence()

shared_ptr< Sequence > walberla::executiontree::sequence ( std::initializer_list< IFunctionNodePtr initializerList,
const std::string &  name = "",
const TimingTreePtr timingTree = nullptr 
)
inline

Combine multiple task nodes into a (named) sequence.

Parameters
initializerListlist of tasks that are executed in the passed order
nameoptional sequence name, used for printing and for labeling time measurements
timingTreeoptional timing tree object

◆ sequenceCUDA()

shared_ptr< SequenceCUDA > walberla::executiontree::sequenceCUDA ( std::initializer_list< IFunctionNodeCUDAPtr initializerList,
const std::string &  name,
cudaStream_t  defaultStream = 0,
bool  parallel = false,
int  priority = 0,
const TimingTreePtr timingTree = nullptr 
)

◆ sweep() [1/2]

template<typename FunctorType >
IFunctionNodePtr walberla::executiontree::sweep ( BlockStorage bs,
const FunctorType &  functor,
const std::string &  name,
const TimingTreePtr timingTree = nullptr 
)

◆ sweep() [2/2]

template<typename FunctorType >
IFunctionNodePtr walberla::executiontree::sweep ( const shared_ptr< StructuredBlockStorage > &  bs,
const FunctorType &  functor,
const std::string &  name,
const TimingTreePtr timingTree = nullptr 
)

◆ sweepCUDA() [1/3]

template<typename FunctorType >
IFunctionNodeCUDAPtr walberla::executiontree::sweepCUDA ( BlockStorage bs,
const FunctorType &  t,
const std::string &  name = "",
const TimingTreePtr timingTree = nullptr 
)

◆ sweepCUDA() [2/3]

template<typename FunctorType >
IFunctionNodeCUDAPtr walberla::executiontree::sweepCUDA ( BlockStorage bs,
FunctorType  t,
const std::string &  name,
const shared_ptr< WcTimingTree > &  timingTree 
)

◆ sweepCUDA() [3/3]

template<typename FunctorType >
IFunctionNodeCUDAPtr walberla::executiontree::sweepCUDA ( const shared_ptr< StructuredBlockStorage > &  bs,
const FunctorType &  t,
const std::string &  name = "",
const TimingTreePtr tt = nullptr 
)