diff --git a/modules/core/include/opencv2/core/base.hpp b/modules/core/include/opencv2/core/base.hpp index 8559fc2397..f2acaa3fb4 100644 --- a/modules/core/include/opencv2/core/base.hpp +++ b/modules/core/include/opencv2/core/base.hpp @@ -727,8 +727,6 @@ CV_EXPORTS void setUseIPP(bool flag); } // ipp -CV_EXPORTS void setUseOptimizations(bool enabled); - //! @endcond //! @} core_utils diff --git a/modules/core/src/system.cpp b/modules/core/src/system.cpp index 6152cbe702..c67a78745d 100644 --- a/modules/core/src/system.cpp +++ b/modules/core/src/system.cpp @@ -385,6 +385,12 @@ void setUseOptimized( bool flag ) useOptimizedFlag = flag; currentFeatures = flag ? &featuresEnabled : &featuresDisabled; USE_SSE2 = currentFeatures->have[CV_CPU_SSE2]; + + ipp::setUseIPP(flag); + ocl::setUseOpenCL(flag); +#ifdef HAVE_TEGRA_OPTIMIZATION + ::tegra::setUseTegra(flag); +#endif } bool useOptimized(void) @@ -1289,17 +1295,4 @@ void setUseTegra(bool flag) #endif -namespace cv { - -void setUseOptimizations(bool enabled) -{ - ipp::setUseIPP(enabled); - ocl::setUseOpenCL(enabled); -#ifdef HAVE_TEGRA_OPTIMIZATION - ::tegra::setUseTegra(enabled); -#endif -} - -} // namespace cv - /* End of file. */ diff --git a/modules/ts/include/opencv2/ts/cuda_test.hpp b/modules/ts/include/opencv2/ts/cuda_test.hpp index d1e1e9db73..8783fb6412 100644 --- a/modules/ts/include/opencv2/ts/cuda_test.hpp +++ b/modules/ts/include/opencv2/ts/cuda_test.hpp @@ -352,7 +352,7 @@ namespace cv { namespace cuda #ifdef HAVE_CUDA #define CV_CUDA_TEST_MAIN(resourcesubdir) \ - CV_TEST_MAIN(resourcesubdir, cvtest::parseCudaDeviceOptions(argc, argv), cvtest::printCudaInfo(), cv::setUseOptimizations(false)) + CV_TEST_MAIN(resourcesubdir, cvtest::parseCudaDeviceOptions(argc, argv), cvtest::printCudaInfo(), cv::setUseOptimized(false)) #else // HAVE_CUDA