Open wangyoucao577 opened 4 years ago
https://github.com/Telenav/osrm-backend/blob/d21e5dd286a3f296ae529c0c3a2166939af895e3/src/storage/storage.cpp#L327-L334
lists all the metric related files.
https://github.com/Telenav/osrm-backend/blob/d21e5dd286a3f296ae529c0c3a2166939af895e3/src/storage/storage.cpp#L509 shows operation on these updatable files.
Another place need to pay attention to is here: https://github.com/Telenav/osrm-backend/blob/6900e30070a4ed3f1ca59004d57010a344cc7c9b/include/engine/datafacade/contiguous_internalmem_datafacade.hpp#L176
template <> class ContiguousInternalMemoryAlgorithmDataFacade<MLD> : public AlgorithmDataFacade<MLD>
{
void InitializeInternalPointers(const storage::SharedDataIndex &index,
const std::string &metric_name,
const std::size_t exclude_index)
{
mld_partition = make_partition_view(index, "/mld/multilevelpartition");
mld_cell_metric =
make_filtered_cell_metric_view(index, "/mld/metrics/" + metric_name, exclude_index);
mld_cell_storage = make_cell_storage_view(index, "/mld/cellstorage");
query_graph = make_multi_level_graph_view(index, "/mld/multilevelgraph");
}
void InitializeInternalPointers(const storage::SharedDataIndex &index,
const std::string &metric_name,
const std::size_t exclude_index)
{
// TODO: For multi-metric support we need to have separate exclude classes per metric
Some important references/discussion