Commit 4254e35f authored by Vladislav Vinogradov's avatar Vladislav Vinogradov

merge new setUseOptimizations function with existed setUseOptimized

parent 4800a34b
...@@ -727,8 +727,6 @@ CV_EXPORTS void setUseIPP(bool flag); ...@@ -727,8 +727,6 @@ CV_EXPORTS void setUseIPP(bool flag);
} // ipp } // ipp
CV_EXPORTS void setUseOptimizations(bool enabled);
//! @endcond //! @endcond
//! @} core_utils //! @} core_utils
......
...@@ -385,6 +385,12 @@ void setUseOptimized( bool flag ) ...@@ -385,6 +385,12 @@ void setUseOptimized( bool flag )
useOptimizedFlag = flag; useOptimizedFlag = flag;
currentFeatures = flag ? &featuresEnabled : &featuresDisabled; currentFeatures = flag ? &featuresEnabled : &featuresDisabled;
USE_SSE2 = currentFeatures->have[CV_CPU_SSE2]; USE_SSE2 = currentFeatures->have[CV_CPU_SSE2];
ipp::setUseIPP(flag);
ocl::setUseOpenCL(flag);
#ifdef HAVE_TEGRA_OPTIMIZATION
::tegra::setUseTegra(flag);
#endif
} }
bool useOptimized(void) bool useOptimized(void)
...@@ -1289,17 +1295,4 @@ void setUseTegra(bool flag) ...@@ -1289,17 +1295,4 @@ void setUseTegra(bool flag)
#endif #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. */ /* End of file. */
...@@ -352,7 +352,7 @@ namespace cv { namespace cuda ...@@ -352,7 +352,7 @@ namespace cv { namespace cuda
#ifdef HAVE_CUDA #ifdef HAVE_CUDA
#define CV_CUDA_TEST_MAIN(resourcesubdir) \ #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 #else // HAVE_CUDA
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment