10#ifndef MUELU_MUTUALLYEXCLUSIVETIME_HPP
11#define MUELU_MUTUALLYEXCLUSIVETIME_HPP
15#include "Teuchos_RCPDecl.hpp"
38template <
class TagName>
53 void start(
bool reset =
false);
85 static RCP<MutuallyExclusiveTime<TagName> >
getNewTimer(
const std::string& name);
99 static void PrintParentChildPairs();
109 RCP<Teuchos::Time> timer_;
116 static std::stack<MutuallyExclusiveTime<TagName>*>
timerStack_;
120 void TopOfTheStack();
Base class for MueLu classes.
This class wraps a Teuchos::Time and maintains a mutually exclusive property between wrapped timers.
void pause()
Pause running timer. Used internally by start().
void resume()
Resume paused timer. Used internally by stop(). Timer is not reset.
std::string name_
Name of this mutually exclusive timer.
MutuallyExclusiveTime(const std::string &name, bool startFlag=false)
Constructor.
~MutuallyExclusiveTime()
Destructor.
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...
void incrementNumCalls()
Increment the number of times this timer has been called.
void start(bool reset=false)
Starts the timer. If a MutuallyExclusiveTime timer is running, it will be stopped.
Namespace for MueLu classes and methods.
std::stack< MutuallyExclusiveTime< TagName > * > MutuallyExclusiveTime< TagName >::timerStack_