mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 11:45:30 +08:00
merge new setUseOptimizations function with existed setUseOptimized
This commit is contained in:
parent
4800a34be3
commit
4254e35f6a
@ -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 )
|
|||||||
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)
|
|||||||
|
|
||||||
#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
|
|||||||
#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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user