 
     bool keep = thinning_inner( idx, idy, src, dst, false );
 
-    uint32_t mask = __balloc( keep );  // bitfield of warps with results
+    uint32_t mask = __ballot( keep );  // bitfield of warps with results
     uint32_t ct   = __popc( mask );    // horizontal reduce
     uint32_t leader = __ffs(mask) - 1; // the highest thread id with indicator==true
     uint32_t write_index;


    if( outOfBounds( x, y, edges ) ) return false;

    ret = edges.ptr(y)[x];
    if( ret ) {
        out_edge_info = make_int4( idx, idy, x, y );
        return true;

                             int32_t                thrGradient )
{
    const int offset    = blockIdx.x * 32 + threadIdx.y;
    int direction = threadIdx.x == 0 ? 1 : -1;

    if( offset >= edgeCount ) return false;

