added safe call support in cu files
This commit is contained in:
@@ -51,7 +51,9 @@ namespace cv
|
||||
{
|
||||
typedef unsigned char uchar;
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned int uint;
|
||||
|
||||
extern "C" void error( const char *error_string, const char *file, const int line, const char *func = "");
|
||||
|
||||
namespace impl
|
||||
{
|
||||
@@ -62,4 +64,8 @@ namespace cv
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __CUDACC__
|
||||
#define cudaSafeCall(err) { if( cudaSuccess != err) cv::gpu::error(cudaGetErrorString(err), __FILE__, __LINE__); }
|
||||
#endif
|
||||
|
||||
#endif /* __OPENCV_CUDA_SHARED_HPP__ */
|
||||
|
@@ -297,7 +297,6 @@ extern "C" void cv::gpu::impl::stereoBM_GPU(const DevMem2D& left, const DevMem2D
|
||||
|
||||
size_t smem_size = (BLOCK_W + N_DISPARITIES * SHARED_MEM_SIZE) * sizeof(unsigned int);
|
||||
|
||||
#define cudaSafeCall
|
||||
cudaSafeCall( cudaMemset2D(disp.ptr, disp.step, 0, disp.cols, disp. rows) );
|
||||
cudaSafeCall( cudaMemset2D(minSSD_buf.ptr, minSSD_buf.step, 0xFF, minSSD_buf.cols * minSSD_buf.elemSize(), disp. rows) );
|
||||
|
||||
|
Reference in New Issue
Block a user