Skip to content
Snippets Groups Projects
Commit 6c831c1c authored by Claudio Gheller's avatar Claudio Gheller
Browse files

bug fix on nbucket

parent a3badff9
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,7 @@ __global__ void phase_g(int xaxis,
double add_term_real;
double add_term_img;
double wterm;
long arraysize = (long)((xaxis*yaxis*num_w_planes)/nbucket + 1);
long arraysize = (long)((xaxis*yaxis*num_w_planes)/nbucket);
if(gid < arraysize)
{
......@@ -95,7 +95,8 @@ void phase_correction(double* gridss, double* image_real, double* image_imag, in
#ifdef __CUDACC__
int nbucket = 32;
// WARNING: nbucket MUST be chosen such that xaxis*yaxis*num_w_planes is a multiple of nbucket
int nbucket = 1;
int Nth = NTHREADS;
long Nbl = (long)((num_w_planes*xaxis*yaxis)/Nth/nbucket) + 1;
if(NWORKERS == 1) {Nbl = 1; Nth = 1;};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment