         if((n_stack1 - c_stack0) >= (LMEM_STACK_SIZE << SHIFT))
         {
           //We overwrote our current stack
-	  apprCount = -1; return acc_i;	 
-	}
+          apprCount = -1; return acc_i;	 
+        }
       }
       __syncthreads();
 
 
       /***
-      **** --> copy nodes1 to nodes0: done by reassigning the pointers
-      ***/
+       **** --> copy nodes1 to nodes0: done by reassigning the pointers
+       ***/
       n_nodes0    = n_nodes1;
 
       n_stack_pre = n_stack0;


      float4 posj = body_pos[direct[tid]];

  //     float4 posj  = tex1Dfetch(texBody, direct[tid]);
      sh_mass[tid] = posj.w;
      sh_pos [tid] = make_float3(posj.x, posj.y, posj.z);
      sh_jid [tid] = direct[tid];

      #ifdef INDSOFT
        sh_eps [tid] = body_vel[direct[tid]].w;
      #endif
    } else {
      sh_mass[tid] = 0.0f;
      sh_pos [tid] = make_float3(1.0e10f, 1.0e10f, 1.0e10f);
      sh_jid [tid] = -1;

      #ifdef INDSOFT
        sh_eps [tid] = 0.01f;
      #endif
    }

    __syncthreads();
  #pragma unroll
    for (int j = 0; j < DIMx; j++) {
      if ((sh_jid[offs + j] >= 0)) {
        int selfGrav = (body_i != sh_jid[offs + j]);
        float ds2 =  1.0e10f;
        direCount++;
  #ifdef DOGRAV
        #ifdef INDSOFT
          acc_i = add_acc(acc_i, pos_i, sh_mass[offs + j], sh_pos[offs + j], sh_eps[offs + j], ds2, eps2, selfGrav);
        #else
          acc_i = add_acc(acc_i, pos_i, sh_mass[offs + j], sh_pos[offs + j], ds2, eps2, selfGrav);
        #endif
  #endif
        ds2 += selfGrav*1.0e10f;
        if (ds2 < ds2_min) {
          ngb     = sh_jid[offs + j];



  if (ty == 0) {
#pragma unroll
    for (int i = 1; i < DIMy; i++){
      int idx = (i << DIM2x) + tx;
      direCount  += sh_ds2[idx];
      apprCount  += sh_ngb[idx];
    }
  }
  __syncthreads();
