 
 
   //Sum the interaction counters
-#if 0
+  float  *sh_ds2 = (float*)&sh_acc[DIM];
+  int    *sh_ngb = (int*  )&sh_ds2[DIM];
   sh_ds2[tid] = direCount;
   sh_ngb[tid] = apprCount;
 

#pragma unroll
    for (int i = 0; i < DIMx; i++)
      acc_i = add_acc(acc_i, pos_i, node_mon0[offs + i], node_mon1[offs+i],eps2);
#if 0
    apprCount += DIMx;
#endif

    __syncthreads();
  } //if n_approx > 0

#pragma unroll
          for (int i = 0; i < DIMx; i++)
            acc_i = add_acc(acc_i, pos_i, node_mon0[offs + i], node_mon1[offs+i], eps2);
          apprCount += DIMx;
          __syncthreads();
        }
        __syncthreads();
