46 #ifndef MUELU_MUTUALLYEXCLUSIVETIME_HPP
47 #define MUELU_MUTUALLYEXCLUSIVETIME_HPP
74 template<
class TagName>
91 void start(
bool reset=
false);
174 #endif // MUELU_MUTUALLYEXCLUSIVETIME_HPP
void TopOfTheStack()
Check if 'this' is the head of the stack.
static std::stack< MutuallyExclusiveTime< TagName > * > timerStack_
Stack of created timers (active or paused timers).
~MutuallyExclusiveTime()
Destructor.
static RCP< MutuallyExclusiveTime< TagName > > getNewTimer(const std::string &name)
Return a new MutuallyExclusiveTime that is registered with the Teuchos::TimeMonitor (for timer summar...
static void PrintParentChildPairs()
Print std::map of (child,parent) pairs for post-run analysis.
void start(bool reset=false)
Starts the timer. If a MutuallyExclusiveTime timer is running, it will be stopped.
double stop()
Stops the timer. The previous MutuallyExclusiveTime that has been paused when this timer was started ...
std::string name_
Name of this mutually exclusive timer.
void incrementNumCalls()
Increment the number of times this timer has been called.
RCP< Teuchos::Time > timer_
Using an RCP allows to use Teuchos::TimeMonitor to keep track of the timer.
void pause()
Pause running timer. Used internally by start().
Base class for MueLu classes.
void resume()
Resume paused timer. Used internally by stop(). Timer is not reset.
This class wraps a Teuchos::Time and maintains a mutually exclusive property between wrapped timers...
MutuallyExclusiveTime(const std::string &name, bool startFlag=false)
Constructor.