From: Alexander Alekhin Date: Mon, 28 Nov 2016 20:56:58 +0000 (+0300) Subject: test: fix cuda build X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1391^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a7d441b37fb6cff17faf5e29b40de67a56e6bb9;p=platform%2Fupstream%2Fopencv.git test: fix cuda build --- diff --git a/modules/cudaarithm/perf/perf_arithm.cpp b/modules/cudaarithm/perf/perf_arithm.cpp index c58397b..02cff85 100644 --- a/modules/cudaarithm/perf/perf_arithm.cpp +++ b/modules/cudaarithm/perf/perf_arithm.cpp @@ -46,6 +46,8 @@ using namespace std; using namespace testing; using namespace perf; +namespace { // workaround conflict with DftFlags + ////////////////////////////////////////////////////////////////////// // GEMM @@ -252,3 +254,5 @@ PERF_TEST_P(Sz_KernelSz_Ccorr, Convolve, CPU_SANITY_CHECK(dst); } } + +} // namespace diff --git a/modules/cudaarithm/test/test_core.cpp b/modules/cudaarithm/test/test_core.cpp index f67854e..cd918ba 100644 --- a/modules/cudaarithm/test/test_core.cpp +++ b/modules/cudaarithm/test/test_core.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + //////////////////////////////////////////////////////////////////////////////// // Merge @@ -416,4 +418,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_Arithm, CopyMakeBorder, testing::Combine( ALL_BORDER_TYPES, WHOLE_SUBMAT)); +} //namespace + #endif // HAVE_CUDA diff --git a/modules/cudafeatures2d/test/test_features2d.cpp b/modules/cudafeatures2d/test/test_features2d.cpp index 3046a60..7fccd9e 100644 --- a/modules/cudafeatures2d/test/test_features2d.cpp +++ b/modules/cudafeatures2d/test/test_features2d.cpp @@ -55,6 +55,8 @@ namespace IMPLEMENT_PARAM_CLASS(FAST_NonmaxSuppression, bool) } +namespace { + PARAM_TEST_CASE(FAST, cv::cuda::DeviceInfo, FAST_Threshold, FAST_NonmaxSuppression) { cv::cuda::DeviceInfo devInfo; @@ -708,4 +710,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_Features2D, BruteForceMatcher, testing::Combine( testing::Values(DescriptorSize(57), DescriptorSize(64), DescriptorSize(83), DescriptorSize(128), DescriptorSize(179), DescriptorSize(256), DescriptorSize(304)), testing::Values(UseMask(false), UseMask(true)))); +} // namespace + #endif // HAVE_CUDA diff --git a/modules/cudafilters/test/test_filters.cpp b/modules/cudafilters/test/test_filters.cpp index 332daf2..74bc3b4 100644 --- a/modules/cudafilters/test/test_filters.cpp +++ b/modules/cudafilters/test/test_filters.cpp @@ -68,6 +68,8 @@ namespace } } +namespace { + ///////////////////////////////////////////////////////////////////////////////////////////////// // Blur @@ -708,4 +710,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_Filters, Median, testing::Combine( WHOLE_SUBMAT) ); +} //namespace + #endif // HAVE_CUDA diff --git a/modules/cudaimgproc/test/test_canny.cpp b/modules/cudaimgproc/test/test_canny.cpp index adb5c0d..e9baae2 100644 --- a/modules/cudaimgproc/test/test_canny.cpp +++ b/modules/cudaimgproc/test/test_canny.cpp @@ -55,6 +55,8 @@ namespace IMPLEMENT_PARAM_CLASS(L2gradient, bool) } +namespace { + PARAM_TEST_CASE(Canny, cv::cuda::DeviceInfo, AppertureSize, L2gradient, UseRoi) { cv::cuda::DeviceInfo devInfo; @@ -98,4 +100,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, Canny, testing::Combine( testing::Values(L2gradient(false), L2gradient(true)), WHOLE_SUBMAT)); +} // namespace + #endif // HAVE_CUDA diff --git a/modules/cudaimgproc/test/test_histogram.cpp b/modules/cudaimgproc/test/test_histogram.cpp index 5ff5963..3d32173 100644 --- a/modules/cudaimgproc/test/test_histogram.cpp +++ b/modules/cudaimgproc/test/test_histogram.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + /////////////////////////////////////////////////////////////////////////////////////////////////////// // HistEven @@ -212,4 +214,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, CLAHE, testing::Combine( DIFFERENT_SIZES, testing::Values(0.0, 40.0))); +} // namespace + #endif // HAVE_CUDA diff --git a/modules/cudaimgproc/test/test_hough.cpp b/modules/cudaimgproc/test/test_hough.cpp index 5e55abe..fd69521 100644 --- a/modules/cudaimgproc/test/test_hough.cpp +++ b/modules/cudaimgproc/test/test_hough.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + /////////////////////////////////////////////////////////////////////////////////////////////////////// // HoughLines @@ -256,4 +258,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_ImgProc, GeneralizedHough, testing::Combine( ALL_DEVICES, WHOLE_SUBMAT)); +} // namespace + #endif // HAVE_CUDA diff --git a/modules/cudaobjdetect/test/test_objdetect.cpp b/modules/cudaobjdetect/test/test_objdetect.cpp index 25c3efd..fcb566e 100644 --- a/modules/cudaobjdetect/test/test_objdetect.cpp +++ b/modules/cudaobjdetect/test/test_objdetect.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + //#define DUMP struct HOG : testing::TestWithParam @@ -558,4 +560,6 @@ CUDA_TEST_P(LBP_classify, Accuracy) INSTANTIATE_TEST_CASE_P(CUDA_ObjDetect, LBP_classify, testing::Combine(ALL_DEVICES, testing::Values(0))); +} // namespace + #endif // HAVE_CUDA diff --git a/modules/cudaoptflow/test/test_optflow.cpp b/modules/cudaoptflow/test/test_optflow.cpp index 9a3e3e5..fe910d2 100644 --- a/modules/cudaoptflow/test/test_optflow.cpp +++ b/modules/cudaoptflow/test/test_optflow.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + ////////////////////////////////////////////////////// // BroxOpticalFlow @@ -401,4 +403,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_OptFlow, OpticalFlowDual_TVL1, testing::Combine( ALL_DEVICES, testing::Values(Gamma(0.0), Gamma(1.0)))); -#endif // HAVE_CUDA \ No newline at end of file +} // namespace + +#endif // HAVE_CUDA diff --git a/modules/cudastereo/test/test_stereo.cpp b/modules/cudastereo/test/test_stereo.cpp index bc9aa37..de801cf 100644 --- a/modules/cudastereo/test/test_stereo.cpp +++ b/modules/cudastereo/test/test_stereo.cpp @@ -46,6 +46,8 @@ using namespace cvtest; +namespace { + ////////////////////////////////////////////////////////////////////////// // StereoBM @@ -209,4 +211,6 @@ INSTANTIATE_TEST_CASE_P(CUDA_Stereo, ReprojectImageTo3D, testing::Combine( testing::Values(MatDepth(CV_8U), MatDepth(CV_16S)), WHOLE_SUBMAT)); +} // namespace + #endif // HAVE_CUDA