   int i;
   float squared_distance = 0.0;
   for(i = 0; i < num_dimensions; i++) {
-    float diff = (query_point[i] - reference_point[i]) / bandwidth;
+    float diff = (query_point[i] - reference_point[i]);
     squared_distance += diff * diff;
   }
-  float kernel_value = expf(- squared_distance * 0.5);
+  float kernel_value = exp(- squared_distance / (2 * bandwidth * bandwidth));
   (*local_sum) += kernel_value;
 }
 

  float bandwidth,
  float *query_point,
  int num_reference_points_in_this_tile,
  float *local_sum) {

  extern __shared__ float reference_point_shared_mem[];

  int i;
  float *reference_point = reference_point_shared_mem;

      reference_on_device, reference_on_host,
      num_reference_bytes, cudaMemcpyHostToDevice);

    int num_threads_per_block = 2;
    int num_blocks = (num_query_points + num_threads_per_block - 1) /
                     num_threads_per_block;

