mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 09:25:45 +08:00
add generic method to disable/enable all optimizations (IPP, OpenCL, Tegra)
This commit is contained in:
parent
44e41baffe
commit
12180bd7b1
@ -727,6 +727,8 @@ CV_EXPORTS void setUseIPP(bool flag);
|
||||
|
||||
} // ipp
|
||||
|
||||
CV_EXPORTS void setOptimizations(bool enabled);
|
||||
|
||||
//! @endcond
|
||||
|
||||
//! @} core_utils
|
||||
|
@ -1287,6 +1287,15 @@ void setUseTegra(bool flag)
|
||||
|
||||
#endif
|
||||
|
||||
void setOptimizations(bool enabled)
|
||||
{
|
||||
cv::ipp::setUseIPP(enabled);
|
||||
cv::ocl::setUseOpenCL(enabled);
|
||||
#ifdef HAVE_TEGRA_OPTIMIZATION
|
||||
cv::tegra::setUseTegra(enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace cv
|
||||
|
||||
/* End of file. */
|
||||
|
Loading…
Reference in New Issue
Block a user