aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Carpet/src/Comm.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Carpet/Carpet/src/Comm.cc')
-rw-r--r--Carpet/Carpet/src/Comm.cc27
1 files changed, 14 insertions, 13 deletions
diff --git a/Carpet/Carpet/src/Comm.cc b/Carpet/Carpet/src/Comm.cc
index 040ed64fe..b1c5cf2ab 100644
--- a/Carpet/Carpet/src/Comm.cc
+++ b/Carpet/Carpet/src/Comm.cc
@@ -10,11 +10,12 @@
#include <Requirements.hh>
+#include <Timer.hh>
+
#include <ggf.hh>
#include <gh.hh>
#include <carpet.hh>
-#include <Timers.hh>
@@ -145,7 +146,7 @@ namespace Carpet {
// prolongate boundaries
bool const local_do_prolongate = do_prolongate and not do_taper;
if (local_do_prolongate) {
- static Timer timer ("Prolongate");
+ static Timers::Timer timer ("Prolongate");
timer.start();
ProlongateGroupBoundaries (cctkGH, goodgroups);
timer.stop();
@@ -165,7 +166,7 @@ namespace Carpet {
// synchronise ghostzones
if (sync_during_time_integration or local_do_prolongate) {
- static Timer timer ("Sync");
+ static Timers::Timer timer ("Sync");
timer.start();
SyncGroups (cctkGH, goodgroups);
timer.stop();
@@ -191,9 +192,9 @@ namespace Carpet {
// use the current time here (which may be modified by the user)
const CCTK_REAL time = cctkGH->cctk_time;
- static vector<Timer*> timers;
+ static vector<Timers::Timer*> timers;
if (timers.empty()) {
- timers.push_back(new Timer("comm_state[0].create"));
+ timers.push_back(new Timers::Timer("comm_state[0].create"));
for (astate state = static_cast<astate>(0);
state != state_done;
state = static_cast<astate>(static_cast<int>(state)+1))
@@ -201,15 +202,15 @@ namespace Carpet {
ostringstream name1;
name1 << "comm_state[" << timers.size() << "]"
<< "." << tostring(state) << ".user";
- timers.push_back(new Timer(name1.str()));
+ timers.push_back(new Timers::Timer(name1.str()));
ostringstream name2;
name2 << "comm_state[" << timers.size() << "]"
<< "." << tostring(state) << ".step";
- timers.push_back(new Timer(name2.str()));
+ timers.push_back(new Timers::Timer(name2.str()));
}
}
- vector<Timer*>::iterator ti = timers.begin();
+ vector<Timers::Timer*>::iterator ti = timers.begin();
(*ti)->start();
for (comm_state state; not state.done(); state.step()) {
(*ti)->stop(); ++ti; (*ti)->start();
@@ -253,9 +254,9 @@ namespace Carpet {
Accelerator_PreSync(cctkGH, &groups.front(), groups.size());
}
- static vector<Timer*> timers;
+ static vector<Timers::Timer*> timers;
if (timers.empty()) {
- timers.push_back(new Timer("comm_state[0].create"));
+ timers.push_back(new Timers::Timer("comm_state[0].create"));
for (astate state = static_cast<astate>(0);
state != state_done;
state = static_cast<astate>(static_cast<int>(state)+1))
@@ -263,15 +264,15 @@ namespace Carpet {
ostringstream name1;
name1 << "comm_state[" << timers.size() << "]"
<< "." << tostring(state) << ".user";
- timers.push_back(new Timer(name1.str()));
+ timers.push_back(new Timers::Timer(name1.str()));
ostringstream name2;
name2 << "comm_state[" << timers.size() << "]"
<< "." << tostring(state) << ".step";
- timers.push_back(new Timer(name2.str()));
+ timers.push_back(new Timers::Timer(name2.str()));
}
}
- vector<Timer*>::iterator ti = timers.begin();
+ vector<Timers::Timer*>::iterator ti = timers.begin();
(*ti)->start();
for (comm_state state; not state.done(); state.step()) {
(*ti)->stop(); ++ti; (*ti)->start();