MPQC  2.3.1
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
sc::RegionTimer Class Reference

The RegionTimer class is used to record the time spent in a section of code. More...

#include <regtime.h>

Inheritance diagram for sc::RegionTimer:
Inheritance graph
[legend]
Collaboration diagram for sc::RegionTimer:
Collaboration graph
[legend]

Public Member Functions

 RegionTimer (const char *topname="total", int cpu_time=0, int wall_time=1)
 
 RegionTimer (const Ref< KeyVal > &)
 
void enter (const char *=0)
 
void change (const char *newname, const char *oldname=0)
 
void exit (const char *=0, bool do_not_throw=false)
 
void set_default (const char *)
 
void unset_default ()
 
void enter_default ()
 
void exit_default ()
 
virtual void print (std::ostream &=ExEnv::out0()) const
 Print the object.
 
void update_top () const
 
int nregion () const
 
void get_region_names (const char *names[]) const
 
void get_wall_times (double *) const
 
void get_cpu_times (double *) const
 
void get_flops (double *) const
 
void get_depth (int *) const
 
double get_wall_time () const
 
double get_cpu_time () const
 
double get_flops () const
 
void add_wall_time (const char *, double)
 
void add_cpu_time (const char *, double)
 
void add_flops (const char *, double)
 
- Public Member Functions inherited from sc::DescribedClass
 DescribedClass (const DescribedClass &)
 
DescribedClassoperator= (const DescribedClass &)
 
ClassDescclass_desc () const throw ()
 This returns the unique pointer to the ClassDesc corresponding to the given type_info object. More...
 
const char * class_name () const
 Return the name of the object's exact type.
 
int class_version () const
 Return the version of the class.
 
- Public Member Functions inherited from sc::RefCount
int lock_ptr () const
 Lock this object.
 
int unlock_ptr () const
 Unlock this object.
 
void use_locks (bool inVal)
 start and stop using locks on this object
 
refcount_t nreference () const
 Return the reference count.
 
refcount_t reference ()
 Increment the reference count and return the new count.
 
refcount_t dereference ()
 Decrement the reference count and return the new count.
 
int managed () const
 
void unmanage ()
 Turn off the reference counting mechanism for this object. More...
 
int managed () const
 Return 1 if the object is managed. Otherwise return 0.
 
- Public Member Functions inherited from sc::Identity
Identifier identifier ()
 Return the Identifier for this argument. More...
 

Static Public Member Functions

static RegionTimerdefault_regiontimer ()
 
static void set_default_regiontimer (const Ref< RegionTimer > &)
 

Protected Attributes

int wall_time_
 
int cpu_time_
 
int flops_
 
TimedRegiontop_
 
TimedRegioncurrent_
 
TimedRegiondefault_
 

Additional Inherited Members

- Protected Member Functions inherited from sc::RefCount
 RefCount (const RefCount &)
 
RefCountoperator= (const RefCount &)
 

Detailed Description

The RegionTimer class is used to record the time spent in a section of code.

During the run of a code, enter and exit members are called to begin and end timed sections. The print member is used to display the obtained times. Multiple enter calls for a region with the same name aggregate the timings. Nested regions are supported.


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

Generated at Sun Jan 26 2020 23:33:08 for MPQC 2.3.1 using the documentation package Doxygen 1.8.16.