 #pragma unroll
     for (int j = 0; j < DIMx; j++) 
       acc_i = add_acc(acc_i, pos_i, sh_mass[offs + j], sh_pos[offs + j], eps2);
-#if 0
     direCount += DIMx;
-#endif
     __syncthreads();
   }
 

#pragma unroll 16
            for (int j = 0; j < DIMx; j++)
              acc_i = add_acc(acc_i, pos_i, sh_mass[offs + j], sh_pos[offs + j], eps2);
#if 0
            direCount += DIMx;
#endif
            __syncthreads();
#endif
          }


#if 0  /* below breaks the code */
  //Sum the interaction counters
  int *sh_dire = (int*)&sh_pot;
  int *sh_appr = (int*)&sh_acc;
  sh_dire[tid] = direCount;
  sh_appr[tid] = apprCount;
  __syncthreads();


