| … | … | @@ -179,7 +179,7 @@ cl_kernel neighbors2d_hashwrite_kern, neighbors2d_hashwrite_opt_1_kern, neighbor |
| 179 | 179 | intintHash_Factory *factory; |
| 180 | 180 | intintHash_Factory *CLFactory; |
| 181 | 181 | |
| 182 | | void neighbors2d( uint mesh_size, int levmx, int threshold, int *options, int haveGPU); |
| 182 | void neighbors2d( uint mesh_size, int levmx, float threshold, int *options, int haveGPU); |
| 183 | 183 | struct neighbor2d *neighbors2d_bruteforce( uint ncells, int *i, int *j, int *level ); |
| 184 | 184 | struct neighbor2d *neighbors2d_kdtree( uint ncells, int mesh_size, double *x, double *y, int *level ); |
| 185 | 185 | struct neighbor2d *neighbors2d_hashcpu( uint ncells, int mesh_size, int levmx, int *i, int *j, int *level ); |
| … | … | @@ -204,7 +204,7 @@ cl_mem neighbors2d_hashlibgpu_opt_3( uint ncells, int mesh_size, int levmx, cl_m |
| 204 | 204 | cl_mem neighbors2d_hashlibgpu_opt_4( uint ncells, int mesh_size, int levmx, cl_mem i, cl_mem j, cl_mem level, cl_mem levtable); |
| 205 | 205 | #endif |
| 206 | 206 | |
| 207 | | int adaptiveMeshConstructorWij(const int n, const int l, int** level_ptr, double** x_ptr, double** y_ptr, int **i_ptr, int **j_ptr, int threshold, int target_ncells); |
| 207 | int adaptiveMeshConstructorWij(const int n, const int l, int** level_ptr, double** x_ptr, double** y_ptr, int **i_ptr, int **j_ptr, float threshold, int target_ncells); |
| 208 | 208 | void genmatrixfree(void **var); |
| 209 | 209 | void **genmatrix(int jnum, int inum, size_t elsize); |
| 210 | 210 | FILE * fmem; |
| … | … | @@ -233,7 +233,7 @@ int main (int argc, const char * argv[]) |
| 233 | 233 | char add_string[40]; |
| 234 | 234 | |
| 235 | 235 | int *options; |
| 236 | | int threshold = 20; |
| 236 | float threshold = 1.0; |
| 237 | 237 | |
| 238 | 238 | uint levmx_min = 1; |
| 239 | 239 | uint levmx_max = 6; |
| … | … | @@ -258,7 +258,7 @@ int main (int argc, const char * argv[]) |
| 258 | 258 | } |
| 259 | 259 | if (strcmp(argv[i], "-t") == 0) { |
| 260 | 260 | i++; |
| 261 | | threshold =(int)(atoi(argv[i])); |
| 261 | threshold =(atof(argv[i])); |
| 262 | 262 | } |
| 263 | 263 | if (strcmp(argv[i], "-l") == 0) { |
| 264 | 264 | i++; |
| … | … | @@ -381,7 +381,7 @@ int main (int argc, const char * argv[]) |
| 381 | 381 | printf("\n 2D Neighbors Performance Results\n\n"); |
| 382 | 382 | printf("%s\n",header); |
| 383 | 383 | |
| 384 | | printf("\nThreshold for refinement is %d\n",threshold); |
| 384 | printf("\nThreshold for refinement is %f\n",threshold); |
| 385 | 385 | printf("\nWork group size is %d and init workgroup size is %d\n",TILE_SIZE,TILE_SIZE_INIT); |
| 386 | 386 | for (uint levmx = levmx_min; levmx < levmx_max; levmx++ ){ |
| 387 | 387 | printf("\nMax levels is %d\n",levmx); |
| … | … | @@ -425,7 +425,7 @@ void neigh2dCLTester(int ncells, int *level, struct neighbor2d *neigh2d_gold, cl |
| 425 | 425 | } |
| 426 | 426 | #endif |
| 427 | 427 | |
| 428 | | void neighbors2d( uint mesh_size, int levmx, int threshold, int *options, int haveGPU) |
| 428 | void neighbors2d( uint mesh_size, int levmx, float threshold, int *options, int haveGPU) |
| 429 | 429 | { |
| 430 | 430 | struct neighbor2d *neigh2d_gold, *neigh2d_test; |
| 431 | 431 | |
| … | … | @@ -2996,7 +2996,7 @@ cl_mem neighbors2d_hasholdlibgpu_opt_3( uint ncells, int mesh_size, int levmx, c |
| 2996 | 2996 | // Output: number of cells in the adaptive mesh |
| 2997 | 2997 | // |
| 2998 | 2998 | int adaptiveMeshConstructorWij(const int n, const int levmax, |
| 2999 | | int** level_ptr, double** x_ptr, double** y_ptr, int **i_ptr, int **j_ptr, int threshold, int target_ncells) { |
| 2999 | int** level_ptr, double** x_ptr, double** y_ptr, int **i_ptr, int **j_ptr, float threshold, int target_ncells) { |
| 3000 | 3000 | int ncells = SQ(n); |
| 3001 | 3001 | |
| 3002 | 3002 | // ints used for for() loops later |