Changes in src/benchmark/bench.h [9d32bc8:8ad6533]
- File:
-
- 1 edited
-
src/benchmark/bench.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/benchmark/bench.h
r9d32bc8 r8ad6533 6 6 #include <stdlib.h> 7 7 #include <unistd.h> // sysconf 8 #if ! defined(__cforall) 8 #include <sys/times.h> // times 9 9 #include <time.h> 10 #include <sys/time.h> 11 #else 10 #if defined(__cforall) 12 11 } 13 #include <time>12 //#include <bits/cfatime.h> 14 13 #endif 15 14 16 15 17 static inline unsigned long long int bench_time() {16 static inline unsigned long long int Time() { 18 17 struct timespec ts; 19 18 clock_gettime( … … 42 41 } \ 43 42 long long int StartTime, EndTime; \ 44 StartTime = bench_time();\43 StartTime = Time(); \ 45 44 statement; \ 46 EndTime = bench_time();\45 EndTime = Time(); \ 47 46 unsigned long long int output = \ 48 47 ( EndTime - StartTime ) / n; 49 48 50 #if defined(__cforall) 51 Duration default_preemption() { 49 __cfa_time_t default_preemption() { 52 50 return 0; 53 51 } 54 #endif
Note:
See TracChangeset
for help on using the changeset viewer.