         return;
     }
 
-    /* We could re-use edges, but it has only 1-byte cells.
-     * Seeds may have int-valued indices, so we need 4-byte cells.
-     * _d_intermediate is a float image, and can be used.
+#ifdef NDEBUG
+    POP_CUDA_SYNC( _stream );
+    cout << "  Searching arcs from " << _vote._seed_indices.host.size << " seeds" << endl;
+#endif // NDEBUG
+
+    /* Both init steps should be done in another stream, earlier. No reason to do
+     * this synchronously.
      */
-    // cv::cuda::PtrStepSz32s edge_cast( _d_intermediate );
-
     POP_CUDA_SET0_ASYNC( _d_ring_counter, _stream );
 
     POP_CUDA_MEMSET_ASYNC( _d_ring_output.data, 0, _d_ring_output.step*_d_ring_output.rows, _stream );


    POP_CHK_CALL_IFSYNC;

    cout << "Leave " << __FUNCTION__ << endl;
}
}; // namespace popart


    if( threadIdx.x == 0 )
    {

        if( (i == EDGE_LINKING_MAX_EDGE_LENGTH) || (found == CONVEXITY_LOST) ) {
            int convexEdgeSegmentSize = buf.size();
            if (convexEdgeSegmentSize > param_windowSizeOnInnerEllipticSegment) {
                int write_index = atomicAdd( d_ring_counter, 1 );
                if( write_index <= d_ring_counter_max ) {
                    printf("The number of points reached from (%d,%d): %d (average vote %f)\n", p->coord.x, p->coord.y, i, averageVote );
                    buf.copy( d_ring_output, write_index );
                } else {
                    printf("From (%d,%d): %d (average vote %f) - skip, max number of arcs reached (%d)\n", p->coord.x, p->coord.y, i, averageVote, d_ring_counter_max );
                }
            } else {
                printf("From (%d,%d): %d (average vote %f) - skip, edge segment size %d <= %d\n", p->coord.x, p->coord.y, i, averageVote, convexEdgeSegmentSize, param_windowSizeOnInnerEllipticSegment );
            }
        } else {
            printf("From (%d,%d): %d (average vote %f) - skip, not max length, not convexity lost, but %d\n", p->coord.x, p->coord.y, i, averageVote, found );
        }
    }
}
