compilation with CUDA5.0 (#1982, thanks to Rodrigo)
authorAnatoly Baksheev <no@email>
Fri, 25 May 2012 09:44:00 +0000 (09:44 +0000)
committerAnatoly Baksheev <no@email>
Fri, 25 May 2012 09:44:00 +0000 (09:44 +0000)
modules/gpu/src/element_operations.cpp
modules/gpu/src/matrix_reductions.cpp

index 904ef00..c32f94c 100644 (file)
@@ -998,7 +998,11 @@ namespace
         typedef NppTypeTraits<CV_16U>::npp_t npp_t;\r
         typedef Npp32u scalar_t;\r
 \r
+#if (CUDA_VERSION <= 4020)\r
         typedef NppStatus (*func_t)(const Npp16u* pSrc1, int nSrc1Step, Npp16u* pDst, int nDstStep, NppiSize oSizeROI, Npp32u nConstant);\r
+#else\r
+        typedef NppStatus (*func_t)(const Npp16u * pSrc1, int nSrc1Step, Npp16u * pDst,  int nDstStep,  NppiSize oSizeROI, Npp16u nConstant);\r
+#endif\r
     };\r
 \r
     template <int DEPTH, typename NppAbsDiffCFunc<DEPTH>::func_t func> struct NppAbsDiffC\r
index 4fa81e1..ab6e005 100644 (file)
@@ -128,7 +128,11 @@ void cv::gpu::meanStdDev(const GpuMat& src, Scalar& mean, Scalar& stddev, GpuMat
     DeviceBuffer dbuf(2);\r
 \r
     int bufSize;\r
+#if (CUDA_VERSION <= 4020)\r
     nppSafeCall( nppiMeanStdDev8uC1RGetBufferHostSize(sz, &bufSize) );\r
+#else\r
+    nppSafeCall( nppiMeanStdDevGetBufferHostSize_8u_C1R(sz, &bufSize) );\r
+#endif\r
 \r
     ensureSizeIsEnough(1, bufSize, CV_8UC1, buf);\r
 \r