Merged revision(s) 8455 from trunk/opencv/modules/gpu/src:
authorAnatoly Baksheev <no@email>
Fri, 25 May 2012 09:45:42 +0000 (09:45 +0000)
committerAnatoly Baksheev <no@email>
Fri, 25 May 2012 09:45:42 +0000 (09:45 +0000)
compilation with CUDA5.0 (#1982, thanks to Rodrigo)
........

modules/gpu/src/element_operations.cpp
modules/gpu/src/matrix_reductions.cpp

index 68221c4..c614af8 100644 (file)
@@ -997,7 +997,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