Loading OpenMP/examples/timing.h +6 −0 Changes for OpenMP/examples/timing.h: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -9,3 +9,9 @@ #define CPU_TIME_P ({ struct timespec myts; (clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &myts ), \ (double)myts.tv_sec + (double)myts.tv_nsec * 1e-9); }) # REMINDER # OpenMP offers the function # omp_get_wtime() # which returns to any calling thread the value of the wall-clock time # check the details about its precision on your platform/compiler Loading
OpenMP/examples/timing.h +6 −0 Changes for OpenMP/examples/timing.h: 6 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -9,3 +9,9 @@ #define CPU_TIME_P ({ struct timespec myts; (clock_gettime( CLOCK_PROCESS_CPUTIME_ID, &myts ), \ (double)myts.tv_sec + (double)myts.tv_nsec * 1e-9); }) # REMINDER # OpenMP offers the function # omp_get_wtime() # which returns to any calling thread the value of the wall-clock time # check the details about its precision on your platform/compiler