diff --git a/modules/cudaarithm/src/cuda/absdiff_scalar.cu b/modules/cudaarithm/src/cuda/absdiff_scalar.cu index be3046b3cb..01770a5f23 100644 --- a/modules/cudaarithm/src/cuda/absdiff_scalar.cu +++ b/modules/cudaarithm/src/cuda/absdiff_scalar.cu @@ -56,14 +56,14 @@ void absDiffScalar(const GpuMat& src, cv::Scalar val, bool, GpuMat& dst, const G namespace { - template struct AbsDiffScalarOp : unary_function + template struct AbsDiffScalarOp : unary_function { ScalarType val; - __device__ __forceinline__ SrcType operator ()(SrcType a) const + __device__ __forceinline__ DstType operator ()(SrcType a) const { abs_func f; - return saturate_cast(f(saturate_cast(a) - val)); + return saturate_cast(f(saturate_cast(a) - val)); } }; @@ -84,7 +84,7 @@ namespace cv::Scalar_ value_ = value; - AbsDiffScalarOp op; + AbsDiffScalarOp op; op.val = VecTraits::make(value_.val); gridTransformUnary_< TransformPolicy >(globPtr(src), globPtr(dst), op, stream); } @@ -96,22 +96,22 @@ void absDiffScalar(const GpuMat& src, cv::Scalar val, bool, GpuMat& dst, const G static const func_t funcs[7][4] = { { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { - absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl + absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl }, { absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl, absDiffScalarImpl