Merge pull request #5813 from woltapp/tbbdeprecation
Partially fixes use of deprecated TBB features
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
|
||||
#include <tbb/tbb_stddef.h> // For version lookup
|
||||
#if TBB_VERSION_MAJOR == 2020
|
||||
#include <tbb/global_control.h>
|
||||
#else
|
||||
#include <tbb/task_scheduler_init.h>
|
||||
#endif
|
||||
|
||||
using namespace osrm;
|
||||
using namespace osrm::contractor;
|
||||
@@ -15,7 +20,11 @@ BOOST_AUTO_TEST_SUITE(graph_contractor)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(contract_graph)
|
||||
{
|
||||
#if TBB_VERSION_MAJOR == 2020
|
||||
tbb::global_control scheduler(tbb::global_control::max_allowed_parallelism, 1);
|
||||
#else
|
||||
tbb::task_scheduler_init scheduler(1);
|
||||
#endif
|
||||
/*
|
||||
* <--1--<
|
||||
* (0) >--3--> (1) >--3--> (3)
|
||||
|
||||
Reference in New Issue
Block a user