          ***/
 
 
-        int n_total = calc_prefix(prefix,  nchild);              // inclusive scan to compute memory offset of each child (return total # of children)
+        int n_total = inclusive_scan_warp(prefix,  nchild);               // inclusive scan to compute memory offset of each child (return total # of children)
         int offset  = prefix[laneId];
         offset     += n_offset - nchild;                                  // convert inclusive into exclusive scan for referencing purpose
 

  return partial;
}
  template<const int SIZE2>
__device__ __forceinline__ int inclusive_segscan_warp(int value, const int distance)
{

#if 0

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

        /* binary prefix sum */
        flag = !split && use_node;
        n_total = warp_exclusive_scan(flag, offset);
        if (flag) approxM[n_approx + offset] = node;

        n_approx += n_total;

        while (n_approx >= DIM) 
