     cudaEventCreate( &before_hyst );
     cudaEventCreate( &after_hyst );
     cudaEventRecord( before_hyst, _stream );
-    cerr << "0" << endl;
     hyst_outer_loop
         <<<1,1,0,_stream>>>
         ( getWidth(), getHeight(), _d_hysteresis_block_counter, _d_hyst_edges, _d_map );
     cudaEventRecord( after_hyst, _stream );
-    cerr << "0.1" << endl;
     cudaEventSynchronize( after_hyst );
-    cerr << "0.2" << endl;
     cudaEventElapsedTime( &ms, before_hyst, after_hyst );
     cudaEventDestroy( before_hyst );
     cudaEventDestroy( after_hyst );

}

__global__
void edge_first( cv::cuda::PtrStepSzb img, int* block_counter, cv::cuda::PtrStepSzb src, int debug_roundcount )
{
    // const int idx  = blockIdx.x * HYST_W + threadIdx.x;
    // const int idy  = blockIdx.y * HYST_H + threadIdx.y;


        img.ptr(dstidy)[dstidx] = val;
    }
}

__device__
