IBAMR  IBAMR version 0.19.
Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
SAMRAI::tbox::Timer Class Reference

#include <tbox/Timer.h>

Inheritance diagram for SAMRAI::tbox::Timer:
Inheritance graph
[legend]

Public Member Functions

virtual ~Timer ()
 
const std::string & getName () const
 
int getIdentifier () const
 
void start ()
 
void stop ()
 
void startExclusive ()
 
void stopExclusive ()
 
void reset ()
 
double getTotalSystemTime () const
 
double getTotalUserTime () const
 
double getTotalWallclockTime () const
 
double getMaxWallclockTime () const
 
double getExclusiveSystemTime () const
 
double getExclusiveUserTime () const
 
double getExclusiveWallclockTime () const
 
bool isActive () const
 
bool isRunning () const
 
void setConcurrentTimer (const int id)
 
bool isConcurrentTimer (const int id) const
 
int getNumberAccesses () const
 
double computeLoadBalanceEfficiency ()
 
void computeMaxWallclock ()
 
virtual void putToDatabase (Pointer< Database > db)
 
virtual void getFromRestart (Pointer< Database > db)
 

Protected Member Functions

 Timer (const std::string &name, const int id=-1)
 
void setInactive ()
 

Private Attributes

std::string d_name
 
int d_identifier
 
Array< boold_concurrent_timers
 
bool d_is_running
 
bool d_is_active
 
double d_user_total
 
double d_system_total
 
double d_wallclock_total
 
double d_user_exclusive
 
double d_system_exclusive
 
double d_wallclock_exclusive
 
double d_max_wallclock
 
clock_t d_user_start_total
 
clock_t d_user_stop_total
 
clock_t d_system_start_total
 
clock_t d_system_stop_total
 
clock_t d_user_start_exclusive
 
clock_t d_user_stop_exclusive
 
clock_t d_system_start_exclusive
 
clock_t d_system_stop_exclusive
 
double d_wallclock_start_total
 
double d_wallclock_stop_total
 
double d_wallclock_start_exclusive
 
double d_wallclock_stop_exclusive
 
int d_accesses
 

Static Private Attributes

static const int DEFAULT_NUMBER_OF_TIMERS_INCREMENT = 128
 

Friends

class TimerManager
 

Constructor & Destructor Documentation

◆ ~Timer()

virtual SAMRAI::tbox::Timer::~Timer ( )
virtual

Empty virtual destructor for Timer class.

◆ Timer()

SAMRAI::tbox::Timer::Timer ( const std::string &  name,
const int  id = -1 
)
protected

The constructor for the Timer class sets timer name string and integer identifiers, and initializes the timer state.

Member Function Documentation

◆ getName()

const std::string& SAMRAI::tbox::Timer::getName ( ) const

Return string name for timer.

◆ getIdentifier()

int SAMRAI::tbox::Timer::getIdentifier ( ) const

Return integer identfier for timer.

◆ start()

void SAMRAI::tbox::Timer::start ( )

Start the timer if active.

◆ stop()

void SAMRAI::tbox::Timer::stop ( )

Stop the timer if active.

◆ startExclusive()

void SAMRAI::tbox::Timer::startExclusive ( )

Start exclusive time.

◆ stopExclusive()

void SAMRAI::tbox::Timer::stopExclusive ( )

Stop exclusive time.

◆ reset()

void SAMRAI::tbox::Timer::reset ( )

Reset the state of the timing information.

◆ getTotalSystemTime()

double SAMRAI::tbox::Timer::getTotalSystemTime ( ) const

Return total system time (between starts and stops)

◆ getTotalUserTime()

double SAMRAI::tbox::Timer::getTotalUserTime ( ) const

Return total user time

◆ getTotalWallclockTime()

double SAMRAI::tbox::Timer::getTotalWallclockTime ( ) const

Return total wallclock time

◆ getMaxWallclockTime()

double SAMRAI::tbox::Timer::getMaxWallclockTime ( ) const

Return max wallclock time

◆ getExclusiveSystemTime()

double SAMRAI::tbox::Timer::getExclusiveSystemTime ( ) const

Return exclusive system time.

◆ getExclusiveUserTime()

double SAMRAI::tbox::Timer::getExclusiveUserTime ( ) const

Return exclusive user time.

◆ getExclusiveWallclockTime()

double SAMRAI::tbox::Timer::getExclusiveWallclockTime ( ) const

Return exclusive wallclock time.

◆ isActive()

bool SAMRAI::tbox::Timer::isActive ( ) const

Return true if the timer is active; false otherwise.

◆ isRunning()

bool SAMRAI::tbox::Timer::isRunning ( ) const

Return true if timer is running; false otherwise.

◆ setConcurrentTimer()

void SAMRAI::tbox::Timer::setConcurrentTimer ( const int  id)

Mark given integer as id of timer running concurrently with this one.

◆ isConcurrentTimer()

bool SAMRAI::tbox::Timer::isConcurrentTimer ( const int  id) const

Return if the timer id is running concurrently with this one.

◆ getNumberAccesses()

int SAMRAI::tbox::Timer::getNumberAccesses ( ) const

Return number of accesses to start()-stop() functions for the timer.

◆ computeLoadBalanceEfficiency()

double SAMRAI::tbox::Timer::computeLoadBalanceEfficiency ( )

Compute load balance efficiency based on wallclock (non-exclusive) time.

◆ computeMaxWallclock()

void SAMRAI::tbox::Timer::computeMaxWallclock ( )

Compute max wallclock time based on total (non-exclusive) time.

◆ putToDatabase()

virtual void SAMRAI::tbox::Timer::putToDatabase ( Pointer< Database db)
virtual

Write timer data members to database.

◆ getFromRestart()

virtual void SAMRAI::tbox::Timer::getFromRestart ( Pointer< Database db)
virtual

Read restarted times from restart database. When assertion checking is on, the database pointer must be non-null.

◆ setInactive()

void SAMRAI::tbox::Timer::setInactive ( )
protected

Friends And Related Function Documentation

◆ TimerManager

friend class TimerManager
friend

Member Data Documentation

◆ d_name

std::string SAMRAI::tbox::Timer::d_name
private

◆ d_identifier

int SAMRAI::tbox::Timer::d_identifier
private

◆ d_concurrent_timers

Array<bool> SAMRAI::tbox::Timer::d_concurrent_timers
private

◆ d_is_running

bool SAMRAI::tbox::Timer::d_is_running
private

◆ d_is_active

bool SAMRAI::tbox::Timer::d_is_active
private

◆ d_user_total

double SAMRAI::tbox::Timer::d_user_total
private

◆ d_system_total

double SAMRAI::tbox::Timer::d_system_total
private

◆ d_wallclock_total

double SAMRAI::tbox::Timer::d_wallclock_total
private

◆ d_user_exclusive

double SAMRAI::tbox::Timer::d_user_exclusive
private

◆ d_system_exclusive

double SAMRAI::tbox::Timer::d_system_exclusive
private

◆ d_wallclock_exclusive

double SAMRAI::tbox::Timer::d_wallclock_exclusive
private

◆ d_max_wallclock

double SAMRAI::tbox::Timer::d_max_wallclock
private

◆ d_user_start_total

clock_t SAMRAI::tbox::Timer::d_user_start_total
private

◆ d_user_stop_total

clock_t SAMRAI::tbox::Timer::d_user_stop_total
private

◆ d_system_start_total

clock_t SAMRAI::tbox::Timer::d_system_start_total
private

◆ d_system_stop_total

clock_t SAMRAI::tbox::Timer::d_system_stop_total
private

◆ d_user_start_exclusive

clock_t SAMRAI::tbox::Timer::d_user_start_exclusive
private

◆ d_user_stop_exclusive

clock_t SAMRAI::tbox::Timer::d_user_stop_exclusive
private

◆ d_system_start_exclusive

clock_t SAMRAI::tbox::Timer::d_system_start_exclusive
private

◆ d_system_stop_exclusive

clock_t SAMRAI::tbox::Timer::d_system_stop_exclusive
private

◆ d_wallclock_start_total

double SAMRAI::tbox::Timer::d_wallclock_start_total
private

◆ d_wallclock_stop_total

double SAMRAI::tbox::Timer::d_wallclock_stop_total
private

◆ d_wallclock_start_exclusive

double SAMRAI::tbox::Timer::d_wallclock_start_exclusive
private

◆ d_wallclock_stop_exclusive

double SAMRAI::tbox::Timer::d_wallclock_stop_exclusive
private

◆ d_accesses

int SAMRAI::tbox::Timer::d_accesses
private

◆ DEFAULT_NUMBER_OF_TIMERS_INCREMENT

const int SAMRAI::tbox::Timer::DEFAULT_NUMBER_OF_TIMERS_INCREMENT = 128
staticprivate

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