   data[index] = cur_nearest;
 }
 
-__global__ void  /*__launch_bounds__(16)*/ jfa_thrust_gather(int image_size, int num_labels,
+__global__ void  /*__launch_bounds__(16)*/ jfa_thrust_gather(int imageSize, int num_labels,
                                                              int* thrustptr, int* seedidptr, int* seedidxptr)
 {
   int x = blockIdx.x*blockDim.x + threadIdx.x;
   int y = blockIdx.y*blockDim.y + threadIdx.y;
-  int index = y*image_size + x;
+  int index = y*imageSize + x;
   float4 color;
   int labelID = 100;
   int labelIndex = thrustptr[index];
-  //int ly = labelID/image_size;
-  //int lx = labelID - ly*image_size;
+  //int ly = labelID/imageSize;
+  //int lx = labelID - ly*imageSize;
 
   //bool foundcolor = false;
   for (int i=0;i<num_labels;i++)
   {
-    //int sly = seedptr[i]/image_size;
-    //int slx = seedptr[i] - sly*image_size;
+    //int sly = seedptr[i]/imageSize;
+    //int slx = seedptr[i] - sly*imageSize;
     //if (slx == lx && sly == ly)
     //{
     if (labelIndex == seedidxptr[i])

      //printf("not hit: outval: %f %f %f %f %d %d %f %f %f \n",outval.x, outval.y, outval.z, outval.w, x, y, seedval.x, seedval.y, seedval.z);
    }
    idptr[i] = int(seedval.x);
    idxptr[i] = int(seedval.y) + int(seedval.z)*image_size;
  }

  thrustptr[index] = outindex;

  // first with step size 1
  compute_temp_vector = compute_vector;
  apollonius_thrust(compute_vector, compute_temp_vector,
                    distance_vector, 1, imageSize, imageSize);
  compute_vector.swap(compute_temp_vector);


  for(int k = (imageSize / 2); k > 0; k /= 2)
  {
    //printf("step size: %d\n",k);
    apollonius_thrust(compute_vector, compute_temp_vector,
                      distance_vector, k, imageSize, imageSize);

    compute_vector.swap(compute_temp_vector);
  }
