clang-format
This commit is contained in:
committed by
Patrick Niklaus
parent
16665aeb00
commit
091a495632
@@ -35,8 +35,7 @@ using CellStorageView = detail::CellStorageImpl<osrm::storage::Ownership::View>;
|
||||
namespace io
|
||||
{
|
||||
template <osrm::storage::Ownership Ownership>
|
||||
inline void read(const boost::filesystem::path &path,
|
||||
detail::CellStorageImpl<Ownership> &storage);
|
||||
inline void read(const boost::filesystem::path &path, detail::CellStorageImpl<Ownership> &storage);
|
||||
template <osrm::storage::Ownership Ownership>
|
||||
inline void write(const boost::filesystem::path &path,
|
||||
const detail::CellStorageImpl<Ownership> &storage);
|
||||
@@ -186,9 +185,8 @@ template <osrm::storage::Ownership Ownership> class CellStorageImpl
|
||||
|
||||
CellStorageImpl() {}
|
||||
|
||||
template <
|
||||
typename GraphT,
|
||||
typename = std::enable_if<Ownership == osrm::storage::Ownership::Container>>
|
||||
template <typename GraphT,
|
||||
typename = std::enable_if<Ownership == osrm::storage::Ownership::Container>>
|
||||
CellStorageImpl(const partition::MultiLevelPartition &partition, const GraphT &base_graph)
|
||||
{
|
||||
// pre-allocate storge for CellData so we can have random access to it by cell id
|
||||
@@ -317,8 +315,7 @@ template <osrm::storage::Ownership Ownership> class CellStorageImpl
|
||||
weights.resize(weight_offset + 1, INVALID_EDGE_WEIGHT);
|
||||
}
|
||||
|
||||
template <
|
||||
typename = std::enable_if<Ownership == osrm::storage::Ownership::View>>
|
||||
template <typename = std::enable_if<Ownership == osrm::storage::Ownership::View>>
|
||||
CellStorageImpl(Vector<EdgeWeight> weights_,
|
||||
Vector<NodeID> source_boundary_,
|
||||
Vector<NodeID> destination_boundary_,
|
||||
@@ -343,8 +340,7 @@ template <osrm::storage::Ownership Ownership> class CellStorageImpl
|
||||
destination_boundary.empty() ? nullptr : destination_boundary.data()};
|
||||
}
|
||||
|
||||
template <
|
||||
typename = std::enable_if<Ownership == osrm::storage::Ownership::Container>>
|
||||
template <typename = std::enable_if<Ownership == osrm::storage::Ownership::Container>>
|
||||
Cell GetCell(LevelID level, CellID id)
|
||||
{
|
||||
const auto level_index = LevelIDToIndex(level);
|
||||
@@ -357,9 +353,9 @@ template <osrm::storage::Ownership Ownership> class CellStorageImpl
|
||||
}
|
||||
|
||||
friend void io::read<Ownership>(const boost::filesystem::path &path,
|
||||
detail::CellStorageImpl<Ownership> &storage);
|
||||
detail::CellStorageImpl<Ownership> &storage);
|
||||
friend void io::write<Ownership>(const boost::filesystem::path &path,
|
||||
const detail::CellStorageImpl<Ownership> &storage);
|
||||
const detail::CellStorageImpl<Ownership> &storage);
|
||||
|
||||
private:
|
||||
Vector<EdgeWeight> weights;
|
||||
|
||||
@@ -17,8 +17,7 @@ namespace io
|
||||
{
|
||||
|
||||
template <typename EdgeDataT, osrm::storage::Ownership Ownership>
|
||||
inline void read(const boost::filesystem::path &path,
|
||||
MultiLevelGraph<EdgeDataT, Ownership> &graph)
|
||||
inline void read(const boost::filesystem::path &path, MultiLevelGraph<EdgeDataT, Ownership> &graph)
|
||||
{
|
||||
const auto fingerprint = storage::io::FileReader::VerifyFingerprint;
|
||||
storage::io::FileReader reader{path, fingerprint};
|
||||
|
||||
@@ -24,8 +24,7 @@ template <typename EdgeDataT, osrm::storage::Ownership Ownership>
|
||||
void read(const boost::filesystem::path &path, MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
|
||||
template <typename EdgeDataT, osrm::storage::Ownership Ownership>
|
||||
void write(const boost::filesystem::path &path,
|
||||
const MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
void write(const boost::filesystem::path &path, const MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
}
|
||||
|
||||
template <typename EdgeDataT, osrm::storage::Ownership Ownership>
|
||||
@@ -191,12 +190,10 @@ class MultiLevelGraph : public util::StaticGraph<EdgeDataT, Ownership>
|
||||
node_to_edge_offset.push_back(mlp.GetNumberOfLevels());
|
||||
}
|
||||
|
||||
friend void
|
||||
io::read<EdgeDataT, Ownership>(const boost::filesystem::path &path,
|
||||
MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
friend void
|
||||
io::write<EdgeDataT, Ownership>(const boost::filesystem::path &path,
|
||||
const MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
friend void io::read<EdgeDataT, Ownership>(const boost::filesystem::path &path,
|
||||
MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
friend void io::write<EdgeDataT, Ownership>(const boost::filesystem::path &path,
|
||||
const MultiLevelGraph<EdgeDataT, Ownership> &graph);
|
||||
|
||||
Vector<EdgeOffset> node_to_edge_offset;
|
||||
};
|
||||
|
||||
@@ -28,10 +28,8 @@ namespace detail
|
||||
{
|
||||
template <osrm::storage::Ownership Ownership> class MultiLevelPartitionImpl;
|
||||
}
|
||||
using MultiLevelPartition =
|
||||
detail::MultiLevelPartitionImpl<osrm::storage::Ownership::Container>;
|
||||
using MultiLevelPartitionView =
|
||||
detail::MultiLevelPartitionImpl<osrm::storage::Ownership::View>;
|
||||
using MultiLevelPartition = detail::MultiLevelPartitionImpl<osrm::storage::Ownership::Container>;
|
||||
using MultiLevelPartitionView = detail::MultiLevelPartitionImpl<osrm::storage::Ownership::View>;
|
||||
|
||||
namespace io
|
||||
{
|
||||
@@ -70,8 +68,7 @@ template <osrm::storage::Ownership Ownership> class MultiLevelPartitionImpl fina
|
||||
// cell_sizes is index by level (starting at 0, the base graph).
|
||||
// However level 0 always needs to have cell size 1, since it is the
|
||||
// basegraph.
|
||||
template <typename = typename std::enable_if<Ownership ==
|
||||
osrm::storage::Ownership::Container>>
|
||||
template <typename = typename std::enable_if<Ownership == osrm::storage::Ownership::Container>>
|
||||
MultiLevelPartitionImpl(const std::vector<std::vector<CellID>> &partitions,
|
||||
const std::vector<std::uint32_t> &lidx_to_num_cells)
|
||||
: level_data(MakeLevelData(lidx_to_num_cells))
|
||||
@@ -79,8 +76,7 @@ template <osrm::storage::Ownership Ownership> class MultiLevelPartitionImpl fina
|
||||
InitializePartitionIDs(partitions);
|
||||
}
|
||||
|
||||
template <typename = typename std::enable_if<Ownership ==
|
||||
osrm::storage::Ownership::View>>
|
||||
template <typename = typename std::enable_if<Ownership == osrm::storage::Ownership::View>>
|
||||
MultiLevelPartitionImpl(LevelData level_data,
|
||||
Vector<PartitionID> partition_,
|
||||
Vector<CellID> cell_to_children_)
|
||||
@@ -139,9 +135,9 @@ template <osrm::storage::Ownership Ownership> class MultiLevelPartitionImpl fina
|
||||
}
|
||||
|
||||
friend void io::read<Ownership>(const boost::filesystem::path &file,
|
||||
MultiLevelPartitionImpl &mlp);
|
||||
MultiLevelPartitionImpl &mlp);
|
||||
friend void io::write<Ownership>(const boost::filesystem::path &file,
|
||||
const MultiLevelPartitionImpl &mlp);
|
||||
const MultiLevelPartitionImpl &mlp);
|
||||
|
||||
private:
|
||||
auto MakeLevelData(const std::vector<std::uint32_t> &lidx_to_num_cells)
|
||||
|
||||
Reference in New Issue
Block a user