Code formatting
This commit is contained in:
parent
73dd9140d1
commit
a59ce85fd0
@ -15,8 +15,8 @@ struct QueryEdge
|
|||||||
struct EdgeData
|
struct EdgeData
|
||||||
{
|
{
|
||||||
explicit EdgeData()
|
explicit EdgeData()
|
||||||
: turn_id(0), shortcut(false), weight{0}, duration(0), forward(false),
|
: turn_id(0), shortcut(false), weight{0}, duration(0), forward(false), backward(false),
|
||||||
backward(false), distance{0}
|
distance{0}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,9 +72,8 @@ class BaseAPI
|
|||||||
std::transform(candidates.begin(),
|
std::transform(candidates.begin(),
|
||||||
candidates.end(),
|
candidates.end(),
|
||||||
seg_hints.begin(),
|
seg_hints.begin(),
|
||||||
[this](const auto &phantom) {
|
[this](const auto &phantom)
|
||||||
return SegmentHint{phantom, facade.GetCheckSum()};
|
{ return SegmentHint{phantom, facade.GetCheckSum()}; });
|
||||||
});
|
|
||||||
|
|
||||||
return json::makeWaypoint(
|
return json::makeWaypoint(
|
||||||
snapped_location,
|
snapped_location,
|
||||||
@ -142,9 +141,8 @@ class BaseAPI
|
|||||||
std::transform(candidates.begin(),
|
std::transform(candidates.begin(),
|
||||||
candidates.end(),
|
candidates.end(),
|
||||||
seg_hints.begin(),
|
seg_hints.begin(),
|
||||||
[this](const auto &phantom) {
|
[this](const auto &phantom)
|
||||||
return SegmentHint{phantom, facade.GetCheckSum()};
|
{ return SegmentHint{phantom, facade.GetCheckSum()}; });
|
||||||
});
|
|
||||||
Hint hint{std::move(seg_hints)};
|
Hint hint{std::move(seg_hints)};
|
||||||
hint_string = builder->CreateString(hint.ToBase64());
|
hint_string = builder->CreateString(hint.ToBase64());
|
||||||
}
|
}
|
||||||
|
@ -78,9 +78,8 @@ struct MatchParameters : public RouteParameters
|
|||||||
bool tidy_,
|
bool tidy_,
|
||||||
const std::vector<std::size_t> &waypoints_,
|
const std::vector<std::size_t> &waypoints_,
|
||||||
Args &&...args_)
|
Args &&...args_)
|
||||||
: RouteParameters{std::forward<Args>(args_)..., waypoints_}, timestamps{std::move(
|
: RouteParameters{std::forward<Args>(args_)..., waypoints_},
|
||||||
timestamps_)},
|
timestamps{std::move(timestamps_)}, gaps(gaps_), tidy(tidy_)
|
||||||
gaps(gaps_), tidy(tidy_)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -141,8 +141,8 @@ struct RouteParameters : public BaseParameters
|
|||||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_},
|
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_},
|
||||||
annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None},
|
annotations_type{annotations_ ? AnnotationsType::All : AnnotationsType::None},
|
||||||
geometries{geometries_}, overview{overview_},
|
geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_},
|
||||||
continue_straight{continue_straight_}, waypoints{std::move(waypoints_)}
|
waypoints{std::move(waypoints_)}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,10 +157,10 @@ struct RouteParameters : public BaseParameters
|
|||||||
std::vector<std::size_t> waypoints_,
|
std::vector<std::size_t> waypoints_,
|
||||||
Args &&...args_)
|
Args &&...args_)
|
||||||
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
: BaseParameters{std::forward<Args>(args_)...}, steps{steps_}, alternatives{alternatives_},
|
||||||
number_of_alternatives{alternatives_ ? 1u : 0u}, annotations{annotations_ !=
|
number_of_alternatives{alternatives_ ? 1u : 0u},
|
||||||
AnnotationsType::None},
|
annotations{annotations_ != AnnotationsType::None}, annotations_type{annotations_},
|
||||||
annotations_type{annotations_}, geometries{geometries_}, overview{overview_},
|
geometries{geometries_}, overview{overview_}, continue_straight{continue_straight_},
|
||||||
continue_straight{continue_straight_}, waypoints{std::move(waypoints_)}
|
waypoints{std::move(waypoints_)}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,8 +61,8 @@ struct TripParameters : public RouteParameters
|
|||||||
DestinationType destination_,
|
DestinationType destination_,
|
||||||
bool roundtrip_,
|
bool roundtrip_,
|
||||||
Args &&...args_)
|
Args &&...args_)
|
||||||
: RouteParameters{std::forward<Args>(args_)...}, source{source_},
|
: RouteParameters{std::forward<Args>(args_)...}, source{source_}, destination{destination_},
|
||||||
destination{destination_}, roundtrip{roundtrip_}
|
roundtrip{roundtrip_}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#include "storage/storage_config.hpp"
|
#include "storage/storage_config.hpp"
|
||||||
#include "osrm/datasets.hpp"
|
#include "osrm/datasets.hpp"
|
||||||
|
|
||||||
#include <set>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <set>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
namespace osrm::engine
|
namespace osrm::engine
|
||||||
|
@ -44,16 +44,15 @@ namespace osrm::engine
|
|||||||
struct PhantomNode
|
struct PhantomNode
|
||||||
{
|
{
|
||||||
PhantomNode()
|
PhantomNode()
|
||||||
: forward_segment_id{SPECIAL_SEGMENTID, false}, reverse_segment_id{SPECIAL_SEGMENTID,
|
: forward_segment_id{SPECIAL_SEGMENTID, false},
|
||||||
false},
|
reverse_segment_id{SPECIAL_SEGMENTID, false}, forward_weight(INVALID_EDGE_WEIGHT),
|
||||||
forward_weight(INVALID_EDGE_WEIGHT),
|
|
||||||
reverse_weight(INVALID_EDGE_WEIGHT), forward_weight_offset{0}, reverse_weight_offset{0},
|
reverse_weight(INVALID_EDGE_WEIGHT), forward_weight_offset{0}, reverse_weight_offset{0},
|
||||||
forward_distance(INVALID_EDGE_DISTANCE), reverse_distance(INVALID_EDGE_DISTANCE),
|
forward_distance(INVALID_EDGE_DISTANCE), reverse_distance(INVALID_EDGE_DISTANCE),
|
||||||
forward_distance_offset{0}, reverse_distance_offset{0},
|
forward_distance_offset{0}, reverse_distance_offset{0},
|
||||||
forward_duration(MAXIMAL_EDGE_DURATION), reverse_duration(MAXIMAL_EDGE_DURATION),
|
forward_duration(MAXIMAL_EDGE_DURATION), reverse_duration(MAXIMAL_EDGE_DURATION),
|
||||||
forward_duration_offset{0}, reverse_duration_offset{0},
|
forward_duration_offset{0}, reverse_duration_offset{0},
|
||||||
component({INVALID_COMPONENTID, 0}),
|
component({INVALID_COMPONENTID, 0}), fwd_segment_position(0),
|
||||||
fwd_segment_position(0), is_valid_forward_source{false}, is_valid_forward_target{false},
|
is_valid_forward_source{false}, is_valid_forward_target{false},
|
||||||
is_valid_reverse_source{false}, is_valid_reverse_target{false}, bearing(0)
|
is_valid_reverse_source{false}, is_valid_reverse_target{false}, bearing(0)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -18,9 +18,8 @@ namespace osrm::extractor
|
|||||||
struct EdgeBasedNodeSegment
|
struct EdgeBasedNodeSegment
|
||||||
{
|
{
|
||||||
EdgeBasedNodeSegment()
|
EdgeBasedNodeSegment()
|
||||||
: forward_segment_id{SPECIAL_SEGMENTID, false}, reverse_segment_id{SPECIAL_SEGMENTID,
|
: forward_segment_id{SPECIAL_SEGMENTID, false},
|
||||||
false},
|
reverse_segment_id{SPECIAL_SEGMENTID, false}, u(SPECIAL_NODEID), v(SPECIAL_NODEID),
|
||||||
u(SPECIAL_NODEID), v(SPECIAL_NODEID),
|
|
||||||
fwd_segment_position(std::numeric_limits<unsigned short>::max() >>
|
fwd_segment_position(std::numeric_limits<unsigned short>::max() >>
|
||||||
1), // >> 1 because we've only got 15 bits
|
1), // >> 1 because we've only got 15 bits
|
||||||
is_startpoint(false)
|
is_startpoint(false)
|
||||||
|
@ -54,8 +54,7 @@ void readIntersections(const std::filesystem::path &path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// reads .osrm.properties
|
// reads .osrm.properties
|
||||||
inline void readProfileProperties(const std::filesystem::path &path,
|
inline void readProfileProperties(const std::filesystem::path &path, ProfileProperties &properties)
|
||||||
ProfileProperties &properties)
|
|
||||||
{
|
{
|
||||||
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
||||||
storage::tar::FileReader reader{path, fingerprint};
|
storage::tar::FileReader reader{path, fingerprint};
|
||||||
@ -160,8 +159,7 @@ inline void readNBGMapping(const std::filesystem::path &path, std::vector<NBGToE
|
|||||||
}
|
}
|
||||||
|
|
||||||
// writes .osrm.cnbg_to_ebg
|
// writes .osrm.cnbg_to_ebg
|
||||||
inline void writeNBGMapping(const std::filesystem::path &path,
|
inline void writeNBGMapping(const std::filesystem::path &path, const std::vector<NBGToEBG> &mapping)
|
||||||
const std::vector<NBGToEBG> &mapping)
|
|
||||||
{
|
{
|
||||||
const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
|
const auto fingerprint = storage::tar::FileWriter::GenerateFingerprint;
|
||||||
storage::tar::FileWriter writer{path, fingerprint};
|
storage::tar::FileWriter writer{path, fingerprint};
|
||||||
@ -466,8 +464,7 @@ void readRawNBGraph(const std::filesystem::path &path,
|
|||||||
storage::serialization::read(reader, "/extractor/edges", edge_list);
|
storage::serialization::read(reader, "/extractor/edges", edge_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename NameTableT>
|
template <typename NameTableT> void readNames(const std::filesystem::path &path, NameTableT &table)
|
||||||
void readNames(const std::filesystem::path &path, NameTableT &table)
|
|
||||||
{
|
{
|
||||||
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
||||||
storage::tar::FileReader reader{path, fingerprint};
|
storage::tar::FileReader reader{path, fingerprint};
|
||||||
@ -494,8 +491,7 @@ void readEdgeBasedNodeWeights(const std::filesystem::path &path, NodeWeightsVect
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename NodeDistancesVectorT>
|
template <typename NodeDistancesVectorT>
|
||||||
void readEdgeBasedNodeDistances(const std::filesystem::path &path,
|
void readEdgeBasedNodeDistances(const std::filesystem::path &path, NodeDistancesVectorT &distances)
|
||||||
NodeDistancesVectorT &distances)
|
|
||||||
{
|
{
|
||||||
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
const auto fingerprint = storage::tar::FileReader::VerifyFingerprint;
|
||||||
storage::tar::FileReader reader{path, fingerprint};
|
storage::tar::FileReader reader{path, fingerprint};
|
||||||
|
@ -105,9 +105,7 @@ std::vector<BisectionInputEdge> adaptToBisectionEdge(std::vector<InputEdge> edge
|
|||||||
std::transform(begin(edges),
|
std::transform(begin(edges),
|
||||||
end(edges),
|
end(edges),
|
||||||
std::back_inserter(result),
|
std::back_inserter(result),
|
||||||
[](const auto &edge) {
|
[](const auto &edge) { return BisectionInputEdge{edge.source, edge.target}; });
|
||||||
return BisectionInputEdge{edge.source, edge.target};
|
|
||||||
});
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -189,10 +189,10 @@ template <storage::Ownership Ownership> class CellStorageImpl
|
|||||||
const NodeID *const all_sources,
|
const NodeID *const all_sources,
|
||||||
const NodeID *const all_destinations)
|
const NodeID *const all_destinations)
|
||||||
: num_source_nodes{data.num_source_nodes},
|
: num_source_nodes{data.num_source_nodes},
|
||||||
num_destination_nodes{data.num_destination_nodes}, weights{all_weights +
|
num_destination_nodes{data.num_destination_nodes},
|
||||||
data.value_offset},
|
weights{all_weights + data.value_offset},
|
||||||
durations{all_durations + data.value_offset}, distances{all_distances +
|
durations{all_durations + data.value_offset},
|
||||||
data.value_offset},
|
distances{all_distances + data.value_offset},
|
||||||
source_boundary{all_sources + data.source_boundary_offset},
|
source_boundary{all_sources + data.source_boundary_offset},
|
||||||
destination_boundary{all_destinations + data.destination_boundary_offset}
|
destination_boundary{all_destinations + data.destination_boundary_offset}
|
||||||
{
|
{
|
||||||
@ -210,8 +210,8 @@ template <storage::Ownership Ownership> class CellStorageImpl
|
|||||||
const NodeID *const all_destinations)
|
const NodeID *const all_destinations)
|
||||||
: num_source_nodes{data.num_source_nodes},
|
: num_source_nodes{data.num_source_nodes},
|
||||||
num_destination_nodes{data.num_destination_nodes}, weights{nullptr},
|
num_destination_nodes{data.num_destination_nodes}, weights{nullptr},
|
||||||
durations{nullptr}, distances{nullptr}, source_boundary{all_sources +
|
durations{nullptr}, distances{nullptr},
|
||||||
data.source_boundary_offset},
|
source_boundary{all_sources + data.source_boundary_offset},
|
||||||
destination_boundary{all_destinations + data.destination_boundary_offset}
|
destination_boundary{all_destinations + data.destination_boundary_offset}
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(num_source_nodes == 0 || all_sources != nullptr);
|
BOOST_ASSERT(num_source_nodes == 0 || all_sources != nullptr);
|
||||||
|
@ -164,8 +164,7 @@ graphToEdges(const DynamicEdgeBasedGraph &edge_based_graph)
|
|||||||
[](const NodeID lhs, const NodeID rhs) { return std::max(lhs, rhs); });
|
[](const NodeID lhs, const NodeID rhs) { return std::max(lhs, rhs); });
|
||||||
|
|
||||||
std::vector<extractor::EdgeBasedEdge> edges(max_turn_id + 1);
|
std::vector<extractor::EdgeBasedEdge> edges(max_turn_id + 1);
|
||||||
tbb::parallel_for(
|
tbb::parallel_for(range,
|
||||||
range,
|
|
||||||
[&](const auto range)
|
[&](const auto range)
|
||||||
{
|
{
|
||||||
for (auto node = range.begin(); node < range.end(); ++node)
|
for (auto node = range.begin(); node < range.end(); ++node)
|
||||||
@ -173,13 +172,14 @@ graphToEdges(const DynamicEdgeBasedGraph &edge_based_graph)
|
|||||||
for (auto edge : edge_based_graph.GetAdjacentEdgeRange(node))
|
for (auto edge : edge_based_graph.GetAdjacentEdgeRange(node))
|
||||||
{
|
{
|
||||||
const auto &data = edge_based_graph.GetEdgeData(edge);
|
const auto &data = edge_based_graph.GetEdgeData(edge);
|
||||||
// we only need to save the forward edges, since the read method will
|
// we only need to save the forward edges, since the read method
|
||||||
// convert from forward to bi-directional edges again
|
// will convert from forward to bi-directional edges again
|
||||||
if (data.forward)
|
if (data.forward)
|
||||||
{
|
{
|
||||||
auto target = edge_based_graph.GetTarget(edge);
|
auto target = edge_based_graph.GetTarget(edge);
|
||||||
BOOST_ASSERT(data.turn_id <= max_turn_id);
|
BOOST_ASSERT(data.turn_id <= max_turn_id);
|
||||||
edges[data.turn_id] = extractor::EdgeBasedEdge{node, target, data};
|
edges[data.turn_id] =
|
||||||
|
extractor::EdgeBasedEdge{node, target, data};
|
||||||
// only save the forward edge
|
// only save the forward edge
|
||||||
edges[data.turn_id].data.forward = true;
|
edges[data.turn_id].data.forward = true;
|
||||||
edges[data.turn_id].data.backward = false;
|
edges[data.turn_id].data.backward = false;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef OSRM_PARTITIONER_CONFIG_HPP
|
#ifndef OSRM_PARTITIONER_CONFIG_HPP
|
||||||
#define OSRM_PARTITIONER_CONFIG_HPP
|
#define OSRM_PARTITIONER_CONFIG_HPP
|
||||||
|
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@ -110,10 +110,9 @@ struct BaseParametersGrammar : boost::spirit::qi::grammar<Iterator, Signature>
|
|||||||
unlimited_rule = qi::lit("unlimited")[qi::_val = std::numeric_limits<double>::infinity()];
|
unlimited_rule = qi::lit("unlimited")[qi::_val = std::numeric_limits<double>::infinity()];
|
||||||
|
|
||||||
bearing_rule =
|
bearing_rule =
|
||||||
(qi::short_ > ',' > qi::short_)[qi::_val = ph::bind(
|
(qi::short_ > ',' >
|
||||||
[](short bearing, short range) {
|
qi::short_)[qi::_val = ph::bind([](short bearing, short range)
|
||||||
return osrm::engine::Bearing{bearing, range};
|
{ return osrm::engine::Bearing{bearing, range}; },
|
||||||
},
|
|
||||||
qi::_1,
|
qi::_1,
|
||||||
qi::_2)];
|
qi::_2)];
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#ifndef STORAGE_CONFIG_HPP
|
#ifndef STORAGE_CONFIG_HPP
|
||||||
#define STORAGE_CONFIG_HPP
|
#define STORAGE_CONFIG_HPP
|
||||||
|
|
||||||
|
|
||||||
#include "storage/io_config.hpp"
|
#include "storage/io_config.hpp"
|
||||||
#include "osrm/datasets.hpp"
|
#include "osrm/datasets.hpp"
|
||||||
|
|
||||||
|
@ -267,9 +267,7 @@ template <typename ElementT> class DeallocatingVector
|
|||||||
++current_size;
|
++current_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
void reserve(const std::size_t) const
|
void reserve(const std::size_t) const { /* don't do anything */ }
|
||||||
{ /* don't do anything */
|
|
||||||
}
|
|
||||||
|
|
||||||
void resize(const std::size_t new_size)
|
void resize(const std::size_t new_size)
|
||||||
{
|
{
|
||||||
|
@ -34,9 +34,8 @@ util::vector_view<T> mmapFile(const std::filesystem::path &file, MmapContainerT
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename MmapContainerT>
|
template <typename T, typename MmapContainerT>
|
||||||
util::vector_view<T> mmapFile(const std::filesystem::path &file,
|
util::vector_view<T>
|
||||||
MmapContainerT &mmap_container,
|
mmapFile(const std::filesystem::path &file, MmapContainerT &mmap_container, const std::size_t size)
|
||||||
const std::size_t size)
|
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -11,11 +11,10 @@
|
|||||||
#include "util/serialization.hpp"
|
#include "util/serialization.hpp"
|
||||||
#include "util/timing_util.hpp"
|
#include "util/timing_util.hpp"
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
|
|
||||||
namespace osrm::benchmarks
|
namespace osrm::benchmarks
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -4,13 +4,12 @@
|
|||||||
#include <boost/assert.hpp>
|
#include <boost/assert.hpp>
|
||||||
#include <boost/numeric/conversion/cast.hpp>
|
#include <boost/numeric/conversion/cast.hpp>
|
||||||
|
|
||||||
#include <fstream>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
namespace osrm::extractor
|
namespace osrm::extractor
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1183,9 +1183,8 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
|||||||
first_turn_edges.first,
|
first_turn_edges.first,
|
||||||
first_turn_edges.second,
|
first_turn_edges.second,
|
||||||
std::back_inserter(node_sequences),
|
std::back_inserter(node_sequences),
|
||||||
[](const auto turn_edges) {
|
[](const auto turn_edges)
|
||||||
return std::vector<NodeID>{turn_edges.second.first, turn_edges.second.second};
|
{ return std::vector<NodeID>{turn_edges.second.first, turn_edges.second.second}; });
|
||||||
});
|
|
||||||
|
|
||||||
std::for_each(std::next(turns.begin()),
|
std::for_each(std::next(turns.begin()),
|
||||||
turns.end(),
|
turns.end(),
|
||||||
|
@ -61,9 +61,8 @@ RecursiveBisection::RecursiveBisection(BisectionGraph &bisection_graph_,
|
|||||||
std::transform(first,
|
std::transform(first,
|
||||||
last,
|
last,
|
||||||
std::back_inserter(forest),
|
std::back_inserter(forest),
|
||||||
[this](auto graph) {
|
[this](auto graph)
|
||||||
return TreeNode{std::move(graph), internal_state.SCCDepth()};
|
{ return TreeNode{std::move(graph), internal_state.SCCDepth()}; });
|
||||||
});
|
|
||||||
|
|
||||||
using Feeder = tbb::feeder<TreeNode>;
|
using Feeder = tbb::feeder<TreeNode>;
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
#include <boost/interprocess/sync/scoped_lock.hpp>
|
#include <boost/interprocess/sync/scoped_lock.hpp>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <fstream>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
|
|
||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
|
|
||||||
#include <iostream>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
#include <iostream>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
using namespace osrm;
|
using namespace osrm;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#include "util/log.hpp"
|
#include "util/log.hpp"
|
||||||
#include "util/timing_util.hpp"
|
#include "util/timing_util.hpp"
|
||||||
|
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -13,9 +12,9 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <iomanip>
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <iomanip>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <random>
|
#include <random>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
#include <boost/program_options.hpp>
|
#include <boost/program_options.hpp>
|
||||||
#include <boost/range/adaptor/transformed.hpp>
|
#include <boost/range/adaptor/transformed.hpp>
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <filesystem>
|
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
@ -110,8 +110,8 @@ inline unsigned generateServerProgramOptions(const int argc,
|
|||||||
int &requested_thread_num,
|
int &requested_thread_num,
|
||||||
short &keepalive_timeout)
|
short &keepalive_timeout)
|
||||||
{
|
{
|
||||||
using std::filesystem::path;
|
|
||||||
using boost::program_options::value;
|
using boost::program_options::value;
|
||||||
|
using std::filesystem::path;
|
||||||
|
|
||||||
const auto hardware_threads = std::max<int>(1, std::thread::hardware_concurrency());
|
const auto hardware_threads = std::max<int>(1, std::thread::hardware_concurrency());
|
||||||
|
|
||||||
|
@ -13,7 +13,8 @@ inline std::string random_string(std::string::size_type length)
|
|||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
thread_local static std::mt19937 rg{std::random_device{}()};
|
thread_local static std::mt19937 rg{std::random_device{}()};
|
||||||
thread_local static std::uniform_int_distribution<std::string::size_type> pick(0, sizeof(chrs) - 2);
|
thread_local static std::uniform_int_distribution<std::string::size_type> pick(
|
||||||
|
0, sizeof(chrs) - 2);
|
||||||
|
|
||||||
std::string s;
|
std::string s;
|
||||||
s.reserve(length);
|
s.reserve(length);
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
#include <boost/test/unit_test.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
|
#include <filesystem>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <filesystem>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
Loading…
Reference in New Issue
Block a user