Add CRC checksums to EBG and turns data

This commit is contained in:
Michael Krasnyk
2018-02-01 10:00:15 -05:00
parent 10de243556
commit 9e93f198ae
25 changed files with 432 additions and 110 deletions
+6 -2
View File
@@ -19,7 +19,8 @@ template <typename QueryGraphT, typename EdgeFilterT>
inline void readGraph(const boost::filesystem::path &path,
unsigned &checksum,
QueryGraphT &graph,
std::vector<EdgeFilterT> &edge_filter)
std::vector<EdgeFilterT> &edge_filter,
std::uint32_t &connectivity_checksum)
{
static_assert(std::is_same<QueryGraphView, QueryGraphT>::value ||
std::is_same<QueryGraph, QueryGraphT>::value,
@@ -39,6 +40,7 @@ inline void readGraph(const boost::filesystem::path &path,
{
storage::serialization::read(reader, edge_filter[index]);
}
reader.ReadInto(connectivity_checksum);
}
// writes .osrm.hsgr file
@@ -46,7 +48,8 @@ template <typename QueryGraphT, typename EdgeFilterT>
inline void writeGraph(const boost::filesystem::path &path,
unsigned checksum,
const QueryGraphT &graph,
const std::vector<EdgeFilterT> &edge_filter)
const std::vector<EdgeFilterT> &edge_filter,
const std::uint32_t connectivity_checksum)
{
static_assert(std::is_same<QueryGraphView, QueryGraphT>::value ||
std::is_same<QueryGraph, QueryGraphT>::value,
@@ -64,6 +67,7 @@ inline void writeGraph(const boost::filesystem::path &path,
{
storage::serialization::write(writer, filter);
}
writer.WriteOne(connectivity_checksum);
}
}
}