walberla::executiontree Namespace Reference

Namespaces

 internal
 

Classes

class  EveryNth
 
class  Functor
 
class  IFunctionNode
 
class  LoggingStamp
 
class  LoggingStampManager
 
class  Loop
 
class  Sequence
 
class  SharedFunctor
 
class  SharedSweep
 
class  Sweep
 

Typedefs

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

Functions

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

◆ 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
intervalthe 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
tcallable 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

◆ 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

◆ 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 
)