ESyS-Particle  2.3.4
MpiWTimers Class Reference

#include <Timer.h>

Public Member Functions

 MpiWTimers ()
 
void start (const std::string &name)
 
void stop (const std::string &name, bool elapseIsStopMinusStart=false)
 
void pause (const std::string &name)
 
void resume (const std::string &name)
 
void zeroise (const std::string &name)
 
void zeroise ()
 
bool timerExists (const std::string &name) const
 
double getTiming (const std::string &name) const
 
void writeHeader (std::ostream &oStream)
 
void appendData (std::ostream &oStream)
 
void appendData (const std::string &fileName)
 
void clear ()
 

Protected Member Functions

MpiWTimerfindTimer (const std::string &timerName)
 
const MpiWTimerfindTimer (const std::string &timerName) const
 
MpiWTimerfindOrCreateTimer (const std::string &timerName)
 
TimingDataWritergetWriter (const std::string &fileName)
 

Private Types

typedef std::map< std::string, MpiWTimerNameMpiWTimerMap
 
typedef std::map< std::string, TimingDataWriterFileNameWriterMap
 

Private Attributes

NameMpiWTimerMap m_timerMap
 
FileNameWriterMap m_fileNameWriterMap
 

Detailed Description

Helper class for recording various pieces of timing info.

Member Typedef Documentation

◆ FileNameWriterMap

typedef std::map<std::string, TimingDataWriter> MpiWTimers::FileNameWriterMap
private

◆ NameMpiWTimerMap

typedef std::map<std::string, MpiWTimer> MpiWTimers::NameMpiWTimerMap
private

Constructor & Destructor Documentation

◆ MpiWTimers()

MpiWTimers::MpiWTimers ( )

Member Function Documentation

◆ appendData() [1/2]

void MpiWTimers::appendData ( const std::string &  fileName)

References TimingDataWriter::appendData(), and getWriter().

Here is the call graph for this function:

◆ appendData() [2/2]

void MpiWTimers::appendData ( std::ostream &  oStream)

References m_timerMap.

Referenced by TimingDataWriter::appendData(), and CLatticeMaster::saveTimingData().

Here is the caller graph for this function:

◆ clear()

void MpiWTimers::clear ( )

References m_fileNameWriterMap, and m_timerMap.

Referenced by CLatticeMaster::runInit().

Here is the caller graph for this function:

◆ findOrCreateTimer()

MpiWTimer & MpiWTimers::findOrCreateTimer ( const std::string &  timerName)
protected

References m_timerMap.

Referenced by pause(), resume(), start(), stop(), and zeroise().

Here is the caller graph for this function:

◆ findTimer() [1/2]

MpiWTimer * MpiWTimers::findTimer ( const std::string &  timerName)
protected

References m_timerMap, and NULL.

Referenced by getTiming().

Here is the caller graph for this function:

◆ findTimer() [2/2]

const MpiWTimer * MpiWTimers::findTimer ( const std::string &  timerName) const
protected

References m_timerMap, and NULL.

◆ getTiming()

double MpiWTimers::getTiming ( const std::string &  name) const

References findTimer(), MpiWTimer::getTiming(), and timerExists().

Referenced by CLatticeMaster::oneStep(), CLatticeMaster::runEnd(), and CLatticeMaster::runOneStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getWriter()

TimingDataWriter & MpiWTimers::getWriter ( const std::string &  fileName)
protected

References m_fileNameWriterMap.

Referenced by appendData().

Here is the caller graph for this function:

◆ pause()

void MpiWTimers::pause ( const std::string &  name)

References findOrCreateTimer(), and MpiWTimer::pause().

Referenced by CLatticeMaster::runOneStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resume()

void MpiWTimers::resume ( const std::string &  name)

References findOrCreateTimer(), and MpiWTimer::resume().

Referenced by CLatticeMaster::runOneStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ start()

void MpiWTimers::start ( const std::string &  name)

References findOrCreateTimer(), and MpiWTimer::setStart().

Referenced by CLatticeMaster::oneStep(), CLatticeMaster::runInit(), CLatticeMaster::runOneStep(), and CLatticeMaster::saveTimingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void MpiWTimers::stop ( const std::string &  name,
bool  elapseIsStopMinusStart = false 
)

References findOrCreateTimer(), and MpiWTimer::setStop().

Referenced by CLatticeMaster::oneStep(), CLatticeMaster::runOneStep(), and CLatticeMaster::saveTimingData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ timerExists()

bool MpiWTimers::timerExists ( const std::string &  name) const

References m_timerMap.

Referenced by getTiming().

Here is the caller graph for this function:

◆ writeHeader()

void MpiWTimers::writeHeader ( std::ostream &  oStream)

References m_timerMap.

Referenced by TimingDataWriter::writeHeader().

Here is the caller graph for this function:

◆ zeroise() [1/2]

void MpiWTimers::zeroise ( )

References m_timerMap.

◆ zeroise() [2/2]

void MpiWTimers::zeroise ( const std::string &  name)

References findOrCreateTimer(), and MpiWTimer::zeroise().

Here is the call graph for this function:

Member Data Documentation

◆ m_fileNameWriterMap

FileNameWriterMap MpiWTimers::m_fileNameWriterMap
private

Referenced by clear(), and getWriter().

◆ m_timerMap


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