           _d_edgelist_2, _d_edge_counter,
           _d_next_edge_coord,
           _d_next_edge_after,
+          _d_next_edge_befor,
           max_num_edges, _d_edges, nmax, _d_dx, _d_dy, threshold ); // , _d_out_points );
     POP_CHK_CALL_IFSYNC;
 

                       uint32_t*              d_new_edgelist_sz,
                       cv::cuda::PtrStepSz32s d_next_edge_coord,
                       cv::cuda::PtrStepSz32s d_next_edge_after,
                       uint32_t               max_num_edges,
                       cv::cuda::PtrStepSzb   edges,
                       uint32_t               nmax,

    const int CANNY_SHIFT = 15;
    const int TG22 = (int32_t)(0.4142135623730950488016887242097*(1<<CANNY_SHIFT) + 0.5);

    const int block_x = blockIdx.x * 32;
    const int idx     = block_x + threadIdx.x;
    const int idy     = blockIdx.y;

