Deprecated tbb::task_scheduler_init replaced with std::thread and tbb::global_control

This commit is contained in:
Denis Chaplygin
2020-09-01 14:25:51 +03:00
parent 4d6272b030
commit 03d9e7a8ce
17 changed files with 85 additions and 33 deletions
+6 -2
View File
@@ -26,10 +26,14 @@
#include <utility>
#include <vector>
#include <tbb/task_scheduler_init.h>
// explicit TBB scheduler init to register resources cleanup at exit
#if TBB_VERSION_MAJOR == 2020
#include <tbb/global_control.h>
tbb::global_control scheduler(tbb::global_control::max_allowed_parallelism, 2);
#else
#include <tbb/task_scheduler_init.h>
tbb::task_scheduler_init init(2);
#endif
BOOST_AUTO_TEST_SUITE(static_rtree)