Fix shared memory encoding for node-ids

This commit is contained in:
Patrick Niklaus
2016-06-10 23:25:19 +02:00
parent 6bdfe68897
commit e9a0beb4e8
3 changed files with 28 additions and 31 deletions
+3 -3
View File
@@ -247,8 +247,8 @@ int Storage::Run()
coordinate_list_size);
// we'll read a list of OSM node IDs from the same data, so set the block size for the same
// number of items:
shared_layout_ptr->SetBlockSize<OSMNodeID>(SharedDataLayout::OSM_NODE_ID_LIST,
util::PackedVectorSize(coordinate_list_size));
shared_layout_ptr->SetBlockSize<std::uint64_t>(SharedDataLayout::OSM_NODE_ID_LIST,
util::PackedVector<OSMNodeID>::elements_to_blocks(coordinate_list_size));
// load geometries sizes
boost::filesystem::ifstream geometry_input_stream(config.geometries_path, std::ios::binary);
@@ -540,7 +540,7 @@ int Storage::Run()
// Loading list of coordinates
util::Coordinate *coordinates_ptr = shared_layout_ptr->GetBlockPtr<util::Coordinate, true>(
shared_memory_ptr, SharedDataLayout::COORDINATE_LIST);
OSMNodeID *osmnodeid_ptr = shared_layout_ptr->GetBlockPtr<OSMNodeID, true>(
std::uint64_t *osmnodeid_ptr = shared_layout_ptr->GetBlockPtr<std::uint64_t, true>(
shared_memory_ptr, SharedDataLayout::OSM_NODE_ID_LIST);
util::PackedVector<OSMNodeID, true> osmnodeid_list;
osmnodeid_list.reset(