Last change
on this file since 2120 was
1661,
checked in by yushan, 5 years ago
|
MARK: branch merged with trunk @1660. Test (test_complete, test_remap) on ADA with IntelMPI and _usingEP/_usingMPI as switch.
|
File size:
601 bytes
|
Line | |
---|
1 | #ifndef __TIMER_HPP__ |
---|
2 | #define __TIMER_HPP__ |
---|
3 | |
---|
4 | #include "mpi.hpp" |
---|
5 | #include <string> |
---|
6 | #include <map> |
---|
7 | |
---|
8 | namespace sphereRemap { |
---|
9 | |
---|
10 | using namespace std; |
---|
11 | |
---|
12 | |
---|
13 | class CTimer |
---|
14 | { |
---|
15 | public : |
---|
16 | |
---|
17 | double cumulatedTime; |
---|
18 | double lastTime; |
---|
19 | bool suspended; |
---|
20 | string name; |
---|
21 | |
---|
22 | CTimer(const string& name); |
---|
23 | void suspend(void); |
---|
24 | void resume(void); |
---|
25 | void reset(void); |
---|
26 | double getCumulatedTime(void); |
---|
27 | void print(void); |
---|
28 | static map<string,CTimer*> *allTimer_ptr; |
---|
29 | #pragma omp threadprivate(allTimer_ptr) |
---|
30 | static double getTime(void); |
---|
31 | static CTimer& get(string name); |
---|
32 | }; |
---|
33 | |
---|
34 | |
---|
35 | |
---|
36 | } |
---|
37 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.