fixes for the newly added gcc warning keys
authorMarina Kolpakova <no@email>
Thu, 21 Jun 2012 03:48:36 +0000 (03:48 +0000)
committerMarina Kolpakova <no@email>
Thu, 21 Jun 2012 03:48:36 +0000 (03:48 +0000)
20 files changed:
modules/gpu/CMakeLists.txt
modules/gpu/src/arithm.cpp
modules/gpu/src/cuda/bf_knnmatch.cu
modules/gpu/src/cuda/bf_match.cu
modules/gpu/src/cuda/bf_radius_match.cu
modules/gpu/src/cuda/hog.cu
modules/gpu/src/cuda/remap.cu
modules/gpu/src/cuda/resize.cu
modules/gpu/src/cuda/warp.cu
modules/gpu/src/nvidia/NCVBroxOpticalFlow.cu
modules/gpu/src/nvidia/NCVHaarObjectDetection.cu
modules/gpu/src/nvidia/core/NCV.cu
modules/gpu/src/nvidia/core/NCV.hpp
modules/gpu/src/nvidia/core/NCVRuntimeTemplates.hpp
modules/gpu/src/opencv2/gpu/device/filters.hpp
modules/gpu/src/opencv2/gpu/device/functional.hpp
modules/gpu/test/nvidia/TestHypothesesFilter.cpp
modules/gpu/test/nvidia/TestResize.cpp
modules/gpu/test/nvidia/main_nvidia.cpp
modules/gpu/test/test_nvidia.cpp

index 6459497..3f7693a 100644 (file)
@@ -30,6 +30,7 @@ if (HAVE_CUDA)
   source_group("Src\\NVidia" FILES ${ncv_files})
   ocv_include_directories("src/nvidia" "src/nvidia/core" "src/nvidia/NPP_staging" ${CUDA_INCLUDE_DIRS})
   ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations /wd4211 /wd4201 /wd4100 /wd4505 /wd4408)
+  string(REPLACE "-Wsign-promo" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 
   #set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-keep")
   #set (CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} "-Xcompiler;/EHsc-;")
index 2a0dfee..45196a5 100644 (file)
@@ -68,7 +68,7 @@ void cv::gpu::polarToCart(const GpuMat&, const GpuMat&, GpuMat&, GpuMat&, bool,
 void cv::gpu::gemm(const GpuMat& src1, const GpuMat& src2, double alpha, const GpuMat& src3, double beta, GpuMat& dst, int flags, Stream& stream)\r
 {\r
 #ifndef HAVE_CUBLAS\r
-\r
+    (void)src1; (void)src2; (void)alpha; (void)src3; (void)beta; (void)dst; (void)flags; (void)stream;\r
     CV_Error(CV_StsNotImplemented, "The library was build without CUBLAS");\r
 \r
 #else\r
index 19dc9df..8ee3c26 100644 (file)
@@ -748,6 +748,7 @@ namespace cv { namespace gpu { namespace device
                               const DevMem2Db& trainIdx, const DevMem2Db& distance,\r
                               int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolledCached<16, 64, Dist>(query, train, mask, static_cast< DevMem2D_<int2> >(trainIdx), static_cast< DevMem2D_<float2> > (distance), stream);\r
@@ -779,6 +780,7 @@ namespace cv { namespace gpu { namespace device
                               const DevMem2Db& trainIdx, const DevMem2Db& imgIdx, const DevMem2Db& distance,\r
                               int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolledCached<16, 64, Dist>(query, trains, n, mask, static_cast< DevMem2D_<int2> >(trainIdx), static_cast< DevMem2D_<int2> >(imgIdx), static_cast< DevMem2D_<float2> > (distance), stream);\r
@@ -943,6 +945,7 @@ namespace cv { namespace gpu { namespace device
                                     const DevMem2Df& allDist,\r
                                     int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 calcDistanceUnrolled<16, 64, Dist>(query, train, mask, allDist, stream);\r
index 0248dbf..3068c81 100644 (file)
@@ -567,6 +567,7 @@ namespace cv { namespace gpu { namespace device
                              const DevMem2Di& trainIdx, const DevMem2Df& distance,\r
                              int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolledCached<16, 64, Dist>(query, train, mask, trainIdx, distance, stream);\r
@@ -598,6 +599,7 @@ namespace cv { namespace gpu { namespace device
                              const DevMem2Di& trainIdx, const DevMem2Di& imgIdx, const DevMem2Df& distance,\r
                              int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolledCached<16, 64, Dist>(query, trains, n, mask, trainIdx, imgIdx, distance, stream);\r
index 015ac0b..0aa7191 100644 (file)
@@ -281,6 +281,7 @@ namespace cv { namespace gpu { namespace device
                              const DevMem2Di& trainIdx, const DevMem2Df& distance, const DevMem2D_<unsigned int>& nMatches,\r
                              int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolled<16, 64, Dist>(query, train, maxDistance, mask, trainIdx, distance, nMatches, stream);\r
@@ -312,6 +313,7 @@ namespace cv { namespace gpu { namespace device
                              const DevMem2Di& trainIdx, const DevMem2Di& imgIdx, const DevMem2Df& distance, const DevMem2D_<unsigned int>& nMatches,\r
                              int cc, cudaStream_t stream)\r
         {\r
+            (void)cc;\r
             if (query.cols <= 64)\r
             {\r
                 matchUnrolled<16, 64, Dist>(query, trains, n, maxDistance, masks, trainIdx, imgIdx, distance, nMatches, stream);\r
index 27c550f..8150bf9 100644 (file)
@@ -619,6 +619,7 @@ namespace cv { namespace gpu { namespace device
         void compute_gradients_8UC4(int nbins, int height, int width, const DevMem2Db& img,\r
                                     float angle_scale, DevMem2Df grad, DevMem2Db qangle, bool correct_gamma)\r
         {\r
+            (void)nbins;\r
             const int nthreads = 256;\r
 \r
             dim3 bdim(nthreads, 1);\r
@@ -691,6 +692,7 @@ namespace cv { namespace gpu { namespace device
         void compute_gradients_8UC1(int nbins, int height, int width, const DevMem2Db& img,\r
                                     float angle_scale, DevMem2Df grad, DevMem2Db qangle, bool correct_gamma)\r
         {\r
+            (void)nbins;\r
             const int nthreads = 256;\r
 \r
             dim3 bdim(nthreads, 1);\r
index 80bdb2f..a0b1e0d 100644 (file)
@@ -87,6 +87,9 @@ namespace cv { namespace gpu { namespace device
         {\r
             static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, DevMem2Df mapx, DevMem2Df mapy, DevMem2D_<T> dst, const float* borderValue, int)\r
             {\r
+                (void)srcWhole;\r
+                (void)xoff;\r
+                (void)yoff;\r
                 typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;\r
 \r
                 dim3 block(32, 8);\r
index c0f9d58..e0c8cae 100644 (file)
@@ -131,6 +131,10 @@ namespace cv { namespace gpu { namespace device
         {\r
             static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, float fx, float fy, DevMem2D_<T> dst)\r
             {\r
+                (void)srcWhole;\r
+                (void)xoff;\r
+                (void)yoff;\r
+\r
                 dim3 block(32, 8);\r
                 dim3 grid(divUp(dst.cols, block.x), divUp(dst.rows, block.y));\r
 \r
@@ -219,6 +223,9 @@ namespace cv { namespace gpu { namespace device
         {\r
             static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, float fx, float fy, DevMem2D_<T> dst, cudaStream_t stream)\r
             {\r
+                (void)srcWhole;\r
+                (void)xoff;\r
+                (void)yoff;\r
                 int iscale_x = round(fx);\r
                 int iscale_y = round(fy);\r
 \r
index d40029e..4757f9b 100644 (file)
@@ -158,6 +158,10 @@ namespace cv { namespace gpu { namespace device
         {\r
             static void call(DevMem2D_<T> src, DevMem2D_<T> srcWhole, int xoff, int yoff, DevMem2D_<T> dst, const float* borderValue, int)\r
             {\r
+                (void)xoff;\r
+                (void)yoff;\r
+                (void)srcWhole;\r
+\r
                 typedef typename TypeVec<float, VecTraits<T>::cn>::vec_type work_type;\r
 \r
                 dim3 block(32, 8);\r
index 6ade899..e04ec84 100644 (file)
@@ -1136,7 +1136,7 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
                     ptrVNew->ptr(), dstSize, ns * sizeof (float), dstROI, 1.0f/scale_factor, 1.0f/scale_factor, nppStBicubic) );\r
 \r
                 ScaleVector(ptrVNew->ptr(), ptrVNew->ptr(), 1.0f/scale_factor, ns * nh, stream);\r
-                ncvAssertCUDALastErrorReturn(NCV_CUDA_ERROR);\r
+                ncvAssertCUDALastErrorReturn((int)NCV_CUDA_ERROR);\r
 \r
                 cv::gpu::device::swap<FloatVector*>(ptrU, ptrUNew);\r
                 cv::gpu::device::swap<FloatVector*>(ptrV, ptrVNew);\r
@@ -1145,17 +1145,17 @@ NCVStatus NCVBroxOpticalFlow(const NCVBroxOpticalFlowDescriptor desc,
         }\r
 \r
         // end of warping iterations\r
-        ncvAssertCUDAReturn(cudaStreamSynchronize(stream), NCV_CUDA_ERROR);\r
+        ncvAssertCUDAReturn(cudaStreamSynchronize(stream), (int)NCV_CUDA_ERROR);\r
 \r
         ncvAssertCUDAReturn( cudaMemcpy2DAsync\r
             (uOut.ptr(), uOut.pitch(), ptrU->ptr(),\r
-            kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), NCV_CUDA_ERROR );\r
+            kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), (int)NCV_CUDA_ERROR );\r
 \r
         ncvAssertCUDAReturn( cudaMemcpy2DAsync\r
             (vOut.ptr(), vOut.pitch(), ptrV->ptr(),\r
-            kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), NCV_CUDA_ERROR );\r
+            kSourcePitch, kSourceWidth*sizeof(float), kSourceHeight, cudaMemcpyDeviceToDevice, stream), (int)NCV_CUDA_ERROR );\r
 \r
-        ncvAssertCUDAReturn(cudaStreamSynchronize(stream), NCV_CUDA_ERROR);\r
+        ncvAssertCUDAReturn(cudaStreamSynchronize(stream), (int)NCV_CUDA_ERROR);\r
     }\r
 \r
     return NCV_SUCCESS;\r
index ad072eb..3355503 100644 (file)
@@ -687,6 +687,7 @@ struct applyHaarClassifierAnchorParallelFunctor
     template<class TList>\r
     void call(TList tl)\r
     {\r
+        (void)tl;\r
         applyHaarClassifierAnchorParallel <\r
             Loki::TL::TypeAt<TList, 0>::Result::value,\r
             Loki::TL::TypeAt<TList, 1>::Result::value,\r
@@ -796,6 +797,7 @@ struct applyHaarClassifierClassifierParallelFunctor
     template<class TList>\r
     void call(TList tl)\r
     {\r
+        (void)tl;\r
         applyHaarClassifierClassifierParallel <\r
             Loki::TL::TypeAt<TList, 0>::Result::value,\r
             Loki::TL::TypeAt<TList, 1>::Result::value,\r
@@ -876,6 +878,7 @@ struct initializeMaskVectorFunctor
     template<class TList>\r
     void call(TList tl)\r
     {\r
+        (void)tl;\r
         initializeMaskVector <\r
             Loki::TL::TypeAt<TList, 0>::Result::value,\r
             Loki::TL::TypeAt<TList, 1>::Result::value >\r
index d877b58..2831877 100644 (file)
@@ -854,6 +854,7 @@ static NCVStatus drawRectsWrapperDevice(T *d_dst,
                                         T color,\r
                                         cudaStream_t cuStream)\r
 {\r
+    (void)cuStream;\r
     ncvAssertReturn(d_dst != NULL && d_rects != NULL, NCV_NULL_PTR);\r
     ncvAssertReturn(dstWidth > 0 && dstHeight > 0, NCV_DIMENSIONS_INVALID);\r
     ncvAssertReturn(dstStride >= dstWidth, NCV_INVALID_STEP);\r
index 19003e3..b359806 100644 (file)
@@ -1,7 +1,7 @@
 /*M///////////////////////////////////////////////////////////////////////////////////////\r
 //\r
-// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. \r
-// \r
+// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.\r
+//\r
 //  By downloading, copying, installing or using the software you agree to this license.\r
 //  If you do not agree to this license, do not download, install,\r
 //  copy or use the software.\r
@@ -461,7 +461,7 @@ public:
 \r
     virtual NcvBool isInitialized(void) const = 0;\r
     virtual NcvBool isCounting(void) const = 0;\r
-    \r
+\r
     virtual NCVMemoryType memType(void) const = 0;\r
     virtual Ncv32u alignment(void) const = 0;\r
     virtual size_t maxSize(void) const = 0;\r
@@ -585,11 +585,11 @@ public:
         }\r
         else\r
         {\r
-            ncvAssertReturn(dst._length * sizeof(T) >= howMuch && \r
+            ncvAssertReturn(dst._length * sizeof(T) >= howMuch &&\r
                 this->_length * sizeof(T) >= howMuch &&\r
                 howMuch > 0, NCV_MEM_COPY_ERROR);\r
         }\r
-        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) && \r
+        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&\r
                         (dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);\r
 \r
         NCVStatus ncvStat = NCV_SUCCESS;\r
@@ -766,18 +766,18 @@ public:
         }\r
         else\r
         {\r
-            ncvAssertReturn(dst._pitch * dst._height >= howMuch && \r
+            ncvAssertReturn(dst._pitch * dst._height >= howMuch &&\r
                             this->_pitch * this->_height >= howMuch &&\r
                             howMuch > 0, NCV_MEM_COPY_ERROR);\r
         }\r
-        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) && \r
+        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&\r
                         (dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);\r
 \r
         NCVStatus ncvStat = NCV_SUCCESS;\r
         if (this->_memtype != NCVMemoryTypeNone)\r
         {\r
-            ncvStat = memSegCopyHelper(dst._ptr, dst._memtype, \r
-                                       this->_ptr, this->_memtype, \r
+            ncvStat = memSegCopyHelper(dst._ptr, dst._memtype,\r
+                                       this->_ptr, this->_memtype,\r
                                        howMuch, cuStream);\r
         }\r
 \r
@@ -788,7 +788,7 @@ public:
     {\r
         ncvAssertReturn(this->width() >= roi.width && this->height() >= roi.height &&\r
                         dst.width() >= roi.width && dst.height() >= roi.height, NCV_MEM_COPY_ERROR);\r
-        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) && \r
+        ncvAssertReturn((this->_ptr != NULL || this->_memtype == NCVMemoryTypeNone) &&\r
                         (dst._ptr != NULL || dst._memtype == NCVMemoryTypeNone), NCV_NULL_PTR);\r
 \r
         NCVStatus ncvStat = NCV_SUCCESS;\r
@@ -802,7 +802,7 @@ public:
         return ncvStat;\r
     }\r
 \r
-    T &at(Ncv32u x, Ncv32u y) const\r
+    Tat(Ncv32u x, Ncv32u y) const\r
     {\r
         NcvBool bOutRange = (x >= this->_width || y >= this->_height);\r
         ncvAssertPrintCheck(!bOutRange, "Error addressing matrix at [" << x << ", " << y << "]");\r
index a13d344..6d8277f 100644 (file)
@@ -211,6 +211,7 @@ namespace NCVRuntimeTemplateBool
 \r
         static void call(Func &functor, std::vector<int> &templateParams)\r
         {\r
+            (void)templateParams;\r
             functor.call(TList());\r
         }\r
     };\r
index 9294b55..c33a088 100644 (file)
@@ -55,7 +55,12 @@ namespace cv { namespace gpu { namespace device
         typedef typename Ptr2D::elem_type elem_type;\r
         typedef float index_type;\r
 \r
-        explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}\r
+        explicit __host__ __device__ __forceinline__ PointFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)\r
+        : src(src_)\r
+        {\r
+            (void)fx;\r
+            (void)fy;\r
+        }\r
 \r
         __device__ __forceinline__ elem_type operator ()(float y, float x) const\r
         {\r
@@ -70,8 +75,12 @@ namespace cv { namespace gpu { namespace device
         typedef typename Ptr2D::elem_type elem_type;\r
         typedef float index_type;\r
 \r
-        explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}\r
-\r
+        explicit __host__ __device__ __forceinline__ LinearFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f)\r
+        : src(src_)\r
+        {\r
+            (void)fx;\r
+            (void)fy;\r
+        }\r
         __device__ __forceinline__ elem_type operator ()(float y, float x) const\r
         {\r
             typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\r
@@ -107,7 +116,12 @@ namespace cv { namespace gpu { namespace device
         typedef float index_type;\r
         typedef typename TypeVec<float, VecTraits<elem_type>::cn>::vec_type work_type;\r
 \r
-        explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) : src(src_) {}\r
+        explicit __host__ __device__ __forceinline__ CubicFilter(const Ptr2D& src_, float fx = 0.f, float fy = 0.f) \r
+        : src(src_)\r
+        {\r
+            (void)fx;\r
+            (void)fy;\r
+        }\r
 \r
         static __device__ __forceinline__ float bicubicCoeff(float x_)\r
         {\r
index 32e6d0e..1b836c7 100644 (file)
@@ -470,7 +470,7 @@ namespace cv { namespace gpu { namespace device
 \r
     template <typename T> struct thresh_trunc_func : unary_function<T, T>\r
     {\r
-        explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}\r
+        explicit __host__ __device__ __forceinline__ thresh_trunc_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\r
 \r
         __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\r
         {\r
@@ -487,7 +487,7 @@ namespace cv { namespace gpu { namespace device
 \r
     template <typename T> struct thresh_to_zero_func : unary_function<T, T>\r
     {\r
-        explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}\r
+        explicit __host__ __device__ __forceinline__ thresh_to_zero_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\r
 \r
         __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\r
         {\r
@@ -503,7 +503,7 @@ namespace cv { namespace gpu { namespace device
 \r
     template <typename T> struct thresh_to_zero_inv_func : unary_function<T, T>\r
     {\r
-        explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {}\r
+        explicit __host__ __device__ __forceinline__ thresh_to_zero_inv_func(T thresh_, T maxVal_ = 0) : thresh(thresh_) {(void)maxVal_;}\r
 \r
         __device__ __forceinline__ T operator()(typename TypeTraits<T>::ParameterType src) const\r
         {\r
index 4785aba..bc60a5e 100644 (file)
@@ -1,11 +1,11 @@
 /*\r
  * Copyright 1993-2010 NVIDIA Corporation.  All rights reserved.\r
  *\r
- * NVIDIA Corporation and its licensors retain all intellectual \r
- * property and proprietary rights in and to this software and \r
- * related documentation and any modifications thereto.  \r
- * Any use, reproduction, disclosure, or distribution of this \r
- * software and related documentation without an express license \r
+ * NVIDIA Corporation and its licensors retain all intellectual\r
+ * property and proprietary rights in and to this software and\r
+ * related documentation and any modifications thereto.\r
+ * Any use, reproduction, disclosure, or distribution of this\r
+ * software and related documentation without an express license\r
  * agreement from NVIDIA Corporation is strictly prohibited.\r
  */\r
 \r
 #include "NCVHaarObjectDetection.hpp"\r
 \r
 \r
-TestHypothesesFilter::TestHypothesesFilter(std::string testName, NCVTestSourceProvider<Ncv32u> &src,\r
-                                           Ncv32u numDstRects, Ncv32u minNeighbors, Ncv32f eps)\r
+TestHypothesesFilter::TestHypothesesFilter(std::string testName, NCVTestSourceProvider<Ncv32u> &src_,\r
+                                           Ncv32u numDstRects_, Ncv32u minNeighbors_, Ncv32f eps_)\r
     :\r
     NCVTestProvider(testName),\r
-    src(src),\r
-    numDstRects(numDstRects),\r
-    minNeighbors(minNeighbors),\r
-    eps(eps)\r
+    src(src_),\r
+    numDstRects(numDstRects_),\r
+    minNeighbors(minNeighbors_),\r
+    eps(eps_)\r
 {\r
 }\r
 \r
@@ -94,11 +94,11 @@ bool TestHypothesesFilter::process()
         for (Ncv32u j=0; j<numNeighbors; j++)\r
         {\r
             randVal = (1.0 * h_random32u.ptr()[randCnt++]) / 0xFFFFFFFF; randCnt = randCnt % h_random32u.length();\r
-            h_vecSrc.ptr()[srcSlotSize * i + j].x = \r
+            h_vecSrc.ptr()[srcSlotSize * i + j].x =\r
                 h_vecDst_groundTruth.ptr()[i].x +\r
                 (Ncv32s)(h_vecDst_groundTruth.ptr()[i].width * this->eps * (randVal - 0.5));\r
             randVal = (1.0 * h_random32u.ptr()[randCnt++]) / 0xFFFFFFFF; randCnt = randCnt % h_random32u.length();\r
-            h_vecSrc.ptr()[srcSlotSize * i + j].y = \r
+            h_vecSrc.ptr()[srcSlotSize * i + j].y =\r
                 h_vecDst_groundTruth.ptr()[i].y +\r
                 (Ncv32s)(h_vecDst_groundTruth.ptr()[i].height * this->eps * (randVal - 0.5));\r
             h_vecSrc.ptr()[srcSlotSize * i + j].width = h_vecDst_groundTruth.ptr()[i].width;\r
@@ -109,11 +109,11 @@ bool TestHypothesesFilter::process()
         for (Ncv32u j=numNeighbors; j<srcSlotSize; j++)\r
         {\r
             randVal = (1.0 * h_random32u.ptr()[randCnt++]) / 0xFFFFFFFF; randCnt = randCnt % h_random32u.length();\r
-            h_vecSrc.ptr()[srcSlotSize * i + j].x = \r
+            h_vecSrc.ptr()[srcSlotSize * i + j].x =\r
                 this->canvasWidth + h_vecDst_groundTruth.ptr()[i].x +\r
                 (Ncv32s)(h_vecDst_groundTruth.ptr()[i].width * this->eps * (randVal - 0.5));\r
             randVal = (1.0 * h_random32u.ptr()[randCnt++]) / 0xFFFFFFFF; randCnt = randCnt % h_random32u.length();\r
-            h_vecSrc.ptr()[srcSlotSize * i + j].y = \r
+            h_vecSrc.ptr()[srcSlotSize * i + j].y =\r
                 this->canvasHeight + h_vecDst_groundTruth.ptr()[i].y +\r
                 (Ncv32s)(h_vecDst_groundTruth.ptr()[i].height * this->eps * (randVal - 0.5));\r
             h_vecSrc.ptr()[srcSlotSize * i + j].width = h_vecDst_groundTruth.ptr()[i].width;\r
@@ -124,8 +124,8 @@ bool TestHypothesesFilter::process()
     //shuffle\r
     for (Ncv32u i=0; i<this->numDstRects*srcSlotSize-1; i++)\r
     {\r
-        Ncv32u randVal = h_random32u.ptr()[randCnt++]; randCnt = randCnt % h_random32u.length();\r
-        Ncv32u secondSwap = randVal % (this->numDstRects*srcSlotSize-1 - i);\r
+        Ncv32u randValLocal = h_random32u.ptr()[randCnt++]; randCnt = randCnt % h_random32u.length();\r
+        Ncv32u secondSwap = randValLocal % (this->numDstRects*srcSlotSize-1 - i);\r
         NcvRect32u tmp = h_vecSrc.ptr()[i + secondSwap];\r
         h_vecSrc.ptr()[i + secondSwap] = h_vecSrc.ptr()[i];\r
         h_vecSrc.ptr()[i] = tmp;\r
index ff75770..c99c333 100644 (file)
@@ -1,11 +1,11 @@
 /*\r
  * Copyright 1993-2010 NVIDIA Corporation.  All rights reserved.\r
  *\r
- * NVIDIA Corporation and its licensors retain all intellectual \r
- * property and proprietary rights in and to this software and \r
- * related documentation and any modifications thereto.  \r
- * Any use, reproduction, disclosure, or distribution of this \r
- * software and related documentation without an express license \r
+ * NVIDIA Corporation and its licensors retain all intellectual\r
+ * property and proprietary rights in and to this software and\r
+ * related documentation and any modifications thereto.\r
+ * Any use, reproduction, disclosure, or distribution of this\r
+ * software and related documentation without an express license\r
  * agreement from NVIDIA Corporation is strictly prohibited.\r
  */\r
 \r
 \r
 \r
 template <class T>\r
-TestResize<T>::TestResize(std::string testName, NCVTestSourceProvider<T> &src,\r
-                          Ncv32u width, Ncv32u height, Ncv32u scaleFactor, NcvBool bTextureCache)\r
+TestResize<T>::TestResize(std::string testName, NCVTestSourceProvider<T> &src_,\r
+                          Ncv32u width_, Ncv32u height_, Ncv32u scaleFactor_, NcvBool bTextureCache_)\r
     :\r
     NCVTestProvider(testName),\r
-    src(src),\r
-    width(width),\r
-    height(height),\r
-    scaleFactor(scaleFactor),\r
-    bTextureCache(bTextureCache)\r
+    src(src_),\r
+    width(width_),\r
+    height(height_),\r
+    scaleFactor(scaleFactor_),\r
+    bTextureCache(bTextureCache_)\r
 {\r
 }\r
 \r
index 9957fda..bb61608 100644 (file)
@@ -248,6 +248,7 @@ void generateHaarLoaderTests(NCVAutoTestLister &testLister)
 void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourceProvider<Ncv8u> &src,\r
                                   Ncv32u maxWidth, Ncv32u maxHeight)\r
 {\r
+    (void)maxHeight;\r
     for (Ncv32u i=20; i<512; i+=11)\r
     {\r
         for (Ncv32u j=20; j<128; j+=5)\r
@@ -268,11 +269,12 @@ void generateHaarApplicationTests(NCVAutoTestLister &testLister, NCVTestSourcePr
 \r
 static void devNullOutput(const std::string& msg)\r
 {\r
+    (void)msg;\r
 }\r
 \r
 bool nvidia_NPPST_Integral_Image(const std::string& test_data_path, OutputLevel outputLevel)\r
 {\r
-    path = test_data_path;\r
+    path = test_data_path.c_str();\r
     ncvSetDebugOutputHandler(devNullOutput);\r
 \r
     NCVAutoTestLister testListerII("NPPST Integral Image", outputLevel);\r
@@ -374,6 +376,7 @@ bool nvidia_NCV_Vector_Operations(const std::string& test_data_path, OutputLevel
     generateVectorTests(testListerVectorOperations, testSrcRandom_32u, 4096*4096);\r
 \r
     return testListerVectorOperations.invoke();\r
+\r
 }\r
 \r
 bool nvidia_NCV_Haar_Cascade_Loader(const std::string& test_data_path, OutputLevel outputLevel)\r
index 7ce3192..386a66c 100644 (file)
@@ -58,15 +58,15 @@ struct NVidiaTest : TestWithParam<cv::gpu::DeviceInfo>
 {\r
     cv::gpu::DeviceInfo devInfo;\r
 \r
-    std::string path;\r
+    std::string _path;\r
 \r
     virtual void SetUp()\r
     {\r
         devInfo = GetParam();\r
 \r
         cv::gpu::setDevice(devInfo.deviceID());\r
-\r
-        path = std::string(TS::ptr()->get_data_path()) + "haarcascade/";\r
+        _path = TS::ptr()->get_data_path().c_str();\r
+        _path = _path + "haarcascade/";\r
     }\r
 };\r
 \r
@@ -84,63 +84,63 @@ OutputLevel nvidiaTestOutputLevel = OutputLevelCompact;
 \r
 TEST_P(NPPST, SquaredIntegral)\r
 {\r
-    bool res = nvidia_NPPST_Squared_Integral_Image(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NPPST_Squared_Integral_Image(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NPPST, RectStdDev)\r
 {\r
-    bool res = nvidia_NPPST_RectStdDev(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NPPST_RectStdDev(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NPPST, Resize)\r
 {\r
-    bool res = nvidia_NPPST_Resize(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NPPST_Resize(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NPPST, VectorOperations)\r
 {\r
-    bool res = nvidia_NPPST_Vector_Operations(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NPPST_Vector_Operations(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NPPST, Transpose)\r
 {\r
-    bool res = nvidia_NPPST_Transpose(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NPPST_Transpose(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NCV, VectorOperations)\r
 {\r
-    bool res = nvidia_NCV_Vector_Operations(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NCV_Vector_Operations(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NCV, HaarCascadeLoader)\r
 {\r
-    bool res = nvidia_NCV_Haar_Cascade_Loader(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NCV_Haar_Cascade_Loader(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NCV, HaarCascadeApplication)\r
 {\r
-    bool res = nvidia_NCV_Haar_Cascade_Application(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NCV_Haar_Cascade_Application(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
 \r
 TEST_P(NCV, HypothesesFiltration)\r
 {\r
-    bool res = nvidia_NCV_Hypotheses_Filtration(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NCV_Hypotheses_Filtration(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r
@@ -148,7 +148,7 @@ TEST_P(NCV, HypothesesFiltration)
 TEST_P(NCV, Visualization)\r
 {\r
     // this functionality doesn't used in gpu module\r
-    bool res = nvidia_NCV_Visualization(path, nvidiaTestOutputLevel);\r
+    bool res = nvidia_NCV_Visualization(_path, nvidiaTestOutputLevel);\r
 \r
     ASSERT_TRUE(res);\r
 }\r