Added possibility to configure TBB behavior in Perf tests --- now we can set the number of TBB threads in the perf tests either as console parameter perf_tbb_nthreads or
in a test itself using the method declare.tbb_threads(n).
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
#include "opencv2/core/core.hpp"
|
||||
#include "ts_gtest.h"
|
||||
|
||||
#ifdef HAVE_TBB
|
||||
#include "tbb/task_scheduler_init.h"
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID) && defined(USE_ANDROID_LOGGING)
|
||||
#include <android/log.h>
|
||||
|
||||
@@ -283,6 +287,7 @@ private:
|
||||
|
||||
_declareHelper& iterations(int n);
|
||||
_declareHelper& time(double timeLimitSecs);
|
||||
_declareHelper& tbb_threads(int n);
|
||||
private:
|
||||
TestBase* test;
|
||||
_declareHelper(TestBase* t);
|
||||
@@ -292,6 +297,10 @@ private:
|
||||
};
|
||||
friend class _declareHelper;
|
||||
|
||||
#ifdef HAVE_TBB
|
||||
cv::Ptr<tbb::task_scheduler_init> p_tbb_initializer;
|
||||
#endif
|
||||
|
||||
public:
|
||||
_declareHelper declare;
|
||||
};
|
||||
|
Reference in New Issue
Block a user