[opencv] 200/251: ts(perf): initialize ThreadPool
Nobuhiro Iwamatsu
iwamatsu at moszumanska.debian.org
Sun Aug 27 23:27:42 UTC 2017
This is an automated email from the git hooks/post-receive script.
iwamatsu pushed a commit to annotated tag 3.3.0
in repository opencv.
commit 50b9a5afa94612284490e01333a1b3d5bc9b55f4
Author: Alexander Alekhin <alexander.alekhin at intel.com>
Date: Mon Jul 31 16:22:06 2017 +0300
ts(perf): initialize ThreadPool
---
modules/ts/src/ts_perf.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/modules/ts/src/ts_perf.cpp b/modules/ts/src/ts_perf.cpp
index a09ba1a..7fbf2c7 100644
--- a/modules/ts/src/ts_perf.cpp
+++ b/modules/ts/src/ts_perf.cpp
@@ -1212,6 +1212,18 @@ int64 TestBase::_calibrate()
}
};
+ // Initialize ThreadPool
+ class _dummyParallel : public ParallelLoopBody
+ {
+ public:
+ void operator()(const cv::Range& range) const
+ {
+ // nothing
+ CV_UNUSED(range);
+ }
+ };
+ parallel_for_(cv::Range(0, 1000), _dummyParallel());
+
_timeadjustment = 0;
_helper h;
h.PerfTestBody();
@@ -1838,6 +1850,8 @@ void TestBase::SetUp()
if (param_threads >= 0)
cv::setNumThreads(param_threads);
+ else
+ cv::setNumThreads(-1);
#ifdef __ANDROID__
if (param_affinity_mask)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/opencv.git
More information about the debian-science-commits
mailing list