MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / writeGraph

Function writeGraph

include/customizer/files.hpp:91–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89// writes .osrm.mldgr file
90template <typename MultiLevelGraphT>
91inline void writeGraph(const std::filesystem::path &path,
92 const MultiLevelGraphT &graph,
93 const std::uint32_t connectivity_checksum)
94{
95 static_assert(std::is_same<customizer::MultiLevelEdgeBasedGraphView, MultiLevelGraphT>::value ||
96 std::is_same<customizer::MultiLevelEdgeBasedGraph, MultiLevelGraphT>::value,
97 "");
98
99 storage::tar::FileWriter writer{path, storage::tar::FileWriter::GenerateFingerprint};
100
101 writer.WriteElementCount64("/mld/connectivity_checksum", 1);
102 writer.WriteFrom("/mld/connectivity_checksum", connectivity_checksum);
103 serialization::write(writer, "/mld/multilevelgraph", graph);
104}
105} // namespace osrm::customizer::files
106
107#endif

Callers

nothing calls this directly

Calls 3

writeFunction · 0.70
WriteElementCount64Method · 0.45
WriteFromMethod · 0.45

Tested by

no test coverage detected