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