From 6b6a63ba388f76647d20953af692a196ae752809 Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Tue, 15 Feb 2011 10:54:49 +0000 Subject: [PATCH] fixed some warnings GPU: TargetArchs -> added FEATURE_SET prefix. --- doc/gpu_initialization.tex | 6 +++--- modules/gpu/include/opencv2/gpu/gpu.hpp | 16 ++++++++-------- modules/gpu/src/brute_force_matcher.cpp | 4 ++-- modules/gpu/src/imgproc_gpu.cpp | 4 ++-- modules/gpu/src/mssegmentation.cpp | 2 +- modules/gpu/src/surf.cpp | 4 ++-- samples/cpp/convexhull.cpp | 2 +- samples/cpp/demhist.cpp | 2 +- samples/cpp/squares.cpp | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/gpu_initialization.tex b/doc/gpu_initialization.tex index d48e47c..cf1d308 100644 --- a/doc/gpu_initialization.tex +++ b/doc/gpu_initialization.tex @@ -28,9 +28,9 @@ GPU compute features. \begin{lstlisting} enum GpuFeature { - COMPUTE_10, COMPUTE_11, - COMPUTE_12, COMPUTE_13, - COMPUTE_20, COMPUTE_21, + FEATURE_SET_COMPUTE_10, FEATURE_SET_COMPUTE_11, + FEATURE_SET_COMPUTE_12, FEATURE_SET_COMPUTE_13, + FEATURE_SET_COMPUTE_20, FEATURE_SET_COMPUTE_21, ATOMICS, NATIVE_DOUBLE }; \end{lstlisting} diff --git a/modules/gpu/include/opencv2/gpu/gpu.hpp b/modules/gpu/include/opencv2/gpu/gpu.hpp index 76ae149..a112755 100644 --- a/modules/gpu/include/opencv2/gpu/gpu.hpp +++ b/modules/gpu/include/opencv2/gpu/gpu.hpp @@ -66,14 +66,14 @@ namespace cv enum GpuFeature { - COMPUTE_10 = 10, - COMPUTE_11 = 11, - COMPUTE_12 = 12, - COMPUTE_13 = 13, - COMPUTE_20 = 20, - COMPUTE_21 = 21, - ATOMICS = COMPUTE_11, - NATIVE_DOUBLE = COMPUTE_13 + FEATURE_SET_COMPUTE_10 = 10, + FEATURE_SET_COMPUTE_11 = 11, + FEATURE_SET_COMPUTE_12 = 12, + FEATURE_SET_COMPUTE_13 = 13, + FEATURE_SET_COMPUTE_20 = 20, + FEATURE_SET_COMPUTE_21 = 21, + ATOMICS = FEATURE_SET_COMPUTE_11, + NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13 }; class CV_EXPORTS TargetArchs diff --git a/modules/gpu/src/brute_force_matcher.cpp b/modules/gpu/src/brute_force_matcher.cpp index 222feb6..ebf831f 100644 --- a/modules/gpu/src/brute_force_matcher.cpp +++ b/modules/gpu/src/brute_force_matcher.cpp @@ -192,7 +192,7 @@ void cv::gpu::BruteForceMatcher_GPU_base::matchSingle(const GpuMat& queryDescs, match_caller_t func = match_callers[distType][queryDescs.depth()]; CV_Assert(func != 0); - bool cc_12 = TargetArchs::builtWith(COMPUTE_12) && DeviceInfo().supports(COMPUTE_12); + bool cc_12 = TargetArchs::builtWith(FEATURE_SET_COMPUTE_12) && DeviceInfo().supports(FEATURE_SET_COMPUTE_12); // For single train there is no need to save imgIdx, so we just save imgIdx to trainIdx. // trainIdx store after imgIdx, so we doesn't lose it value. @@ -320,7 +320,7 @@ void cv::gpu::BruteForceMatcher_GPU_base::matchCollection(const GpuMat& queryDes match_caller_t func = match_callers[distType][queryDescs.depth()]; CV_Assert(func != 0); - bool cc_12 = TargetArchs::builtWith(COMPUTE_12) && DeviceInfo().supports(COMPUTE_12); + bool cc_12 = TargetArchs::builtWith(FEATURE_SET_COMPUTE_12) && DeviceInfo().supports(FEATURE_SET_COMPUTE_12); func(queryDescs, trainCollection, maskCollection, trainIdx, imgIdx, distance, cc_12); } diff --git a/modules/gpu/src/imgproc_gpu.cpp b/modules/gpu/src/imgproc_gpu.cpp index e78083d..969a4c2 100644 --- a/modules/gpu/src/imgproc_gpu.cpp +++ b/modules/gpu/src/imgproc_gpu.cpp @@ -128,7 +128,7 @@ void cv::gpu::remap(const GpuMat& src, GpuMat& dst, const GpuMat& xmap, const Gp void cv::gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr, TermCriteria criteria) { - CV_Assert(TargetArchs::builtWith(COMPUTE_12) && DeviceInfo().supports(COMPUTE_12)); + CV_Assert(TargetArchs::builtWith(FEATURE_SET_COMPUTE_12) && DeviceInfo().supports(FEATURE_SET_COMPUTE_12)); if( src.empty() ) CV_Error( CV_StsBadArg, "The input image is empty" ); @@ -156,7 +156,7 @@ void cv::gpu::meanShiftFiltering(const GpuMat& src, GpuMat& dst, int sp, int sr, void cv::gpu::meanShiftProc(const GpuMat& src, GpuMat& dstr, GpuMat& dstsp, int sp, int sr, TermCriteria criteria) { - CV_Assert(TargetArchs::builtWith(COMPUTE_12) && DeviceInfo().supports(COMPUTE_12)); + CV_Assert(TargetArchs::builtWith(FEATURE_SET_COMPUTE_12) && DeviceInfo().supports(FEATURE_SET_COMPUTE_12)); if( src.empty() ) CV_Error( CV_StsBadArg, "The input image is empty" ); diff --git a/modules/gpu/src/mssegmentation.cpp b/modules/gpu/src/mssegmentation.cpp index 159a779..fd62f43 100644 --- a/modules/gpu/src/mssegmentation.cpp +++ b/modules/gpu/src/mssegmentation.cpp @@ -227,7 +227,7 @@ inline int dist2(const cv::Vec2s& lhs, const cv::Vec2s& rhs) void cv::gpu::meanShiftSegmentation(const GpuMat& src, Mat& dst, int sp, int sr, int minsize, TermCriteria criteria) { - CV_Assert(TargetArchs::builtWith(COMPUTE_12) && DeviceInfo().supports(COMPUTE_12)); + CV_Assert(TargetArchs::builtWith(FEATURE_SET_COMPUTE_12) && DeviceInfo().supports(FEATURE_SET_COMPUTE_12)); CV_Assert(src.type() == CV_8UC4); const int nrows = src.rows; diff --git a/modules/gpu/src/surf.cpp b/modules/gpu/src/surf.cpp index b7cfbf4..9680260 100644 --- a/modules/gpu/src/surf.cpp +++ b/modules/gpu/src/surf.cpp @@ -174,7 +174,7 @@ namespace { typedef void (*fasthessian_t)(PtrStepf hessianBuffer, int x_size, int y_size, const dim3& threads); const fasthessian_t fasthessian = - DeviceInfo().supports(COMPUTE_13) ? fasthessian_gpu : fasthessian_gpu_old; + DeviceInfo().supports(FEATURE_SET_COMPUTE_13) ? fasthessian_gpu : fasthessian_gpu_old; dim3 threads = calcBlockSize(nIntervals); for(int octave = 0; octave < nOctaves; ++octave) @@ -234,7 +234,7 @@ namespace const KeyPoint_GPU* features, int nFeatures); const compute_descriptors_t compute_descriptors = - DeviceInfo().supports(COMPUTE_13) ? compute_descriptors_gpu : compute_descriptors_gpu_old; + DeviceInfo().supports(FEATURE_SET_COMPUTE_13) ? compute_descriptors_gpu : compute_descriptors_gpu_old; if (keypoints.cols > 0) { diff --git a/samples/cpp/convexhull.cpp b/samples/cpp/convexhull.cpp index 8d4bba0..f9eb91b 100644 --- a/samples/cpp/convexhull.cpp +++ b/samples/cpp/convexhull.cpp @@ -13,7 +13,7 @@ void help() << "./convexhull\n" << endl; } -int main( int argc, char** argv ) +int main( int /*argc*/, char** /*argv*/ ) { Mat img(500, 500, CV_8UC3); RNG& rng = theRNG(); diff --git a/samples/cpp/demhist.cpp b/samples/cpp/demhist.cpp index 7dd724b..ee9f105 100644 --- a/samples/cpp/demhist.cpp +++ b/samples/cpp/demhist.cpp @@ -12,7 +12,7 @@ int _contrast = 100; Mat image; /* brightness/contrast callback function */ -void updateBrightnessContrast( int arg, void* ) +void updateBrightnessContrast( int /*arg*/, void* ) { int histSize = 64; int brightness = _brightness - 100; diff --git a/samples/cpp/squares.cpp b/samples/cpp/squares.cpp index 9c46f9c..df16e01 100644 --- a/samples/cpp/squares.cpp +++ b/samples/cpp/squares.cpp @@ -139,7 +139,7 @@ void drawSquares( Mat& image, const vector >& squares ) } -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { static const char* names[] = { "pic1.png", "pic2.png", "pic3.png", "pic4.png", "pic5.png", "pic6.png", 0 }; -- 2.7.4