mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 20:09:23 +08:00
Merge pull request #9278 from alalek:ts_perf_threads
This commit is contained in:
commit
d34eec3ab3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user