Commit dc69cf3a authored by Anatoly Baksheev's avatar Anatoly Baksheev

minor fixes

parent f7c98c86
...@@ -304,7 +304,7 @@ namespace cv ...@@ -304,7 +304,7 @@ namespace cv
CopyToFunc func = tab[depth]; CopyToFunc func = tab[depth];
if (func == 0) cv::gpu::error("Unsupported convert operation", __FILE__, __LINE__); if (func == 0) cv::gpu::error("Unsupported copyTo operation", __FILE__, __LINE__);
func(mat_src, mat_dst, mask, channels, stream); func(mat_src, mat_dst, mask, channels, stream);
} }
...@@ -371,7 +371,7 @@ namespace cv ...@@ -371,7 +371,7 @@ namespace cv
SetToFunc_without_mask func = tab[depth]; SetToFunc_without_mask func = tab[depth];
if (func == 0) if (func == 0)
cv::gpu::error("Unsupported convert operation", __FILE__, __LINE__); cv::gpu::error("Unsupported setTo operation", __FILE__, __LINE__);
func(mat, channels, stream); func(mat, channels, stream);
} }
...@@ -396,7 +396,7 @@ namespace cv ...@@ -396,7 +396,7 @@ namespace cv
SetToFunc_with_mask func = tab[depth]; SetToFunc_with_mask func = tab[depth];
if (func == 0) if (func == 0)
cv::gpu::error("Unsupported convert operation", __FILE__, __LINE__); cv::gpu::error("Unsupported setTo operation", __FILE__, __LINE__);
func(mat, mask, channels, stream); func(mat, mask, channels, stream);
} }
......
...@@ -73,7 +73,7 @@ namespace cv ...@@ -73,7 +73,7 @@ namespace cv
{ int iv = __float2int_rn(v); return saturate_cast<uchar>(iv); } { int iv = __float2int_rn(v); return saturate_cast<uchar>(iv); }
template<> __device__ uchar saturate_cast<uchar>(double v) template<> __device__ uchar saturate_cast<uchar>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
int iv = __double2int_rn(v); return saturate_cast<uchar>(iv); int iv = __double2int_rn(v); return saturate_cast<uchar>(iv);
#else #else
return saturate_cast<uchar>((float)v); return saturate_cast<uchar>((float)v);
...@@ -98,7 +98,7 @@ namespace cv ...@@ -98,7 +98,7 @@ namespace cv
{ int iv = __float2int_rn(v); return saturate_cast<schar>(iv); } { int iv = __float2int_rn(v); return saturate_cast<schar>(iv); }
template<> __device__ schar saturate_cast<schar>(double v) template<> __device__ schar saturate_cast<schar>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
int iv = __double2int_rn(v); return saturate_cast<schar>(iv); int iv = __double2int_rn(v); return saturate_cast<schar>(iv);
#else #else
return saturate_cast<schar>((float)v); return saturate_cast<schar>((float)v);
...@@ -117,7 +117,7 @@ namespace cv ...@@ -117,7 +117,7 @@ namespace cv
{ int iv = __float2int_rn(v); return saturate_cast<ushort>(iv); } { int iv = __float2int_rn(v); return saturate_cast<ushort>(iv); }
template<> __device__ ushort saturate_cast<ushort>(double v) template<> __device__ ushort saturate_cast<ushort>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
int iv = __double2int_rn(v); return saturate_cast<ushort>(iv); int iv = __double2int_rn(v); return saturate_cast<ushort>(iv);
#else #else
return saturate_cast<ushort>((float)v); return saturate_cast<ushort>((float)v);
...@@ -137,7 +137,7 @@ namespace cv ...@@ -137,7 +137,7 @@ namespace cv
{ int iv = __float2int_rn(v); return saturate_cast<short>(iv); } { int iv = __float2int_rn(v); return saturate_cast<short>(iv); }
template<> __device__ short saturate_cast<short>(double v) template<> __device__ short saturate_cast<short>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
int iv = __double2int_rn(v); return saturate_cast<short>(iv); int iv = __double2int_rn(v); return saturate_cast<short>(iv);
#else #else
return saturate_cast<short>((float)v); return saturate_cast<short>((float)v);
...@@ -147,7 +147,7 @@ namespace cv ...@@ -147,7 +147,7 @@ namespace cv
template<> __device__ int saturate_cast<int>(float v) { return __float2int_rn(v); } template<> __device__ int saturate_cast<int>(float v) { return __float2int_rn(v); }
template<> __device__ int saturate_cast<int>(double v) template<> __device__ int saturate_cast<int>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
return __double2int_rn(v); return __double2int_rn(v);
#else #else
return saturate_cast<int>((float)v); return saturate_cast<int>((float)v);
...@@ -157,7 +157,7 @@ namespace cv ...@@ -157,7 +157,7 @@ namespace cv
template<> __device__ uint saturate_cast<uint>(float v){ return __float2uint_rn(v); } template<> __device__ uint saturate_cast<uint>(float v){ return __float2uint_rn(v); }
template<> __device__ uint saturate_cast<uint>(double v) template<> __device__ uint saturate_cast<uint>(double v)
{ {
#if defined __CUDA_ARCH__ && __CUDA_ARCH__ >= 130 #if defined (__CUDA_ARCH__) && __CUDA_ARCH__ >= 130
return __double2uint_rn(v); return __double2uint_rn(v);
#else #else
return saturate_cast<uint>((float)v); return saturate_cast<uint>((float)v);
......
...@@ -149,7 +149,7 @@ void cv::gpu::GpuMat::convertTo( GpuMat& dst, int rtype, double alpha, double be ...@@ -149,7 +149,7 @@ void cv::gpu::GpuMat::convertTo( GpuMat& dst, int rtype, double alpha, double be
GpuMat& GpuMat::operator = (const Scalar& s) GpuMat& GpuMat::operator = (const Scalar& s)
{ {
cv::gpu::impl::set_to_without_mask( *this, depth(), s.val, channels()); impl::set_to_without_mask( *this, depth(), s.val, channels());
return *this; return *this;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment