Merge pull request #5813 from woltapp/tbbdeprecation
Partially fixes use of deprecated TBB features
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
#include "osrm/contractor.hpp"
|
||||
#include "osrm/contractor_config.hpp"
|
||||
|
||||
#include <tbb/task_scheduler_init.h> // default_num_threads
|
||||
#include <thread>
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(library_contract)
|
||||
|
||||
@@ -12,7 +12,7 @@ BOOST_AUTO_TEST_CASE(test_contract_with_invalid_config)
|
||||
using namespace osrm;
|
||||
|
||||
osrm::ContractorConfig config;
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
config.requested_num_threads = std::thread::hardware_concurrency();
|
||||
BOOST_CHECK_THROW(osrm::contract(config),
|
||||
std::exception); // including osrm::util::exception, etc.
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "osrm/customizer.hpp"
|
||||
#include "osrm/customizer_config.hpp"
|
||||
|
||||
#include <tbb/task_scheduler_init.h> // default_num_threads
|
||||
#include <thread>
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(library_customize)
|
||||
|
||||
@@ -12,7 +12,7 @@ BOOST_AUTO_TEST_CASE(test_customize_with_invalid_config)
|
||||
using namespace osrm;
|
||||
|
||||
osrm::CustomizationConfig config;
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
config.requested_num_threads = std::thread::hardware_concurrency();
|
||||
BOOST_CHECK_THROW(osrm::customize(config),
|
||||
std::exception); // including osrm::util::exception, etc.
|
||||
}
|
||||
|
||||
@@ -3,14 +3,14 @@
|
||||
#include "osrm/extractor.hpp"
|
||||
#include "osrm/extractor_config.hpp"
|
||||
|
||||
#include <tbb/task_scheduler_init.h> // default_num_threads
|
||||
#include <thread>
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(library_extract)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_extract_with_invalid_config)
|
||||
{
|
||||
osrm::ExtractorConfig config;
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
config.requested_num_threads = std::thread::hardware_concurrency();
|
||||
BOOST_CHECK_THROW(osrm::extract(config),
|
||||
std::exception); // including osrm::util::exception, osmium::io_error, etc.
|
||||
}
|
||||
@@ -20,7 +20,7 @@ BOOST_AUTO_TEST_CASE(test_extract_with_valid_config)
|
||||
osrm::ExtractorConfig config;
|
||||
config.input_path = OSRM_TEST_DATA_DIR "/monaco.osm.pbf";
|
||||
config.UseDefaultOutputNames(OSRM_TEST_DATA_DIR "/monaco.osm.pbf");
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
config.requested_num_threads = std::thread::hardware_concurrency();
|
||||
BOOST_CHECK_NO_THROW(osrm::extract(config));
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "osrm/partitioner.hpp"
|
||||
#include "osrm/partitioner_config.hpp"
|
||||
|
||||
#include <tbb/task_scheduler_init.h> // default_num_threads
|
||||
#include <thread>
|
||||
|
||||
BOOST_AUTO_TEST_SUITE(library_partition)
|
||||
|
||||
@@ -12,7 +12,7 @@ BOOST_AUTO_TEST_CASE(test_partition_with_invalid_config)
|
||||
using namespace osrm;
|
||||
|
||||
osrm::PartitionerConfig config;
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
config.requested_num_threads = std::thread::hardware_concurrency();
|
||||
BOOST_CHECK_THROW(osrm::partition(config),
|
||||
std::exception); // including osrm::util::exception, etc.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user