| … | … | @@ -456,7 +456,7 @@ void neighbors2d( uint mesh_size, int levmx, float threshold, int *options, int |
| 456 | 456 | } |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | | struct timeval timer; |
| 459 | struct timespec timer; |
| 460 | 460 | double time; |
| 461 | 461 | cpu_timer_start(&timer); |
| 462 | 462 | switch(options[0]){ |
| … | … | @@ -870,7 +870,7 @@ struct neighbor2d *neighbors2d_kdtree( uint ncells, int mesh_size, double *x, do |
| 870 | 870 | */ |
| 871 | 871 | struct neighbor2d *neighbors2d_hashcpu( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 872 | 872 | { |
| 873 | | struct timeval tSection, tTotal; |
| 873 | struct timespec tSection, tTotal; |
| 874 | 874 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 875 | 875 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 876 | 876 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -959,7 +959,7 @@ struct neighbor2d *neighbors2d_hashcpu( uint ncells, int mesh_size, int levmx, i |
| 959 | 959 | */ |
| 960 | 960 | struct neighbor2d *neighbors2d_hashlibcpu( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 961 | 961 | { |
| 962 | | struct timeval tSection, tTotal; |
| 962 | struct timespec tSection, tTotal; |
| 963 | 963 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 964 | 964 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 965 | 965 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1044,7 +1044,7 @@ struct neighbor2d *neighbors2d_hashlibcpu( uint ncells, int mesh_size, int levmx |
| 1044 | 1044 | */ |
| 1045 | 1045 | struct neighbor2d *neighbors2d_hashcpu_opt_1(uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1046 | 1046 | { |
| 1047 | | struct timeval tSection, tTotal; |
| 1047 | struct timespec tSection, tTotal; |
| 1048 | 1048 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1049 | 1049 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1050 | 1050 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1143,7 +1143,7 @@ struct neighbor2d *neighbors2d_hashcpu_opt_1(uint ncells, int mesh_size, int lev |
| 1143 | 1143 | */ |
| 1144 | 1144 | struct neighbor2d *neighbors2d_hashlibcpu_opt_1( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1145 | 1145 | { |
| 1146 | | struct timeval tSection, tTotal; |
| 1146 | struct timespec tSection, tTotal; |
| 1147 | 1147 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1148 | 1148 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1149 | 1149 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1233,7 +1233,7 @@ struct neighbor2d *neighbors2d_hashlibcpu_opt_1( uint ncells, int mesh_size, int |
| 1233 | 1233 | */ |
| 1234 | 1234 | struct neighbor2d *neighbors2d_hashcpu_opt_2( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1235 | 1235 | { |
| 1236 | | struct timeval tSection, tTotal; |
| 1236 | struct timespec tSection, tTotal; |
| 1237 | 1237 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1238 | 1238 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1239 | 1239 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1342,7 +1342,7 @@ struct neighbor2d *neighbors2d_hashcpu_opt_2( uint ncells, int mesh_size, int le |
| 1342 | 1342 | */ |
| 1343 | 1343 | struct neighbor2d *neighbors2d_hashlibcpu_opt_2( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1344 | 1344 | { |
| 1345 | | struct timeval tSection, tTotal; |
| 1345 | struct timespec tSection, tTotal; |
| 1346 | 1346 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1347 | 1347 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1348 | 1348 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1449,7 +1449,7 @@ struct neighbor2d *neighbors2d_hashlibcpu_opt_2( uint ncells, int mesh_size, int |
| 1449 | 1449 | */ |
| 1450 | 1450 | struct neighbor2d *neighbors2d_hashcpu_opt_3(uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1451 | 1451 | { |
| 1452 | | struct timeval tSection, tTotal; |
| 1452 | struct timespec tSection, tTotal; |
| 1453 | 1453 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1454 | 1454 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1455 | 1455 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1591,7 +1591,7 @@ struct neighbor2d *neighbors2d_hashcpu_opt_3(uint ncells, int mesh_size, int lev |
| 1591 | 1591 | */ |
| 1592 | 1592 | struct neighbor2d *neighbors2d_hashlibcpu_opt_3( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1593 | 1593 | { |
| 1594 | | struct timeval tSection, tTotal; |
| 1594 | struct timespec tSection, tTotal; |
| 1595 | 1595 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1596 | 1596 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1597 | 1597 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1730,7 +1730,7 @@ struct neighbor2d *neighbors2d_hashlibcpu_opt_3( uint ncells, int mesh_size, int |
| 1730 | 1730 | |
| 1731 | 1731 | struct neighbor2d *neighbors2d_hasholdlibcpu_opt_3( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ) |
| 1732 | 1732 | { |
| 1733 | | struct timeval tSection, tTotal; |
| 1733 | struct timespec tSection, tTotal; |
| 1734 | 1734 | double setupCPUTime, createCPUTime, emptyCPUTime, writeCPUTime, readCPUTime, cleanupCPUTime, totalCPUTime; |
| 1735 | 1735 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| 1736 | 1736 | if(DETAILED_TIMING) cpu_timer_start(&tSection); |
| … | … | @@ -1864,7 +1864,7 @@ struct neighbor2d *neighbors2d_hasholdlibcpu_opt_3( uint ncells, int mesh_size, |
| 1864 | 1864 | cl_mem neighbors2d_hashgpu( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 1865 | 1865 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 1866 | 1866 | { |
| 1867 | | struct timeval tSection, tTotal; |
| 1867 | struct timespec tSection, tTotal; |
| 1868 | 1868 | double setupCPUTime, createGPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 1869 | 1869 | long startGPUTime, endGPUTime, GPUTime; |
| 1870 | 1870 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -1984,7 +1984,7 @@ cl_mem neighbors2d_hashgpu( uint ncells, int mesh_size, int levmx, cl_mem i_buff |
| 1984 | 1984 | cl_mem neighbors2d_hashlibgpu( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 1985 | 1985 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 1986 | 1986 | { |
| 1987 | | struct timeval tSection, tTotal; |
| 1987 | struct timespec tSection, tTotal; |
| 1988 | 1988 | double setupCPUTime, createCPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 1989 | 1989 | long startGPUTime, endGPUTime, GPUTime; |
| 1990 | 1990 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2106,7 +2106,7 @@ cl_mem neighbors2d_hashlibgpu( uint ncells, int mesh_size, int levmx, cl_mem i_b |
| 2106 | 2106 | cl_mem neighbors2d_hashgpu_opt_1( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2107 | 2107 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2108 | 2108 | { |
| 2109 | | struct timeval tSection, tTotal; |
| 2109 | struct timespec tSection, tTotal; |
| 2110 | 2110 | double setupCPUTime, createGPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2111 | 2111 | long startGPUTime, endGPUTime, GPUTime; |
| 2112 | 2112 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2228,7 +2228,7 @@ cl_mem neighbors2d_hashgpu_opt_1( uint ncells, int mesh_size, int levmx, cl_mem |
| 2228 | 2228 | cl_mem neighbors2d_hashlibgpu_opt_1( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2229 | 2229 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2230 | 2230 | { |
| 2231 | | struct timeval tSection, tTotal; |
| 2231 | struct timespec tSection, tTotal; |
| 2232 | 2232 | double setupCPUTime, createCPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2233 | 2233 | long startGPUTime, endGPUTime, GPUTime; |
| 2234 | 2234 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2351,7 +2351,7 @@ cl_mem neighbors2d_hashlibgpu_opt_1( uint ncells, int mesh_size, int levmx, cl_m |
| 2351 | 2351 | cl_mem neighbors2d_hashgpu_opt_2( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2352 | 2352 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2353 | 2353 | { |
| 2354 | | struct timeval tSection, tTotal; |
| 2354 | struct timespec tSection, tTotal; |
| 2355 | 2355 | double setupCPUTime, createGPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2356 | 2356 | long startGPUTime, endGPUTime, GPUTime; |
| 2357 | 2357 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2474,7 +2474,7 @@ cl_mem neighbors2d_hashgpu_opt_2( uint ncells, int mesh_size, int levmx, cl_mem |
| 2474 | 2474 | cl_mem neighbors2d_hashlibgpu_opt_2( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2475 | 2475 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2476 | 2476 | { |
| 2477 | | struct timeval tSection, tTotal; |
| 2477 | struct timespec tSection, tTotal; |
| 2478 | 2478 | double setupCPUTime, createCPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2479 | 2479 | long startGPUTime, endGPUTime, GPUTime; |
| 2480 | 2480 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2597,7 +2597,7 @@ cl_mem neighbors2d_hashlibgpu_opt_2( uint ncells, int mesh_size, int levmx, cl_m |
| 2597 | 2597 | cl_mem neighbors2d_hashgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2598 | 2598 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2599 | 2599 | { |
| 2600 | | struct timeval tSection, tTotal; |
| 2600 | struct timespec tSection, tTotal; |
| 2601 | 2601 | double setupCPUTime, createGPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2602 | 2602 | long startGPUTime, endGPUTime, GPUTime; |
| 2603 | 2603 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2719,7 +2719,7 @@ cl_mem neighbors2d_hashgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_mem |
| 2719 | 2719 | cl_mem neighbors2d_hashlibgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2720 | 2720 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2721 | 2721 | { |
| 2722 | | struct timeval tSection, tTotal; |
| 2722 | struct timespec tSection, tTotal; |
| 2723 | 2723 | double setupCPUTime, createCPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2724 | 2724 | long startGPUTime, endGPUTime, GPUTime; |
| 2725 | 2725 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |
| … | … | @@ -2847,7 +2847,7 @@ cl_mem neighbors2d_hashlibgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_m |
| 2847 | 2847 | cl_mem neighbors2d_hasholdlibgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_mem i_buffer, cl_mem j_buffer, |
| 2848 | 2848 | cl_mem level_buffer, cl_mem levtable_buffer) |
| 2849 | 2849 | { |
| 2850 | | struct timeval tSection, tTotal; |
| 2850 | struct timespec tSection, tTotal; |
| 2851 | 2851 | double setupCPUTime, createGPUTime, emptyCPUTime, writeGPUTime, readGPUTime, cleanupCPUTime, totalCPUTime; |
| 2852 | 2852 | long startGPUTime, endGPUTime, GPUTime; |
| 2853 | 2853 | if(DETAILED_TIMING) cpu_timer_start(&tTotal); |