LAMA
lama::OpenMPTimer Class Reference

Timer implementation using OpenMP timing For further documentation see Timer interface. More...

#include <OpenMPTimer.hpp>

Inheritance diagram for lama::OpenMPTimer:

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

Detailed Description

Timer implementation using OpenMP timing For further documentation see Timer interface.


Member Typedef Documentation

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]

Constructor & Destructor Documentation


Member Function Documentation

double lama::OpenMPTimer::getTime ( const std::string &  timerId) [virtual]

Gets the elapsed time since the last reset.

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

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::start ( const std::string &  timerId) [virtual]

Starts or resumes the timer.

Parameters:
[in]timerIdthe 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()

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

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.

Parameters:
[in]timerIdthe ID of the timer
Returns:
Time measured in seconds

Implements lama::Timer.

References lama::OpenMPTimer::TimerData::isRunning, LAMA_THROWEXCEPTION, m_timerData, lama::OpenMPTimer::TimerData::startTime, and lama::OpenMPTimer::TimerData::totalTime.


Field Documentation


The documentation for this class was generated from the following files: