     }
 };
 
-__shared__ int2  edge_buffer[2][EDGE_LINKING_MAX_EDGE_LENGTH]; // convexEdgeSegment
-__shared__ int   edge_buffer_head[2];
+__shared__ int2  edge_buffer[EDGE_LINKING_MAX_EDGE_LENGTH]; // convexEdgeSegment
+__shared__ int   edge_index[2];
 
 struct EdgeBuffer
 {

    __device__ inline
    const int2& get( Direction d )
    {
        return edge_buffer[d][edge_buffer_head[d]];
    }

    __device__ inline
    void append( Direction d, int2 val )
    {
        edge_buffer_head[d]++;
        edge_buffer[d][edge_buffer_head[d]] = val;
    }

    __device__ inline
    int size() const
    {
        return edge_buffer_head[Left] + edge_buffer_head[Right] + 1;
    }

    __device__

        // This direction still has points.
        // We can identify the highest threadId / lowest rotation value j
        uint32_t computer = __ffs( any_point_found ) - 1;

        found = LOW_FLOW;

