Minor perf tests framework improvement

This commit is contained in:
Andrey Kamaev 2011-11-01 08:13:30 +00:00
parent 59d89c7a7a
commit 41d3a9a192
2 changed files with 3 additions and 4 deletions

View File

@ -287,7 +287,7 @@ private:
_declareHelper& iterations(int n); _declareHelper& iterations(int n);
_declareHelper& time(double timeLimitSecs); _declareHelper& time(double timeLimitSecs);
_declareHelper& tbb_threads(int n); _declareHelper& tbb_threads(int n = -1);
private: private:
TestBase* test; TestBase* test;
_declareHelper(TestBase* t); _declareHelper(TestBase* t);

View File

@ -898,10 +898,9 @@ TestBase::_declareHelper& TestBase::_declareHelper::time(double timeLimitSecs)
TestBase::_declareHelper& TestBase::_declareHelper::tbb_threads(int n) TestBase::_declareHelper& TestBase::_declareHelper::tbb_threads(int n)
{ {
#ifdef HAVE_TBB #ifdef HAVE_TBB
if (n > 0) {
test->p_tbb_initializer.release(); test->p_tbb_initializer.release();
if (n > 0)
test->p_tbb_initializer=new tbb::task_scheduler_init(n); test->p_tbb_initializer=new tbb::task_scheduler_init(n);
}
#endif #endif
return *this; return *this;
} }