add generic method to disable/enable all optimizations (IPP, OpenCL, Tegra)

pull/3764/head
Vladislav Vinogradov 10 years ago
parent 44e41baffe
commit 12180bd7b1
  1. 2
      modules/core/include/opencv2/core/base.hpp
  2. 9
      modules/core/src/system.cpp

@ -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…
Cancel
Save