moved basic type definitions to osrm namespace
This commit is contained in:
committed by
Patrick Niklaus
parent
faaf82c837
commit
ec3cda32fa
@@ -23,7 +23,7 @@ void CellStorageStatistics(const Graph &graph,
|
||||
|
||||
for (std::size_t level = 1; level < partition.GetNumberOfLevels(); ++level)
|
||||
{
|
||||
std::unordered_map<partition::CellID, std::size_t> cell_nodes;
|
||||
std::unordered_map<CellID, std::size_t> cell_nodes;
|
||||
for (auto node : util::irange(0u, graph.GetNumberOfNodes()))
|
||||
{
|
||||
++cell_nodes[partition.GetCell(level, node)];
|
||||
@@ -55,14 +55,14 @@ void CellStorageStatistics(const Graph &graph,
|
||||
}
|
||||
|
||||
util::Log() << "Level " << level << " #cells " << cell_nodes.size() << " #nodes " << total
|
||||
<< ", source nodes: average " << source
|
||||
<< " (" << (100. * source / total) << "%)"
|
||||
<< " invalid " << invalid_sources
|
||||
<< " (" << (100. * invalid_sources / total) << "%)"
|
||||
<< ", destination nodes: average " << destination
|
||||
<< " (" << (100. * destination / total) << "%)"
|
||||
<< " invalid " << invalid_destinations
|
||||
<< " (" << (100. * invalid_destinations / total) << "%)";
|
||||
<< ", source nodes: average " << source << " (" << (100. * source / total)
|
||||
<< "%)"
|
||||
<< " invalid " << invalid_sources << " (" << (100. * invalid_sources / total)
|
||||
<< "%)"
|
||||
<< ", destination nodes: average " << destination << " ("
|
||||
<< (100. * destination / total) << "%)"
|
||||
<< " invalid " << invalid_destinations << " ("
|
||||
<< (100. * invalid_destinations / total) << "%)";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "partition/partitioner.hpp"
|
||||
#include "partition/bisection_graph.hpp"
|
||||
#include "partition/bisection_to_partition.hpp"
|
||||
#include "partition/cell_storage.hpp"
|
||||
#include "partition/compressed_node_based_graph_reader.hpp"
|
||||
#include "partition/edge_based_graph_reader.hpp"
|
||||
#include "partition/io.hpp"
|
||||
@@ -17,7 +18,6 @@
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
+10
-12
@@ -427,19 +427,17 @@ void Storage::PopulateLayout(DataLayout &layout)
|
||||
reader.Skip<partition::MultiLevelPartition::LevelData>(1);
|
||||
layout.SetBlockSize<partition::MultiLevelPartition::LevelData>(
|
||||
DataLayout::MLD_LEVEL_DATA, 1);
|
||||
const auto partition_entries_count = reader.ReadVectorSize<partition::PartitionID>();
|
||||
layout.SetBlockSize<partition::PartitionID>(DataLayout::MLD_PARTITION,
|
||||
partition_entries_count);
|
||||
const auto children_entries_count = reader.ReadVectorSize<partition::CellID>();
|
||||
layout.SetBlockSize<partition::CellID>(DataLayout::MLD_CELL_TO_CHILDREN,
|
||||
children_entries_count);
|
||||
const auto partition_entries_count = reader.ReadVectorSize<PartitionID>();
|
||||
layout.SetBlockSize<PartitionID>(DataLayout::MLD_PARTITION, partition_entries_count);
|
||||
const auto children_entries_count = reader.ReadVectorSize<CellID>();
|
||||
layout.SetBlockSize<CellID>(DataLayout::MLD_CELL_TO_CHILDREN, children_entries_count);
|
||||
}
|
||||
else
|
||||
{
|
||||
layout.SetBlockSize<partition::MultiLevelPartition::LevelData>(
|
||||
DataLayout::MLD_LEVEL_DATA, 0);
|
||||
layout.SetBlockSize<partition::PartitionID>(DataLayout::MLD_PARTITION, 0);
|
||||
layout.SetBlockSize<partition::CellID>(DataLayout::MLD_CELL_TO_CHILDREN, 0);
|
||||
layout.SetBlockSize<PartitionID>(DataLayout::MLD_PARTITION, 0);
|
||||
layout.SetBlockSize<CellID>(DataLayout::MLD_CELL_TO_CHILDREN, 0);
|
||||
}
|
||||
|
||||
if (boost::filesystem::exists(config.mld_storage_path))
|
||||
@@ -964,10 +962,10 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
|
||||
auto mld_level_data_ptr =
|
||||
layout.GetBlockPtr<partition::MultiLevelPartition::LevelData, true>(
|
||||
memory_ptr, DataLayout::MLD_LEVEL_DATA);
|
||||
auto mld_partition_ptr = layout.GetBlockPtr<partition::PartitionID, true>(
|
||||
memory_ptr, DataLayout::MLD_PARTITION);
|
||||
auto mld_chilren_ptr = layout.GetBlockPtr<partition::CellID, true>(
|
||||
memory_ptr, DataLayout::MLD_CELL_TO_CHILDREN);
|
||||
auto mld_partition_ptr =
|
||||
layout.GetBlockPtr<PartitionID, true>(memory_ptr, DataLayout::MLD_PARTITION);
|
||||
auto mld_chilren_ptr =
|
||||
layout.GetBlockPtr<CellID, true>(memory_ptr, DataLayout::MLD_CELL_TO_CHILDREN);
|
||||
|
||||
io::FileReader reader(config.mld_partition_path, io::FileReader::VerifyFingerprint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user