diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-03-19 15:34:08 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-03-19 15:34:08 -0400 |
commit | 10cb957bb41e588c9f0407ab0c99fd2c43706bbe (patch) | |
tree | 2c5f355ed35018ae9f6337ddd1bdb125fa392e98 /Carpet/LoopControl/src | |
parent | 10d085aa3043a139cc56fb0538bfe4e4741becd9 (diff) |
LoopControl: Simplify #if sequence
Diffstat (limited to 'Carpet/LoopControl/src')
-rw-r--r-- | Carpet/LoopControl/src/loopcontrol.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Carpet/LoopControl/src/loopcontrol.cc b/Carpet/LoopControl/src/loopcontrol.cc index 2a9615607..c8ac8f99e 100644 --- a/Carpet/LoopControl/src/loopcontrol.cc +++ b/Carpet/LoopControl/src/loopcontrol.cc @@ -28,14 +28,14 @@ static inline int omp_get_thread_num() { return 0; } #endif -#ifdef HAVE_CAPABILITY_CYCLECLOCK + + +#if defined HAVE_CAPABILITY_CYCLECLOCK // We have a fast, accurate clock # include <cycleclock.h> -#else - -# ifdef _OPENMP +#elif defined _OPENMP // We use the OpenMP clock typedef double ticks; @@ -43,7 +43,7 @@ static inline ticks getticks() { return omp_get_wtime(); } static inline double elapsed(ticks t1, ticks t0) { return t1-t0; } static inline double seconds_per_tick() { return 1.0; } -# else +#else // We use gettimeofday as fallback #include <sys/time.h> @@ -60,9 +60,10 @@ static inline double elapsed(ticks t1, ticks t0) } static inline double seconds_per_tick() { return 1.0e-6; } -# endif #endif + + using namespace std; |