32 #ifndef _util_misc_regtime_h
33 #define _util_misc_regtime_h
37 #include <util/class/class.h>
60 const char *name()
const {
return name_; }
62 void cpu_enter(
double);
63 void wall_enter(
double);
64 void flops_enter(
double);
65 void cpu_exit(
double);
66 void wall_exit(
double);
67 void flops_exit(
double);
68 void cpu_add(
double t) { cpu_time_ += t; }
69 void wall_add(
double t) { wall_time_ += t; }
70 void flops_add(
double t) { flops_ += t; }
72 TimedRegion *subregions()
const {
return subregions_; }
77 void get_region_names(
const char *names[]);
78 void get_wall_times(
double *);
79 void get_cpu_times(
double *);
80 void get_flops(
double *);
81 void get_depth(
int *,
int depth = 0);
101 int cpu_time = 0,
int wall_time = 1);
104 void enter(
const char * = 0);
105 void change(
const char *newname,
const char * oldname = 0);
106 void exit(
const char * = 0,
bool do_not_throw =
false);
107 void set_default(
const char *);
108 void unset_default();
109 void enter_default();
113 void update_top()
const;
116 void get_region_names(
const char *names[])
const;
117 void get_wall_times(
double *)
const;
118 void get_cpu_times(
double *)
const;
119 void get_flops(
double *)
const;
120 void get_depth(
int *)
const;
122 double get_wall_time()
const;
123 double get_cpu_time()
const;
124 double get_flops()
const;
126 void add_wall_time(
const char *,
double);
127 void add_cpu_time(
const char *,
double);
128 void add_flops(
const char *,
double);
148 Timer(
const char *name);
157 void reset(
const char * = 0);
The Timer class uses RegionTimer to time intervals in an exception safe manner.
Definition: regtime.h:140
A template class that maintains references counts.
Definition: ref.h:332
virtual void print(std::ostream &=ExEnv::out0()) const
Print the object.
Timer(const char *name)
Start timing a region using the default RegionTimer and activate the timer.
void reset(const char *=0)
Stop timing the current region, if active.
Classes which need runtime information about themselves and their relationship to other classes can v...
Definition: class.h:244
~Timer()
Stop timing a region, if active.
static std::ostream & out0()
Return an ostream that writes from node 0.
The RegionTimer class is used to record the time spent in a section of code.
Definition: regtime.h:89
Generated at Sun Jan 26 2020 23:33:04 for MPQC
2.3.1 using the documentation package Doxygen
1.8.16.