Go to the documentation of this file.
46 #ifndef MUELU_MUTUALLYEXCLUSIVETIME_HPP
47 #define MUELU_MUTUALLYEXCLUSIVETIME_HPP
51 #include "Teuchos_RCPDecl.hpp"
74 template<
class TagName>
91 void start(
bool reset=
false);
124 static RCP<MutuallyExclusiveTime<TagName> >
getNewTimer(
const std::string& name);
174 #endif // MUELU_MUTUALLYEXCLUSIVETIME_HPP
double stop()
Stops the timer. The previous MutuallyExclusiveTime that has been paused when this timer was started ...
static RCP< MutuallyExclusiveTime< TagName > > getNewTimer(const std::string &name)
Return a new MutuallyExclusiveTime that is registered with the Teuchos::TimeMonitor (for timer summar...
~MutuallyExclusiveTime()
Destructor.
void pause()
Pause running timer. Used internally by start().
void TopOfTheStack()
Check if 'this' is the head of the stack.
void resume()
Resume paused timer. Used internally by stop(). Timer is not reset.
Namespace for MueLu classes and methods.
RCP< Teuchos::Time > timer_
Using an RCP allows to use Teuchos::TimeMonitor to keep track of the timer.
Base class for MueLu classes.
std::string name_
Name of this mutually exclusive timer.
static std::stack< MutuallyExclusiveTime< TagName > * > timerStack_
Stack of created timers (active or paused timers).
MutuallyExclusiveTime(const std::string &name, bool startFlag=false)
Constructor.
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.
void incrementNumCalls()
Increment the number of times this timer has been called.
This class wraps a Teuchos::Time and maintains a mutually exclusive property between wrapped timers.