   int *nodes  = (int*)&direct[   DIM];            //  3*DIM, 13*DIM, 10*DIM
   int *prefix = (int*)&nodes [10*DIM];            // 13*DIM, 15*DIM,  2*DIM
 
+#ifndef OLDPREFIX
+  __shared__ int prefix_shmem[32];
+#endif
+
   float  *node_mon0 = (float* )&nodes    [DIM];   //  4*DIM,  5*DIM,  1*DIM
   float3 *node_mon1 = (float3*)&node_mon0[DIM];   //  5*DIM,  8*DIM,  3*DIM
 #if 0


#define WARP_SIZE2 5
#define WARP_SIZE  (1 << WARP_SIZE2)
template<class T>
struct ADDOP 
{
  __device__ static inline T identity()           {return (T)(0);}
  __device__ static inline T apply(T a, T b)      {return (T)(a + b);};
  __device__ static inline T unapply(T a, T b)    {return (T)(a - b);};
  __device__ static inline T mask(bool flag, T b) {return (T)(-(int)(flag) & b);};
};


#if 1


        /******       APPROX          ******/
        /***********************************/

        offset2 = inclusive_scan_blockS<DIM2>(prefix_shmem, 1 - (split || !use_node), tid);
        offset  = offset2.x;
        n_total = offset2.y;
        if (!split && use_node) approx[n_approx + offset - 1] = node;
        __syncthreads();

        n_approx += n_total;

        while (n_approx >= DIM) 
