Epetra Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Epetra_Time Class Reference

Epetra_Time: The Epetra Timing Class. More...

#include <Epetra_Time.h>

Inheritance diagram for Epetra_Time:
Inheritance graph
[legend]

Public Member Functions

 Epetra_Time (const Epetra_Comm &Comm)
 Epetra_Time Constructor. More...
 
 Epetra_Time (const Epetra_Time &Time)
 Epetra_Time Copy Constructor. More...
 
double WallTime (void) const
 Epetra_Time wall-clock time function. More...
 
void ResetStartTime (void)
 Epetra_Time function to reset the start time for a timer object. More...
 
double ElapsedTime (void) const
 Epetra_Time elapsed time function. More...
 
virtual ~Epetra_Time (void)
 Epetra_Time Destructor. More...
 
Epetra_Timeoperator= (const Epetra_Time &src)
 
- Public Member Functions inherited from Epetra_Object
 Epetra_Object (int TracebackModeIn=-1, bool set_label=true)
 Epetra_Object Constructor. More...
 
 Epetra_Object (const char *const Label, int TracebackModeIn=-1)
 Epetra_Object Constructor. More...
 
 Epetra_Object (const Epetra_Object &Object)
 Epetra_Object Copy Constructor. More...
 
virtual ~Epetra_Object ()
 Epetra_Object Destructor. More...
 
virtual void SetLabel (const char *const Label)
 Epetra_Object Label definition using char *. More...
 
virtual const char * Label () const
 Epetra_Object Label access funtion. More...
 
virtual void Print (std::ostream &os) const
 Print object to an output stream Print method. More...
 
virtual int ReportError (const std::string Message, int ErrorCode) const
 Error reporting method. More...
 

Private Attributes

double StartTime_
 
const Epetra_CommComm_
 

Additional Inherited Members

- Static Public Member Functions inherited from Epetra_Object
static void SetTracebackMode (int TracebackModeValue)
 Set the value of the Epetra_Object error traceback report mode. More...
 
static int GetTracebackMode ()
 Get the value of the Epetra_Object error report mode. More...
 
static std::ostream & GetTracebackStream ()
 Get the output stream for error reporting. More...
 
- Static Public Attributes inherited from Epetra_Object
static int TracebackMode
 
- Protected Member Functions inherited from Epetra_Object
std::string toString (const int &x) const
 
std::string toString (const long long &x) const
 
std::string toString (const double &x) const
 

Detailed Description

Epetra_Time: The Epetra Timing Class.

The Epetra_Time class is a wrapper that encapsulates the general information needed getting timing information. Currently it return the elapsed time for each calling processor.. A Epetra_Comm object is required for building all Epetra_Time objects.

Epetra_Time support both serial execution and (via MPI) parallel distributed memory execution. It is meant to insulate the user from the specifics of timing across a variety of platforms.

Definition at line 83 of file Epetra_Time.h.

Constructor & Destructor Documentation

Epetra_Time::Epetra_Time ( const Epetra_Comm Comm)

Epetra_Time Constructor.

Creates a Epetra_Time instance. This instance can be queried for elapsed time on the calling processor. StartTime is also set for use with the ElapsedTime function.

Definition at line 53 of file Epetra_Time.cpp.

Epetra_Time::Epetra_Time ( const Epetra_Time Time)

Epetra_Time Copy Constructor.

Makes an exact copy of an existing Epetra_Time instance.

Definition at line 60 of file Epetra_Time.cpp.

Epetra_Time::~Epetra_Time ( void  )
virtual

Epetra_Time Destructor.

Completely deletes a Epetra_Time object.

Definition at line 66 of file Epetra_Time.cpp.

Member Function Documentation

double Epetra_Time::WallTime ( void  ) const

Epetra_Time wall-clock time function.

Returns the wall-clock time in seconds. A code section can be timed by putting it between two calls to WallTime and taking the difference of the times.

Definition at line 70 of file Epetra_Time.cpp.

void Epetra_Time::ResetStartTime ( void  )

Epetra_Time function to reset the start time for a timer object.

Resets the start time for the timer object to the current time A code section can be timed by putting it between a call to ResetStartTime and ElapsedTime.

Definition at line 129 of file Epetra_Time.cpp.

double Epetra_Time::ElapsedTime ( void  ) const

Epetra_Time elapsed time function.

Returns the elapsed time in seconds since the timer object was constructed, or since the ResetStartTime function was called. A code section can be timed by putting it between the Epetra_Time constructor and a call to ElapsedTime, or between a call to ResetStartTime and ElapsedTime.

Definition at line 135 of file Epetra_Time.cpp.

Epetra_Time& Epetra_Time::operator= ( const Epetra_Time src)
inline

Definition at line 126 of file Epetra_Time.h.

Member Data Documentation

double Epetra_Time::StartTime_
private

Definition at line 135 of file Epetra_Time.h.

const Epetra_Comm* Epetra_Time::Comm_
private

Definition at line 136 of file Epetra_Time.h.


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