OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
ippl/src/Utility/Timer.cpp
Go to the documentation of this file.
1//
2// Class Timer
3// This class is used in IpplTimings.
4//
5//
6//
7#include "Kokkos_Core.hpp"
8
9#include "Timer.h"
10
12
14 this->clear();
15}
16
18 elapsed_m = 0.0;
19}
20
22 start_m = std::chrono::high_resolution_clock::now();
23}
24
26 if (enableFences) {
28 }
29 stop_m = std::chrono::high_resolution_clock::now();
30
32
33 elapsed_m += elapsed.count();
34}
35
37 return elapsed_m;
38}
void fence()
Definition: Ippl.cpp:103
std::chrono::duration< double > duration_type
timer_type stop_m
static bool enableFences
timer_type start_m
#define IPPL_ENABLE_TIMER_FENCES