Clang format

This commit is contained in:
Patrick Niklaus
2017-03-04 02:16:20 +00:00
committed by Patrick Niklaus
parent 5f73ac1eda
commit ef71cc0d12
7 changed files with 46 additions and 41 deletions
+1 -1
View File
@@ -3,9 +3,9 @@
#include "partition/bisection_graph.hpp"
#include "partition/compressed_node_based_graph_reader.hpp"
#include "partition/edge_based_graph_reader.hpp"
#include "partition/io.hpp"
#include "partition/node_based_graph_to_edge_based_graph_mapping_reader.hpp"
#include "partition/recursive_bisection.hpp"
#include "partition/io.hpp"
#include "util/cell_storage.hpp"
#include "util/coordinate.hpp"
+17 -8
View File
@@ -403,15 +403,19 @@ void Storage::PopulateLayout(DataLayout &layout)
io::FileReader reader(config.mld_partition_path, io::FileReader::VerifyFingerprint);
reader.Skip<util::MultiLevelPartition::LevelData>(1);
layout.SetBlockSize<util::MultiLevelPartition::LevelData>(DataLayout::MLD_LEVEL_DATA, 1);
layout.SetBlockSize<util::MultiLevelPartition::LevelData>(DataLayout::MLD_LEVEL_DATA,
1);
const auto partition_entries_count = reader.ReadVectorSize<util::PartitionID>();
layout.SetBlockSize<util::PartitionID>(DataLayout::MLD_PARTITION, partition_entries_count);
layout.SetBlockSize<util::PartitionID>(DataLayout::MLD_PARTITION,
partition_entries_count);
const auto children_entries_count = reader.ReadVectorSize<util::CellID>();
layout.SetBlockSize<util::CellID>(DataLayout::MLD_CELL_TO_CHILDREN, children_entries_count);
layout.SetBlockSize<util::CellID>(DataLayout::MLD_CELL_TO_CHILDREN,
children_entries_count);
}
else
{
layout.SetBlockSize<util::MultiLevelPartition::LevelData>(DataLayout::MLD_LEVEL_DATA, 0);
layout.SetBlockSize<util::MultiLevelPartition::LevelData>(DataLayout::MLD_LEVEL_DATA,
0);
layout.SetBlockSize<util::PartitionID>(DataLayout::MLD_PARTITION, 0);
layout.SetBlockSize<util::CellID>(DataLayout::MLD_CELL_TO_CHILDREN, 0);
}
@@ -877,15 +881,20 @@ void Storage::PopulateData(const DataLayout &layout, char *memory_ptr)
// Loading MLD Data
if (boost::filesystem::exists(config.mld_partition_path))
{
auto mld_level_data_ptr = layout.GetBlockPtr<util::MultiLevelPartition::LevelData, true>(memory_ptr, DataLayout::MLD_LEVEL_DATA);
auto mld_partition_ptr = layout.GetBlockPtr<util::PartitionID, true>(memory_ptr, DataLayout::MLD_PARTITION);
auto mld_chilren_ptr = layout.GetBlockPtr<util::CellID, true>(memory_ptr, DataLayout::MLD_CELL_TO_CHILDREN);
auto mld_level_data_ptr =
layout.GetBlockPtr<util::MultiLevelPartition::LevelData, true>(
memory_ptr, DataLayout::MLD_LEVEL_DATA);
auto mld_partition_ptr =
layout.GetBlockPtr<util::PartitionID, true>(memory_ptr, DataLayout::MLD_PARTITION);
auto mld_chilren_ptr = layout.GetBlockPtr<util::CellID, true>(
memory_ptr, DataLayout::MLD_CELL_TO_CHILDREN);
io::FileReader reader(config.mld_partition_path, io::FileReader::VerifyFingerprint);
reader.ReadInto(mld_level_data_ptr);
reader.ReadInto(mld_partition_ptr, layout.GetBlockEntries(DataLayout::MLD_PARTITION));
reader.ReadInto(mld_chilren_ptr, layout.GetBlockEntries(DataLayout::MLD_CELL_TO_CHILDREN));
reader.ReadInto(mld_chilren_ptr,
layout.GetBlockEntries(DataLayout::MLD_CELL_TO_CHILDREN));
}
const auto mld_cell_storage_ptr =
+1 -2
View File
@@ -20,8 +20,7 @@ StorageConfig::StorageConfig(const boost::filesystem::path &base)
names_data_path{base.string() + ".names"}, properties_path{base.string() + ".properties"},
intersection_class_path{base.string() + ".icd"}, turn_lane_data_path{base.string() + ".tld"},
turn_lane_description_path{base.string() + ".tls"},
mld_partition_path{base.string() + ".partition"},
mld_storage_path{base.string() + ".cell"}
mld_partition_path{base.string() + ".partition"}, mld_storage_path{base.string() + ".cell"}
{
}