LAMA
|
Timer implementation using OpenMP timing For further documentation see Timer interface. More...
#include <OpenMPTimer.hpp>
Data Structures | |
struct | TimerData |
Public Member Functions | |
OpenMPTimer () | |
virtual | ~OpenMPTimer () |
void | initialize (const std::string &timerId) |
void | start (const std::string &timerId) |
Starts or resumes the timer. | |
void | stop (const std::string &timerId) |
Stops the timer and stores time measured time internally. | |
void | reset (const std::string &timerId) |
double | getTime (const std::string &timerId) |
Gets the elapsed time since the last reset. | |
void | stopAndReset (const std::string &timerId) |
Stops and resets the timer. | |
Private Types | |
typedef std::map< std::string, TimerData > | MapType |
typedef std::pair< std::string, TimerData > | PairType |
typedef MapType::iterator | MapIteratorType |
Private Attributes | |
MapType | m_timerData |
typedef MapType::iterator lama::OpenMPTimer::MapIteratorType [private] |
typedef std::map<std::string,TimerData> lama::OpenMPTimer::MapType [private] |
typedef std::pair<std::string,TimerData> lama::OpenMPTimer::PairType [private] |
lama::OpenMPTimer::~OpenMPTimer | ( | ) | [virtual] |
double lama::OpenMPTimer::getTime | ( | const std::string & | timerId | ) | [virtual] |
Gets the elapsed time since the last reset.
[in] | timerId | the ID of the timer |
Implements lama::Timer.
References lama::OpenMPTimer::TimerData::isRunning, LAMA_THROWEXCEPTION, m_timerData, lama::OpenMPTimer::TimerData::startTime, and lama::OpenMPTimer::TimerData::totalTime.
void lama::OpenMPTimer::initialize | ( | const std::string & | timerId | ) |
References LAMA_THROWEXCEPTION, and m_timerData.
void lama::OpenMPTimer::reset | ( | const std::string & | timerId | ) |
void lama::OpenMPTimer::start | ( | const std::string & | timerId | ) | [virtual] |
Starts or resumes the timer.
[in] | timerId | the ID of the timer |
Implements lama::Timer.
References lama::OpenMPTimer::TimerData::isRunning, LAMA_THROWEXCEPTION, m_timerData, and lama::OpenMPTimer::TimerData::startTime.
void lama::OpenMPTimer::stop | ( | const std::string & | timerId | ) | [virtual] |
Stops the timer and stores time measured time internally.
Measurement may be resumed by calling start()
[in] | timerId | the ID of the timer |
Implements lama::Timer.
References lama::OpenMPTimer::TimerData::isRunning, LAMA_THROWEXCEPTION, m_timerData, lama::OpenMPTimer::TimerData::startTime, and lama::OpenMPTimer::TimerData::totalTime.
void lama::OpenMPTimer::stopAndReset | ( | const std::string & | timerId | ) | [virtual] |
Stops and resets the timer.
[in] | timerId | the ID of the timer |
Implements lama::Timer.
References lama::OpenMPTimer::TimerData::isRunning, LAMA_THROWEXCEPTION, m_timerData, lama::OpenMPTimer::TimerData::startTime, and lama::OpenMPTimer::TimerData::totalTime.
MapType lama::OpenMPTimer::m_timerData [private] |
Referenced by getTime(), initialize(), reset(), start(), stop(), and stopAndReset().