2016-11-14 21:34:39 -05:00
|
|
|
#ifndef CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP
|
|
|
|
#define CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2017-01-09 15:40:33 -05:00
|
|
|
#include "engine/datafacade/algorithm_datafacade.hpp"
|
2017-01-18 07:44:17 -05:00
|
|
|
#include "engine/datafacade/contiguous_block_allocator.hpp"
|
2016-05-27 15:05:04 -04:00
|
|
|
#include "engine/datafacade/datafacade_base.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
|
2017-03-04 13:54:06 -05:00
|
|
|
#include "engine/algorithm.hpp"
|
2017-05-22 10:07:12 -04:00
|
|
|
#include "engine/approach.hpp"
|
2017-05-29 08:46:11 -04:00
|
|
|
#include "engine/geospatial_query.hpp"
|
2017-03-04 13:54:06 -05:00
|
|
|
|
2017-03-10 17:35:46 -05:00
|
|
|
#include "customizer/edge_based_graph.hpp"
|
|
|
|
|
2017-03-09 12:01:04 -05:00
|
|
|
#include "extractor/datasources.hpp"
|
2017-09-25 09:37:11 -04:00
|
|
|
#include "extractor/edge_based_node.hpp"
|
2017-06-19 09:27:46 -04:00
|
|
|
#include "extractor/intersection_bearings_container.hpp"
|
2018-02-09 13:32:09 -05:00
|
|
|
#include "extractor/maneuver_override.hpp"
|
2018-03-21 07:10:02 -04:00
|
|
|
#include "extractor/name_table.hpp"
|
2017-04-25 05:36:34 -04:00
|
|
|
#include "extractor/node_data_container.hpp"
|
2017-04-11 19:03:31 -04:00
|
|
|
#include "extractor/packed_osm_ids.hpp"
|
2016-03-21 18:34:59 -04:00
|
|
|
#include "extractor/profile_properties.hpp"
|
2017-03-09 17:45:27 -05:00
|
|
|
#include "extractor/segment_data_container.hpp"
|
2018-01-05 08:33:53 -05:00
|
|
|
#include "extractor/turn_lane_types.hpp"
|
2018-01-08 13:12:06 -05:00
|
|
|
|
|
|
|
#include "guidance/turn_bearing.hpp"
|
2018-01-05 08:33:53 -05:00
|
|
|
#include "guidance/turn_data_container.hpp"
|
2018-01-05 07:05:53 -05:00
|
|
|
#include "guidance/turn_instruction.hpp"
|
2017-03-04 13:54:06 -05:00
|
|
|
|
2017-04-02 19:02:57 -04:00
|
|
|
#include "contractor/query_graph.hpp"
|
|
|
|
|
2018-02-01 10:47:43 -05:00
|
|
|
#include "partitioner/cell_storage.hpp"
|
|
|
|
#include "partitioner/multi_level_partition.hpp"
|
2017-03-04 13:54:06 -05:00
|
|
|
|
2016-12-06 10:14:25 -05:00
|
|
|
#include "storage/shared_datatype.hpp"
|
2017-04-04 03:52:00 -04:00
|
|
|
#include "storage/shared_memory_ownership.hpp"
|
2016-03-01 16:30:31 -05:00
|
|
|
|
2016-12-06 15:30:46 -05:00
|
|
|
#include "util/exception.hpp"
|
|
|
|
#include "util/exception_utils.hpp"
|
2017-08-20 19:24:05 -04:00
|
|
|
#include "util/filtered_graph.hpp"
|
2017-03-04 13:54:06 -05:00
|
|
|
#include "util/guidance/bearing_class.hpp"
|
|
|
|
#include "util/guidance/entry_class.hpp"
|
|
|
|
#include "util/guidance/turn_lanes.hpp"
|
2016-12-06 15:30:46 -05:00
|
|
|
#include "util/log.hpp"
|
2016-10-28 17:45:05 -04:00
|
|
|
#include "util/packed_vector.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "util/range_table.hpp"
|
2016-04-26 07:27:40 -04:00
|
|
|
#include "util/rectangle.hpp"
|
2016-01-02 11:13:44 -05:00
|
|
|
#include "util/static_graph.hpp"
|
|
|
|
#include "util/static_rtree.hpp"
|
2016-05-10 02:37:45 -04:00
|
|
|
#include "util/typedefs.hpp"
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-10-07 19:52:47 -04:00
|
|
|
#include <boost/assert.hpp>
|
2015-12-09 16:34:22 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#include <algorithm>
|
2016-10-19 20:11:36 -04:00
|
|
|
#include <cstddef>
|
2016-04-12 09:00:08 -04:00
|
|
|
#include <iterator>
|
2015-02-26 04:11:33 -05:00
|
|
|
#include <limits>
|
2015-01-27 06:35:29 -05:00
|
|
|
#include <memory>
|
2016-02-05 08:58:06 -05:00
|
|
|
#include <string>
|
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace engine
|
|
|
|
{
|
|
|
|
namespace datafacade
|
|
|
|
{
|
|
|
|
|
2017-01-09 15:40:33 -05:00
|
|
|
template <typename AlgorithmT> class ContiguousInternalMemoryAlgorithmDataFacade;
|
|
|
|
|
|
|
|
template <>
|
2017-03-31 06:52:04 -04:00
|
|
|
class ContiguousInternalMemoryAlgorithmDataFacade<CH> : public datafacade::AlgorithmDataFacade<CH>
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
|
|
|
private:
|
2017-08-20 19:24:05 -04:00
|
|
|
using QueryGraph = util::FilteredGraphView<contractor::QueryGraphView>;
|
2017-01-09 15:40:33 -05:00
|
|
|
using GraphNode = QueryGraph::NodeArrayEntry;
|
|
|
|
using GraphEdge = QueryGraph::EdgeArrayEntry;
|
|
|
|
|
2017-04-02 19:02:57 -04:00
|
|
|
QueryGraph m_query_graph;
|
2017-01-09 15:40:33 -05:00
|
|
|
|
|
|
|
// allocator that keeps the allocation data
|
|
|
|
std::shared_ptr<ContiguousBlockAllocator> allocator;
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeGraphPointer(const storage::DataLayout &data_layout,
|
2017-08-20 19:24:05 -04:00
|
|
|
char *memory_block,
|
|
|
|
const std::size_t exclude_index)
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
auto graph_nodes_ptr =
|
|
|
|
data_layout.GetBlockPtr<GraphNode>(memory_block, "/ch/contracted_graph/node_array");
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto graph_edges_ptr =
|
|
|
|
data_layout.GetBlockPtr<GraphEdge>(memory_block, "/ch/contracted_graph/edge_array");
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto filter_block_id = "/ch/edge_filter/" + std::to_string(exclude_index);
|
2017-08-20 19:24:05 -04:00
|
|
|
|
2018-03-26 08:13:07 -04:00
|
|
|
auto edge_filter_ptr =
|
|
|
|
data_layout.GetBlockPtr<util::vector_view<bool>::Word>(memory_block, filter_block_id);
|
2017-08-20 19:24:05 -04:00
|
|
|
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<GraphNode> node_list(
|
2018-03-22 15:16:19 -04:00
|
|
|
graph_nodes_ptr, data_layout.GetBlockEntries("/ch/contracted_graph/node_array"));
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<GraphEdge> edge_list(
|
2018-03-22 15:16:19 -04:00
|
|
|
graph_edges_ptr, data_layout.GetBlockEntries("/ch/contracted_graph/edge_array"));
|
2017-08-20 19:24:05 -04:00
|
|
|
|
|
|
|
util::vector_view<bool> edge_filter(edge_filter_ptr,
|
2018-03-13 09:25:22 -04:00
|
|
|
data_layout.GetBlockEntries(filter_block_id));
|
2017-08-20 19:24:05 -04:00
|
|
|
m_query_graph = QueryGraph({node_list, edge_list}, edge_filter);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
|
|
ContiguousInternalMemoryAlgorithmDataFacade(
|
2017-08-20 19:24:05 -04:00
|
|
|
std::shared_ptr<ContiguousBlockAllocator> allocator_, std::size_t exclude_index)
|
2017-01-09 15:40:33 -05:00
|
|
|
: allocator(std::move(allocator_))
|
|
|
|
{
|
2017-08-20 19:24:05 -04:00
|
|
|
InitializeInternalPointers(allocator->GetLayout(), allocator->GetMemory(), exclude_index);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeInternalPointers(const storage::DataLayout &data_layout,
|
2017-08-20 19:24:05 -04:00
|
|
|
char *memory_block,
|
|
|
|
const std::size_t exclude_index)
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
2017-08-20 19:24:05 -04:00
|
|
|
InitializeGraphPointer(data_layout, memory_block, exclude_index);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// search graph access
|
2017-04-02 19:02:57 -04:00
|
|
|
unsigned GetNumberOfNodes() const override final { return m_query_graph.GetNumberOfNodes(); }
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2017-04-02 19:02:57 -04:00
|
|
|
unsigned GetNumberOfEdges() const override final { return m_query_graph.GetNumberOfEdges(); }
|
2017-01-09 15:40:33 -05:00
|
|
|
|
|
|
|
unsigned GetOutDegree(const NodeID n) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.GetOutDegree(n);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
2017-04-02 19:02:57 -04:00
|
|
|
NodeID GetTarget(const EdgeID e) const override final { return m_query_graph.GetTarget(e); }
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2017-04-02 19:02:57 -04:00
|
|
|
const EdgeData &GetEdgeData(const EdgeID e) const override final
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.GetEdgeData(e);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
EdgeRange GetAdjacentEdgeRange(const NodeID node) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.GetAdjacentEdgeRange(node);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
// searches for a specific edge
|
|
|
|
EdgeID FindEdge(const NodeID from, const NodeID to) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.FindEdge(from, to);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
EdgeID FindEdgeInEitherDirection(const NodeID from, const NodeID to) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.FindEdgeInEitherDirection(from, to);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
EdgeID
|
|
|
|
FindEdgeIndicateIfReverse(const NodeID from, const NodeID to, bool &result) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.FindEdgeIndicateIfReverse(from, to, result);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
EdgeID FindSmallestEdge(const NodeID from,
|
|
|
|
const NodeID to,
|
|
|
|
std::function<bool(EdgeData)> filter) const override final
|
|
|
|
{
|
2017-04-02 19:02:57 -04:00
|
|
|
return m_query_graph.FindSmallestEdge(from, to, filter);
|
2017-01-09 15:40:33 -05:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-11-10 19:56:56 -05:00
|
|
|
/**
|
|
|
|
* This base class implements the Datafacade interface for accessing
|
2016-11-14 21:34:39 -05:00
|
|
|
* data that's stored in a single large block of memory (RAM).
|
|
|
|
*
|
|
|
|
* In this case "internal memory" refers to RAM - as opposed to "external memory",
|
|
|
|
* which usually refers to disk.
|
2016-11-10 19:56:56 -05:00
|
|
|
*/
|
2017-01-09 15:40:33 -05:00
|
|
|
class ContiguousInternalMemoryDataFacadeBase : public BaseDataFacade
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-11-10 19:56:56 -05:00
|
|
|
private:
|
2016-01-28 10:28:44 -05:00
|
|
|
using super = BaseDataFacade;
|
2017-04-04 03:52:00 -04:00
|
|
|
using IndexBlock = util::RangeTable<16, storage::Ownership::View>::BlockT;
|
2016-05-03 05:48:33 -04:00
|
|
|
using RTreeLeaf = super::RTreeLeaf;
|
2017-04-02 19:58:06 -04:00
|
|
|
using SharedRTree = util::StaticRTree<RTreeLeaf, storage::Ownership::View>;
|
2016-01-28 10:28:44 -05:00
|
|
|
using SharedGeospatialQuery = GeospatialQuery<SharedRTree, BaseDataFacade>;
|
2016-05-03 05:48:33 -04:00
|
|
|
using RTreeNode = SharedRTree::TreeNode;
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2017-08-16 16:21:19 -04:00
|
|
|
extractor::ClassData exclude_mask;
|
2015-01-27 06:35:29 -05:00
|
|
|
std::string m_timestamp;
|
2016-05-06 19:53:11 -04:00
|
|
|
extractor::ProfileProperties *m_profile_properties;
|
2017-03-09 12:01:04 -05:00
|
|
|
extractor::Datasources *m_datasources;
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2017-01-09 15:40:33 -05:00
|
|
|
unsigned m_check_sum;
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<util::Coordinate> m_coordinate_list;
|
2017-04-10 16:15:25 -04:00
|
|
|
extractor::PackedOSMIDsView m_osmnodeid_list;
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<std::uint32_t> m_lane_description_offsets;
|
2018-01-05 08:33:53 -05:00
|
|
|
util::vector_view<extractor::TurnLaneType::Mask> m_lane_description_masks;
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<TurnPenalty> m_turn_weight_penalties;
|
|
|
|
util::vector_view<TurnPenalty> m_turn_duration_penalties;
|
2017-03-08 19:41:18 -05:00
|
|
|
extractor::SegmentDataView segment_data;
|
2017-04-25 05:36:34 -04:00
|
|
|
extractor::EdgeBasedNodeDataView edge_based_node_data;
|
2018-01-05 08:33:53 -05:00
|
|
|
guidance::TurnDataView turn_data;
|
2016-03-15 02:03:19 -04:00
|
|
|
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<char> m_datasource_name_data;
|
|
|
|
util::vector_view<std::size_t> m_datasource_name_offsets;
|
|
|
|
util::vector_view<std::size_t> m_datasource_name_lengths;
|
|
|
|
util::vector_view<util::guidance::LaneTupleIdPair> m_lane_tupel_id_pairs;
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2018-02-09 13:32:09 -05:00
|
|
|
util::vector_view<extractor::StorageManeuverOverride> m_maneuver_overrides;
|
|
|
|
util::vector_view<NodeID> m_maneuver_override_node_sequences;
|
|
|
|
|
2016-05-06 19:53:11 -04:00
|
|
|
std::unique_ptr<SharedRTree> m_static_rtree;
|
|
|
|
std::unique_ptr<SharedGeospatialQuery> m_geospatial_query;
|
2015-01-27 06:35:29 -05:00
|
|
|
boost::filesystem::path file_index_path;
|
|
|
|
|
2017-06-19 09:27:46 -04:00
|
|
|
extractor::IntersectionBearingsView intersection_bearings_view;
|
2016-08-17 03:49:19 -04:00
|
|
|
|
2018-03-21 07:10:02 -04:00
|
|
|
extractor::NameTableView m_name_table;
|
2016-04-26 07:27:40 -04:00
|
|
|
// the look-up table for entry classes. An entry class lists the possibility of entry for all
|
|
|
|
// available turns. Such a class id is stored with every edge.
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<util::guidance::EntryClass> m_entry_class_table;
|
2016-04-26 07:27:40 -04:00
|
|
|
|
2017-01-18 07:44:17 -05:00
|
|
|
// allocator that keeps the allocation data
|
2017-01-09 15:40:33 -05:00
|
|
|
std::shared_ptr<ContiguousBlockAllocator> allocator;
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeProfilePropertiesPointer(const storage::DataLayout &data_layout,
|
2017-08-14 17:24:33 -04:00
|
|
|
char *memory_block,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
2016-03-21 18:34:59 -04:00
|
|
|
{
|
2016-11-15 02:41:44 -05:00
|
|
|
m_profile_properties = data_layout.GetBlockPtr<extractor::ProfileProperties>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/properties");
|
2017-07-21 17:55:19 -04:00
|
|
|
|
2017-08-16 16:21:19 -04:00
|
|
|
exclude_mask = m_profile_properties->excludable_classes[exclude_index];
|
2016-03-21 18:34:59 -04:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeChecksumPointer(const storage::DataLayout &data_layout, char *memory_block)
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
m_check_sum = *data_layout.GetBlockPtr<unsigned>(memory_block, "/ch/checksum");
|
2017-01-09 15:40:33 -05:00
|
|
|
util::Log() << "set checksum: " << m_check_sum;
|
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeRTreePointers(const storage::DataLayout &data_layout, char *memory_block)
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-05-06 20:43:37 -04:00
|
|
|
BOOST_ASSERT_MSG(!m_coordinate_list.empty(), "coordinates must be loaded before r-tree");
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-10-24 23:27:56 -04:00
|
|
|
const auto file_index_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockPtr<char>(memory_block, "/common/rtree/file_index_path");
|
2016-10-06 19:51:34 -04:00
|
|
|
file_index_path = boost::filesystem::path(file_index_ptr);
|
|
|
|
if (!boost::filesystem::exists(file_index_path))
|
|
|
|
{
|
2016-12-06 15:30:46 -05:00
|
|
|
util::Log(logDEBUG) << "Leaf file name " << file_index_path.string();
|
2016-10-12 15:26:59 -04:00
|
|
|
throw util::exception("Could not load " + file_index_path.string() +
|
2016-12-06 15:30:46 -05:00
|
|
|
"Is any data loaded into shared memory?" + SOURCE_REF);
|
2016-10-06 19:51:34 -04:00
|
|
|
}
|
|
|
|
|
2018-03-21 13:09:59 -04:00
|
|
|
const auto rtree_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockPtr<RTreeNode>(memory_block, "/common/rtree/search_tree");
|
2018-03-21 13:09:59 -04:00
|
|
|
util::vector_view<RTreeNode> search_tree(
|
2018-03-22 15:16:19 -04:00
|
|
|
rtree_ptr, data_layout.GetBlockEntries("/common/rtree/search_tree"));
|
2018-03-21 13:09:59 -04:00
|
|
|
|
|
|
|
const auto rtree_levelstarts_ptr = data_layout.GetBlockPtr<std::uint64_t>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/rtree/search_tree_level_starts");
|
2018-03-21 13:09:59 -04:00
|
|
|
util::vector_view<std::uint64_t> rtree_level_starts(
|
|
|
|
rtree_levelstarts_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/rtree/search_tree_level_starts"));
|
2018-03-21 13:09:59 -04:00
|
|
|
|
|
|
|
m_static_rtree.reset(new SharedRTree{std::move(search_tree),
|
|
|
|
std::move(rtree_level_starts),
|
|
|
|
file_index_path,
|
|
|
|
m_coordinate_list});
|
2016-01-05 06:04:04 -05:00
|
|
|
m_geospatial_query.reset(
|
2016-05-06 19:53:11 -04:00
|
|
|
new SharedGeospatialQuery(*m_static_rtree, m_coordinate_list, *this));
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeNodeInformationPointers(const storage::DataLayout &layout, char *memory_ptr)
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2017-04-21 05:23:49 -04:00
|
|
|
const auto coordinate_list_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
layout.GetBlockPtr<util::Coordinate>(memory_ptr, "/common/coordinates");
|
|
|
|
m_coordinate_list.reset(coordinate_list_ptr, layout.GetBlockEntries("/common/coordinates"));
|
2017-04-21 05:23:49 -04:00
|
|
|
|
|
|
|
const auto osmnodeid_ptr = layout.GetBlockPtr<extractor::PackedOSMIDsView::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_ptr, "/common/osm_node_ids/packed");
|
2017-04-21 05:23:49 -04:00
|
|
|
m_osmnodeid_list = extractor::PackedOSMIDsView(
|
|
|
|
util::vector_view<extractor::PackedOSMIDsView::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
osmnodeid_ptr, layout.GetBlockEntries("/common/osm_node_ids/packed")),
|
2017-04-21 05:23:49 -04:00
|
|
|
// We (ab)use the number of coordinates here because we know we have the same amount of
|
|
|
|
// ids
|
2018-03-22 15:16:19 -04:00
|
|
|
layout.GetBlockEntries("/common/coordinates"));
|
2017-04-01 21:25:55 -04:00
|
|
|
}
|
2016-05-18 16:09:14 -04:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeEdgeBasedNodeDataInformationPointers(const storage::DataLayout &layout,
|
2017-04-25 05:36:34 -04:00
|
|
|
char *memory_ptr)
|
2017-04-01 21:25:55 -04:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
const auto edge_based_node_list_ptr =
|
|
|
|
layout.GetBlockPtr<extractor::EdgeBasedNode>(memory_ptr, "/common/ebg_node_data/nodes");
|
2017-09-25 09:37:11 -04:00
|
|
|
util::vector_view<extractor::EdgeBasedNode> edge_based_node_data_list(
|
2018-03-22 15:16:19 -04:00
|
|
|
edge_based_node_list_ptr, layout.GetBlockEntries("/common/ebg_node_data/nodes"));
|
2017-09-25 09:37:11 -04:00
|
|
|
|
|
|
|
const auto annotation_data_list_ptr =
|
|
|
|
layout.GetBlockPtr<extractor::NodeBasedEdgeAnnotation>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_ptr, "/common/ebg_node_data/annotations");
|
2017-09-25 09:37:11 -04:00
|
|
|
util::vector_view<extractor::NodeBasedEdgeAnnotation> annotation_data(
|
2018-03-22 15:16:19 -04:00
|
|
|
annotation_data_list_ptr, layout.GetBlockEntries("/common/ebg_node_data/annotations"));
|
2017-09-25 09:37:11 -04:00
|
|
|
|
|
|
|
edge_based_node_data = extractor::EdgeBasedNodeDataView(
|
|
|
|
std::move(edge_based_node_data_list), std::move(annotation_data));
|
2017-04-25 05:36:34 -04:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeEdgeInformationPointers(const storage::DataLayout &layout, char *memory_ptr)
|
2017-04-25 05:36:34 -04:00
|
|
|
{
|
2017-04-01 21:25:55 -04:00
|
|
|
const auto lane_data_id_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
layout.GetBlockPtr<LaneDataID>(memory_ptr, "/common/turn_data/lane_data_ids");
|
2017-04-01 21:25:55 -04:00
|
|
|
util::vector_view<LaneDataID> lane_data_ids(
|
2018-03-22 15:16:19 -04:00
|
|
|
lane_data_id_ptr, layout.GetBlockEntries("/common/turn_data/lane_data_ids"));
|
2016-06-15 08:38:24 -04:00
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
const auto turn_instruction_list_ptr = layout.GetBlockPtr<guidance::TurnInstruction>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_ptr, "/common/turn_data/turn_instructions");
|
2018-01-05 08:33:53 -05:00
|
|
|
util::vector_view<guidance::TurnInstruction> turn_instructions(
|
2018-03-13 09:25:22 -04:00
|
|
|
turn_instruction_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
layout.GetBlockEntries("/common/turn_data/turn_instructions"));
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-11-15 02:41:44 -05:00
|
|
|
const auto entry_class_id_list_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
layout.GetBlockPtr<EntryClassID>(memory_ptr, "/common/turn_data/entry_class_ids");
|
2017-04-01 21:25:55 -04:00
|
|
|
util::vector_view<EntryClassID> entry_class_ids(
|
2018-03-22 15:16:19 -04:00
|
|
|
entry_class_id_list_ptr, layout.GetBlockEntries("/common/turn_data/entry_class_ids"));
|
2017-04-01 21:25:55 -04:00
|
|
|
|
2018-01-08 13:12:06 -05:00
|
|
|
const auto pre_turn_bearing_ptr = layout.GetBlockPtr<guidance::TurnBearing>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_ptr, "/common/turn_data/pre_turn_bearings");
|
2018-01-08 13:12:06 -05:00
|
|
|
util::vector_view<guidance::TurnBearing> pre_turn_bearings(
|
2018-03-22 15:16:19 -04:00
|
|
|
pre_turn_bearing_ptr, layout.GetBlockEntries("/common/turn_data/pre_turn_bearings"));
|
2017-04-01 21:25:55 -04:00
|
|
|
|
2018-01-08 13:12:06 -05:00
|
|
|
const auto post_turn_bearing_ptr = layout.GetBlockPtr<guidance::TurnBearing>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_ptr, "/common/turn_data/post_turn_bearings");
|
2018-01-08 13:12:06 -05:00
|
|
|
util::vector_view<guidance::TurnBearing> post_turn_bearings(
|
2018-03-22 15:16:19 -04:00
|
|
|
post_turn_bearing_ptr, layout.GetBlockEntries("/common/turn_data/post_turn_bearings"));
|
2017-04-01 21:25:55 -04:00
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
turn_data = guidance::TurnDataView(std::move(turn_instructions),
|
|
|
|
std::move(lane_data_ids),
|
|
|
|
std::move(entry_class_ids),
|
|
|
|
std::move(pre_turn_bearings),
|
|
|
|
std::move(post_turn_bearings));
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeNamePointers(const storage::DataLayout &data_layout, char *memory_block)
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2018-03-21 07:10:02 -04:00
|
|
|
const auto name_blocks_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::NameTableView::IndexedData::BlockReference>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/names/blocks");
|
2018-03-21 07:10:02 -04:00
|
|
|
const auto name_values_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::NameTableView::IndexedData::ValueType>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/names/values");
|
2018-03-21 07:10:02 -04:00
|
|
|
|
|
|
|
util::vector_view<extractor::NameTableView::IndexedData::BlockReference> blocks(
|
2018-03-22 15:16:19 -04:00
|
|
|
name_blocks_ptr, data_layout.GetBlockEntries("/common/names/blocks"));
|
2018-03-21 07:10:02 -04:00
|
|
|
util::vector_view<extractor::NameTableView::IndexedData::ValueType> values(
|
2018-03-22 15:16:19 -04:00
|
|
|
name_values_ptr, data_layout.GetBlockEntries("/common/names/values"));
|
2018-03-21 07:10:02 -04:00
|
|
|
|
|
|
|
extractor::NameTableView::IndexedData index_data_view{std::move(blocks), std::move(values)};
|
|
|
|
m_name_table = extractor::NameTableView{std::move(index_data_view)};
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeTurnLaneDescriptionsPointers(const storage::DataLayout &data_layout,
|
2016-11-15 02:41:44 -05:00
|
|
|
char *memory_block)
|
2016-06-15 08:38:24 -04:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
auto offsets_ptr =
|
|
|
|
data_layout.GetBlockPtr<std::uint32_t>(memory_block, "/common/turn_lanes/offsets");
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<std::uint32_t> offsets(
|
2018-03-22 15:16:19 -04:00
|
|
|
offsets_ptr, data_layout.GetBlockEntries("/common/turn_lanes/offsets"));
|
2016-06-21 04:41:08 -04:00
|
|
|
m_lane_description_offsets = std::move(offsets);
|
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
auto masks_ptr = data_layout.GetBlockPtr<extractor::TurnLaneType::Mask>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/turn_lanes/masks");
|
2016-06-21 04:41:08 -04:00
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
util::vector_view<extractor::TurnLaneType::Mask> masks(
|
2018-03-22 15:16:19 -04:00
|
|
|
masks_ptr, data_layout.GetBlockEntries("/common/turn_lanes/masks"));
|
2016-06-21 04:41:08 -04:00
|
|
|
m_lane_description_masks = std::move(masks);
|
2017-04-01 21:25:55 -04:00
|
|
|
|
|
|
|
const auto lane_tupel_id_pair_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockPtr<util::guidance::LaneTupleIdPair>(memory_block,
|
|
|
|
"/common/turn_lanes/data");
|
2017-04-01 21:25:55 -04:00
|
|
|
util::vector_view<util::guidance::LaneTupleIdPair> lane_tupel_id_pair(
|
2018-03-22 15:16:19 -04:00
|
|
|
lane_tupel_id_pair_ptr, data_layout.GetBlockEntries("/common/turn_lanes/data"));
|
2017-04-01 21:25:55 -04:00
|
|
|
m_lane_tupel_id_pairs = std::move(lane_tupel_id_pair);
|
2016-06-15 08:38:24 -04:00
|
|
|
}
|
2016-06-21 04:41:08 -04:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeTurnPenalties(const storage::DataLayout &data_layout, char *memory_block)
|
2016-05-12 12:50:10 -04:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
auto turn_weight_penalties_ptr =
|
|
|
|
data_layout.GetBlockPtr<TurnPenalty>(memory_block, "/common/turn_penalty/weight");
|
2017-04-02 15:24:11 -04:00
|
|
|
m_turn_weight_penalties = util::vector_view<TurnPenalty>(
|
2018-03-22 15:16:19 -04:00
|
|
|
turn_weight_penalties_ptr, data_layout.GetBlockEntries("/common/turn_penalty/weight"));
|
|
|
|
auto turn_duration_penalties_ptr =
|
|
|
|
data_layout.GetBlockPtr<TurnPenalty>(memory_block, "/common/turn_penalty/duration");
|
2017-04-02 15:24:11 -04:00
|
|
|
m_turn_duration_penalties = util::vector_view<TurnPenalty>(
|
2017-03-31 08:40:17 -04:00
|
|
|
turn_duration_penalties_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/turn_penalty/duration"));
|
2016-05-12 12:50:10 -04:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeGeometryPointers(const storage::DataLayout &data_layout, char *memory_block)
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-10-24 23:27:56 -04:00
|
|
|
auto geometries_index_ptr =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockPtr<unsigned>(memory_block, "/common/segment_data/index");
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<unsigned> geometry_begin_indices(
|
2018-03-22 15:16:19 -04:00
|
|
|
geometries_index_ptr, data_layout.GetBlockEntries("/common/segment_data/index"));
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto num_entries = data_layout.GetBlockEntries("/common/segment_data/nodes");
|
|
|
|
auto geometries_node_list_ptr =
|
|
|
|
data_layout.GetBlockPtr<NodeID>(memory_block, "/common/segment_data/nodes");
|
2017-05-10 19:04:09 -04:00
|
|
|
util::vector_view<NodeID> geometry_node_list(geometries_node_list_ptr, num_entries);
|
|
|
|
|
|
|
|
auto geometries_fwd_weight_list_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::SegmentDataView::SegmentWeightVector::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/forward_weights/packed");
|
2017-05-10 19:04:09 -04:00
|
|
|
extractor::SegmentDataView::SegmentWeightVector geometry_fwd_weight_list(
|
|
|
|
util::vector_view<extractor::SegmentDataView::SegmentWeightVector::block_type>(
|
|
|
|
geometries_fwd_weight_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/forward_weights/packed")),
|
2017-05-10 19:04:09 -04:00
|
|
|
num_entries);
|
|
|
|
|
|
|
|
auto geometries_rev_weight_list_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::SegmentDataView::SegmentWeightVector::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/reverse_weights/packed");
|
2017-05-10 19:04:09 -04:00
|
|
|
extractor::SegmentDataView::SegmentWeightVector geometry_rev_weight_list(
|
|
|
|
util::vector_view<extractor::SegmentDataView::SegmentWeightVector::block_type>(
|
|
|
|
geometries_rev_weight_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/reverse_weights/packed")),
|
2017-05-10 19:04:09 -04:00
|
|
|
num_entries);
|
|
|
|
|
|
|
|
auto geometries_fwd_duration_list_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::SegmentDataView::SegmentDurationVector::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/forward_durations/packed");
|
2017-05-10 19:04:09 -04:00
|
|
|
extractor::SegmentDataView::SegmentDurationVector geometry_fwd_duration_list(
|
|
|
|
util::vector_view<extractor::SegmentDataView::SegmentDurationVector::block_type>(
|
|
|
|
geometries_fwd_duration_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/forward_durations/packed")),
|
2017-05-10 19:04:09 -04:00
|
|
|
num_entries);
|
|
|
|
|
|
|
|
auto geometries_rev_duration_list_ptr =
|
|
|
|
data_layout.GetBlockPtr<extractor::SegmentDataView::SegmentDurationVector::block_type>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/reverse_durations/packed");
|
2017-05-10 19:04:09 -04:00
|
|
|
extractor::SegmentDataView::SegmentDurationVector geometry_rev_duration_list(
|
|
|
|
util::vector_view<extractor::SegmentDataView::SegmentDurationVector::block_type>(
|
|
|
|
geometries_rev_duration_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/reverse_durations/packed")),
|
2017-05-10 19:04:09 -04:00
|
|
|
num_entries);
|
2017-03-08 19:41:18 -05:00
|
|
|
|
2017-07-27 13:24:34 -04:00
|
|
|
auto geometries_fwd_datasources_list_ptr = data_layout.GetBlockPtr<DatasourceID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/forward_data_sources");
|
2017-07-27 13:24:34 -04:00
|
|
|
util::vector_view<DatasourceID> geometry_fwd_datasources_list(
|
|
|
|
geometries_fwd_datasources_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/forward_data_sources"));
|
2017-07-27 13:24:34 -04:00
|
|
|
|
|
|
|
auto geometries_rev_datasources_list_ptr = data_layout.GetBlockPtr<DatasourceID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/segment_data/reverse_data_sources");
|
2017-07-27 13:24:34 -04:00
|
|
|
util::vector_view<DatasourceID> geometry_rev_datasources_list(
|
|
|
|
geometries_rev_datasources_list_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/segment_data/reverse_data_sources"));
|
2017-03-09 12:01:04 -05:00
|
|
|
|
2017-03-08 19:41:18 -05:00
|
|
|
segment_data = extractor::SegmentDataView{std::move(geometry_begin_indices),
|
|
|
|
std::move(geometry_node_list),
|
|
|
|
std::move(geometry_fwd_weight_list),
|
|
|
|
std::move(geometry_rev_weight_list),
|
|
|
|
std::move(geometry_fwd_duration_list),
|
2017-03-09 12:01:04 -05:00
|
|
|
std::move(geometry_rev_duration_list),
|
2017-07-27 13:24:34 -04:00
|
|
|
std::move(geometry_fwd_datasources_list),
|
|
|
|
std::move(geometry_rev_datasources_list)};
|
2017-03-08 19:41:18 -05:00
|
|
|
|
2017-03-09 12:01:04 -05:00
|
|
|
m_datasources = data_layout.GetBlockPtr<extractor::Datasources>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/data_sources_names");
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeIntersectionClassPointers(const storage::DataLayout &data_layout,
|
|
|
|
char *memory_block)
|
2016-04-26 07:27:40 -04:00
|
|
|
{
|
2016-11-15 02:41:44 -05:00
|
|
|
auto bearing_class_id_ptr = data_layout.GetBlockPtr<BearingClassID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/intersection_bearings/node_to_class_id");
|
2017-06-19 09:27:46 -04:00
|
|
|
util::vector_view<BearingClassID> bearing_class_id(
|
2018-03-13 09:25:22 -04:00
|
|
|
bearing_class_id_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/intersection_bearings/node_to_class_id"));
|
2016-04-26 07:27:40 -04:00
|
|
|
|
2017-06-19 09:27:46 -04:00
|
|
|
auto bearing_values_ptr = data_layout.GetBlockPtr<DiscreteBearing>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/intersection_bearings/bearing_values");
|
2017-06-19 09:27:46 -04:00
|
|
|
util::vector_view<DiscreteBearing> bearing_values(
|
2018-03-22 15:16:19 -04:00
|
|
|
bearing_values_ptr,
|
|
|
|
data_layout.GetBlockEntries("/common/intersection_bearings/bearing_values"));
|
2016-05-10 02:37:45 -04:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto offsets_ptr = data_layout.GetBlockPtr<unsigned>(
|
|
|
|
memory_block, "/common/intersection_bearings/class_id_to_ranges/block_offsets");
|
|
|
|
auto blocks_ptr = data_layout.GetBlockPtr<IndexBlock>(
|
|
|
|
memory_block, "/common/intersection_bearings/class_id_to_ranges/diff_blocks");
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<unsigned> bearing_offsets(
|
2018-03-22 15:16:19 -04:00
|
|
|
offsets_ptr,
|
|
|
|
data_layout.GetBlockEntries(
|
|
|
|
"/common/intersection_bearings/class_id_to_ranges/block_offsets"));
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<IndexBlock> bearing_blocks(
|
2018-03-22 15:16:19 -04:00
|
|
|
blocks_ptr,
|
|
|
|
data_layout.GetBlockEntries(
|
|
|
|
"/common/intersection_bearings/class_id_to_ranges/diff_blocks"));
|
2016-05-10 02:37:45 -04:00
|
|
|
|
2017-06-19 09:27:46 -04:00
|
|
|
util::RangeTable<16, storage::Ownership::View> bearing_range_table(
|
|
|
|
bearing_offsets, bearing_blocks, static_cast<unsigned>(bearing_values.size()));
|
|
|
|
|
|
|
|
intersection_bearings_view = extractor::IntersectionBearingsView{
|
|
|
|
std::move(bearing_values), std::move(bearing_class_id), std::move(bearing_range_table)};
|
2016-04-26 07:27:40 -04:00
|
|
|
|
2016-11-15 02:41:44 -05:00
|
|
|
auto entry_class_ptr = data_layout.GetBlockPtr<util::guidance::EntryClass>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/entry_classes");
|
2017-06-19 09:27:46 -04:00
|
|
|
util::vector_view<util::guidance::EntryClass> entry_class_table(
|
2018-03-22 15:16:19 -04:00
|
|
|
entry_class_ptr, data_layout.GetBlockEntries("/common/entry_classes"));
|
2016-04-26 07:27:40 -04:00
|
|
|
m_entry_class_table = std::move(entry_class_table);
|
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeManeuverOverridePointers(const storage::DataLayout &data_layout,
|
|
|
|
char *memory_block)
|
2018-02-09 13:32:09 -05:00
|
|
|
{
|
|
|
|
auto maneuver_overrides_ptr = data_layout.GetBlockPtr<extractor::StorageManeuverOverride>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/maneuver_overrides/overrides");
|
2018-02-09 13:32:09 -05:00
|
|
|
m_maneuver_overrides = util::vector_view<extractor::StorageManeuverOverride>(
|
|
|
|
maneuver_overrides_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/maneuver_overrides/overrides"));
|
2018-02-09 13:32:09 -05:00
|
|
|
|
|
|
|
auto maneuver_override_node_sequences_ptr = data_layout.GetBlockPtr<NodeID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/common/maneuver_overrides/node_sequences");
|
2018-02-09 13:32:09 -05:00
|
|
|
m_maneuver_override_node_sequences = util::vector_view<NodeID>(
|
|
|
|
maneuver_override_node_sequences_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/common/maneuver_overrides/node_sequences"));
|
2018-02-09 13:32:09 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeInternalPointers(const storage::DataLayout &data_layout,
|
2017-08-14 17:24:33 -04:00
|
|
|
char *memory_block,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-11-15 02:41:44 -05:00
|
|
|
InitializeChecksumPointer(data_layout, memory_block);
|
2017-04-01 21:25:55 -04:00
|
|
|
InitializeNodeInformationPointers(data_layout, memory_block);
|
2017-04-25 05:36:34 -04:00
|
|
|
InitializeEdgeBasedNodeDataInformationPointers(data_layout, memory_block);
|
2017-04-01 21:25:55 -04:00
|
|
|
InitializeEdgeInformationPointers(data_layout, memory_block);
|
2016-05-12 12:50:10 -04:00
|
|
|
InitializeTurnPenalties(data_layout, memory_block);
|
2016-11-15 02:41:44 -05:00
|
|
|
InitializeGeometryPointers(data_layout, memory_block);
|
|
|
|
InitializeNamePointers(data_layout, memory_block);
|
|
|
|
InitializeTurnLaneDescriptionsPointers(data_layout, memory_block);
|
2017-08-16 16:21:19 -04:00
|
|
|
InitializeProfilePropertiesPointer(data_layout, memory_block, exclude_index);
|
2016-11-15 02:41:44 -05:00
|
|
|
InitializeRTreePointers(data_layout, memory_block);
|
|
|
|
InitializeIntersectionClassPointers(data_layout, memory_block);
|
2018-02-09 13:32:09 -05:00
|
|
|
InitializeManeuverOverridePointers(data_layout, memory_block);
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2017-01-18 07:44:17 -05:00
|
|
|
public:
|
|
|
|
// allows switching between process_memory/shared_memory datafacade, based on the type of
|
|
|
|
// allocator
|
2017-08-14 17:24:33 -04:00
|
|
|
ContiguousInternalMemoryDataFacadeBase(std::shared_ptr<ContiguousBlockAllocator> allocator_,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
2017-01-18 07:44:17 -05:00
|
|
|
: allocator(std::move(allocator_))
|
|
|
|
{
|
2017-08-16 16:21:19 -04:00
|
|
|
InitializeInternalPointers(allocator->GetLayout(), allocator->GetMemory(), exclude_index);
|
2017-01-18 07:44:17 -05:00
|
|
|
}
|
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
// node and edge information access
|
2016-02-23 15:23:13 -05:00
|
|
|
util::Coordinate GetCoordinateOfNode(const NodeID id) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-05-06 20:43:37 -04:00
|
|
|
return m_coordinate_list[id];
|
2016-03-14 11:25:39 -04:00
|
|
|
}
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
OSMNodeID GetOSMNodeIDOfNode(const NodeID id) const override final
|
2016-05-18 16:09:14 -04:00
|
|
|
{
|
2017-04-21 05:23:49 -04:00
|
|
|
return m_osmnodeid_list[id];
|
2016-05-18 16:09:14 -04:00
|
|
|
}
|
|
|
|
|
2017-04-25 05:36:34 -04:00
|
|
|
std::vector<NodeID> GetUncompressedForwardGeometry(const EdgeID id) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
|
|
|
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetForwardGeometry(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<NodeID>{range.begin(), range.end()};
|
2016-01-29 20:52:20 -05:00
|
|
|
}
|
|
|
|
|
2016-07-22 12:23:54 -04:00
|
|
|
virtual std::vector<NodeID> GetUncompressedReverseGeometry(const EdgeID id) const override final
|
2016-01-29 20:52:20 -05:00
|
|
|
{
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetReverseGeometry(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<NodeID>{range.begin(), range.end()};
|
2016-07-22 12:23:54 -04:00
|
|
|
}
|
|
|
|
|
2016-05-12 12:50:10 -04:00
|
|
|
virtual std::vector<EdgeWeight>
|
|
|
|
GetUncompressedForwardDurations(const EdgeID id) const override final
|
|
|
|
{
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetForwardDurations(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<EdgeWeight>{range.begin(), range.end()};
|
2016-05-12 12:50:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual std::vector<EdgeWeight>
|
|
|
|
GetUncompressedReverseDurations(const EdgeID id) const override final
|
|
|
|
{
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetReverseDurations(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<EdgeWeight>{range.begin(), range.end()};
|
2016-05-12 12:50:10 -04:00
|
|
|
}
|
|
|
|
|
2016-07-22 12:23:54 -04:00
|
|
|
virtual std::vector<EdgeWeight>
|
|
|
|
GetUncompressedForwardWeights(const EdgeID id) const override final
|
|
|
|
{
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetForwardWeights(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<EdgeWeight>{range.begin(), range.end()};
|
2016-07-22 12:23:54 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual std::vector<EdgeWeight>
|
|
|
|
GetUncompressedReverseWeights(const EdgeID id) const override final
|
|
|
|
{
|
2017-03-08 19:41:18 -05:00
|
|
|
auto range = segment_data.GetReverseWeights(id);
|
2017-03-09 17:45:27 -05:00
|
|
|
return std::vector<EdgeWeight>{range.begin(), range.end()};
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2017-03-09 12:01:04 -05:00
|
|
|
// Returns the data source ids that were used to supply the edge
|
|
|
|
// weights.
|
|
|
|
virtual std::vector<DatasourceID>
|
|
|
|
GetUncompressedForwardDatasources(const EdgeID id) const override final
|
|
|
|
{
|
|
|
|
auto range = segment_data.GetForwardDatasources(id);
|
|
|
|
return std::vector<DatasourceID>{range.begin(), range.end()};
|
|
|
|
}
|
|
|
|
|
|
|
|
// Returns the data source ids that were used to supply the edge
|
|
|
|
// weights.
|
|
|
|
virtual std::vector<DatasourceID>
|
|
|
|
GetUncompressedReverseDatasources(const EdgeID id) const override final
|
|
|
|
{
|
|
|
|
auto range = segment_data.GetReverseDatasources(id);
|
|
|
|
return std::vector<DatasourceID>{range.begin(), range.end()};
|
|
|
|
}
|
|
|
|
|
2016-05-12 12:50:10 -04:00
|
|
|
virtual TurnPenalty GetWeightPenaltyForEdgeID(const unsigned id) const override final
|
|
|
|
{
|
|
|
|
BOOST_ASSERT(m_turn_weight_penalties.size() > id);
|
|
|
|
return m_turn_weight_penalties[id];
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual TurnPenalty GetDurationPenaltyForEdgeID(const unsigned id) const override final
|
|
|
|
{
|
|
|
|
BOOST_ASSERT(m_turn_duration_penalties.size() > id);
|
|
|
|
return m_turn_duration_penalties[id];
|
|
|
|
}
|
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
osrm::guidance::TurnInstruction
|
2017-04-25 05:36:34 -04:00
|
|
|
GetTurnInstructionForEdgeID(const EdgeID id) const override final
|
2015-02-05 08:58:07 -05:00
|
|
|
{
|
2017-04-25 05:36:34 -04:00
|
|
|
return turn_data.GetTurnInstruction(id);
|
2015-02-05 08:58:07 -05:00
|
|
|
}
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-02-23 15:23:13 -05:00
|
|
|
std::vector<RTreeLeaf> GetEdgesInBox(const util::Coordinate south_west,
|
2016-05-06 20:56:08 -04:00
|
|
|
const util::Coordinate north_east) const override final
|
2016-02-16 13:51:04 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-05-27 15:05:04 -04:00
|
|
|
const util::RectangleInt2D bbox{
|
|
|
|
south_west.lon, north_east.lon, south_west.lat, north_east.lat};
|
2016-02-16 13:51:04 -05:00
|
|
|
return m_geospatial_query->Search(bbox);
|
|
|
|
}
|
|
|
|
|
2016-02-20 22:27:26 -05:00
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodesInRange(const util::Coordinate input_coordinate,
|
2017-05-23 06:23:22 -04:00
|
|
|
const float max_distance,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2016-02-20 22:27:26 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-02-20 22:27:26 -05:00
|
|
|
|
2017-05-29 08:46:11 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodesInRange(
|
|
|
|
input_coordinate, max_distance, approach);
|
2016-02-20 22:27:26 -05:00
|
|
|
}
|
|
|
|
|
2015-12-09 16:34:22 -05:00
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodesInRange(const util::Coordinate input_coordinate,
|
2015-12-03 14:04:23 -05:00
|
|
|
const float max_distance,
|
2016-02-20 22:27:26 -05:00
|
|
|
const int bearing,
|
2017-05-23 06:23:22 -04:00
|
|
|
const int bearing_range,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-05-27 15:05:04 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodesInRange(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, max_distance, bearing, bearing_range, approach);
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2016-02-22 18:44:35 -05:00
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodes(const util::Coordinate input_coordinate,
|
2017-05-23 06:23:22 -04:00
|
|
|
const unsigned max_results,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2016-02-22 18:44:35 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-02-22 18:44:35 -05:00
|
|
|
|
2017-05-23 06:23:22 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodes(input_coordinate, max_results, approach);
|
2016-02-22 18:44:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodes(const util::Coordinate input_coordinate,
|
2016-02-22 18:44:35 -05:00
|
|
|
const unsigned max_results,
|
2017-05-23 06:23:22 -04:00
|
|
|
const double max_distance,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2016-02-22 18:44:35 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-02-22 18:44:35 -05:00
|
|
|
|
2017-05-29 08:46:11 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodes(
|
|
|
|
input_coordinate, max_results, max_distance, approach);
|
2016-02-22 18:44:35 -05:00
|
|
|
}
|
|
|
|
|
2015-12-09 16:34:22 -05:00
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodes(const util::Coordinate input_coordinate,
|
2015-12-03 14:04:23 -05:00
|
|
|
const unsigned max_results,
|
2016-02-22 18:44:35 -05:00
|
|
|
const int bearing,
|
2017-05-23 06:23:22 -04:00
|
|
|
const int bearing_range,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-05-27 15:05:04 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodes(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, max_results, bearing, bearing_range, approach);
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2016-02-22 18:44:35 -05:00
|
|
|
std::vector<PhantomNodeWithDistance>
|
2016-02-23 15:23:13 -05:00
|
|
|
NearestPhantomNodes(const util::Coordinate input_coordinate,
|
2016-02-22 18:44:35 -05:00
|
|
|
const unsigned max_results,
|
|
|
|
const double max_distance,
|
|
|
|
const int bearing,
|
2017-05-23 06:23:22 -04:00
|
|
|
const int bearing_range,
|
2017-05-29 10:13:15 -04:00
|
|
|
const Approach approach) const override final
|
2016-02-22 18:44:35 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-02-22 18:44:35 -05:00
|
|
|
|
2016-05-27 15:05:04 -04:00
|
|
|
return m_geospatial_query->NearestPhantomNodes(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, max_results, max_distance, bearing, bearing_range, approach);
|
2016-02-22 18:44:35 -05:00
|
|
|
}
|
|
|
|
|
2017-05-29 10:13:15 -04:00
|
|
|
std::pair<PhantomNode, PhantomNode>
|
|
|
|
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
|
|
|
const Approach approach) const override final
|
2016-01-28 10:28:44 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-01-28 10:28:44 -05:00
|
|
|
|
|
|
|
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
2017-05-22 10:07:12 -04:00
|
|
|
input_coordinate, approach);
|
2016-01-28 10:28:44 -05:00
|
|
|
}
|
|
|
|
|
2017-05-29 10:13:15 -04:00
|
|
|
std::pair<PhantomNode, PhantomNode>
|
|
|
|
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
|
|
|
const double max_distance,
|
|
|
|
const Approach approach) const override final
|
2016-01-28 10:28:44 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-01-28 10:28:44 -05:00
|
|
|
|
|
|
|
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, max_distance, approach);
|
2016-01-28 10:28:44 -05:00
|
|
|
}
|
|
|
|
|
2017-05-29 10:13:15 -04:00
|
|
|
std::pair<PhantomNode, PhantomNode>
|
|
|
|
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
|
|
|
const double max_distance,
|
|
|
|
const int bearing,
|
|
|
|
const int bearing_range,
|
|
|
|
const Approach approach) const override final
|
2016-01-28 10:28:44 -05:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2016-01-28 10:28:44 -05:00
|
|
|
|
|
|
|
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, max_distance, bearing, bearing_range, approach);
|
2016-01-28 10:28:44 -05:00
|
|
|
}
|
|
|
|
|
2017-05-29 10:13:15 -04:00
|
|
|
std::pair<PhantomNode, PhantomNode>
|
|
|
|
NearestPhantomNodeWithAlternativeFromBigComponent(const util::Coordinate input_coordinate,
|
|
|
|
const int bearing,
|
|
|
|
const int bearing_range,
|
|
|
|
const Approach approach) const override final
|
2014-09-23 12:46:14 -04:00
|
|
|
{
|
2016-05-06 19:53:11 -04:00
|
|
|
BOOST_ASSERT(m_geospatial_query.get());
|
2014-09-23 12:46:14 -04:00
|
|
|
|
2016-01-05 06:04:04 -05:00
|
|
|
return m_geospatial_query->NearestPhantomNodeWithAlternativeFromBigComponent(
|
2017-05-23 06:23:22 -04:00
|
|
|
input_coordinate, bearing, bearing_range, approach);
|
2014-09-23 12:46:14 -04:00
|
|
|
}
|
|
|
|
|
2015-01-28 04:10:28 -05:00
|
|
|
unsigned GetCheckSum() const override final { return m_check_sum; }
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2017-04-25 05:36:34 -04:00
|
|
|
GeometryID GetGeometryIndex(const NodeID id) const override final
|
|
|
|
{
|
|
|
|
return edge_based_node_data.GetGeometryID(id);
|
|
|
|
}
|
|
|
|
|
2017-05-25 17:29:58 -04:00
|
|
|
ComponentID GetComponentID(const NodeID id) const override final
|
2017-05-15 06:15:00 -04:00
|
|
|
{
|
|
|
|
return edge_based_node_data.GetComponentID(id);
|
|
|
|
}
|
|
|
|
|
2017-04-25 05:36:34 -04:00
|
|
|
extractor::TravelMode GetTravelMode(const NodeID id) const override final
|
|
|
|
{
|
|
|
|
return edge_based_node_data.GetTravelMode(id);
|
|
|
|
}
|
|
|
|
|
2017-06-27 18:01:05 -04:00
|
|
|
extractor::ClassData GetClassData(const NodeID id) const override final
|
|
|
|
{
|
|
|
|
return edge_based_node_data.GetClassData(id);
|
|
|
|
}
|
|
|
|
|
2017-08-16 16:21:19 -04:00
|
|
|
bool ExcludeNode(const NodeID id) const override final
|
2017-07-21 17:55:19 -04:00
|
|
|
{
|
2017-08-16 16:21:19 -04:00
|
|
|
return (edge_based_node_data.GetClassData(id) & exclude_mask) > 0;
|
2017-07-21 17:55:19 -04:00
|
|
|
}
|
|
|
|
|
2017-06-27 18:01:05 -04:00
|
|
|
std::vector<std::string> GetClasses(const extractor::ClassData class_data) const override final
|
|
|
|
{
|
|
|
|
auto indexes = extractor::getClassIndexes(class_data);
|
|
|
|
std::vector<std::string> classes(indexes.size());
|
|
|
|
std::transform(indexes.begin(), indexes.end(), classes.begin(), [this](const auto index) {
|
|
|
|
return m_profile_properties->GetClassName(index);
|
|
|
|
});
|
|
|
|
|
|
|
|
return classes;
|
|
|
|
}
|
|
|
|
|
2017-04-25 05:36:34 -04:00
|
|
|
NameID GetNameIndex(const NodeID id) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2017-04-25 05:36:34 -04:00
|
|
|
return edge_based_node_data.GetNameID(id);
|
2016-03-14 11:25:39 -04:00
|
|
|
}
|
2015-01-27 06:35:29 -05:00
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
StringView GetNameForID(const NameID id) const override final
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
2017-01-19 09:14:30 -05:00
|
|
|
return m_name_table.GetNameForID(id);
|
2015-01-27 06:35:29 -05:00
|
|
|
}
|
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
StringView GetRefForID(const NameID id) const override final
|
2016-09-05 09:01:51 -04:00
|
|
|
{
|
2017-01-19 09:14:30 -05:00
|
|
|
return m_name_table.GetRefForID(id);
|
2016-09-05 09:01:51 -04:00
|
|
|
}
|
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
StringView GetPronunciationForID(const NameID id) const override final
|
2016-05-25 21:35:38 -04:00
|
|
|
{
|
2017-01-19 09:14:30 -05:00
|
|
|
return m_name_table.GetPronunciationForID(id);
|
2016-05-26 18:47:46 -04:00
|
|
|
}
|
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
StringView GetDestinationsForID(const NameID id) const override final
|
2016-05-26 18:47:46 -04:00
|
|
|
{
|
2017-01-19 09:14:30 -05:00
|
|
|
return m_name_table.GetDestinationsForID(id);
|
2016-05-25 21:35:38 -04:00
|
|
|
}
|
|
|
|
|
2017-06-29 16:12:25 -04:00
|
|
|
StringView GetExitsForID(const NameID id) const override final
|
|
|
|
{
|
|
|
|
return m_name_table.GetExitsForID(id);
|
|
|
|
}
|
|
|
|
|
2016-12-15 12:27:09 -05:00
|
|
|
StringView GetDatasourceName(const DatasourceID id) const override final
|
2016-03-15 02:03:19 -04:00
|
|
|
{
|
2017-03-09 12:01:04 -05:00
|
|
|
return m_datasources->GetSourceName(id);
|
2016-03-15 02:03:19 -04:00
|
|
|
}
|
|
|
|
|
2016-05-06 19:53:11 -04:00
|
|
|
bool GetContinueStraightDefault() const override final
|
|
|
|
{
|
|
|
|
return m_profile_properties->continue_straight_at_waypoint;
|
|
|
|
}
|
2016-04-26 07:27:40 -04:00
|
|
|
|
2016-11-01 17:13:10 -04:00
|
|
|
double GetMapMatchingMaxSpeed() const override final
|
|
|
|
{
|
|
|
|
return m_profile_properties->max_speed_for_map_matching;
|
|
|
|
}
|
|
|
|
|
2016-05-12 12:50:10 -04:00
|
|
|
const char *GetWeightName() const override final { return m_profile_properties->weight_name; }
|
|
|
|
|
|
|
|
unsigned GetWeightPrecision() const override final
|
|
|
|
{
|
|
|
|
return m_profile_properties->weight_precision;
|
|
|
|
}
|
|
|
|
|
2017-01-17 03:24:52 -05:00
|
|
|
double GetWeightMultiplier() const override final
|
|
|
|
{
|
|
|
|
return m_profile_properties->GetWeightMultiplier();
|
|
|
|
}
|
|
|
|
|
2017-06-19 09:27:46 -04:00
|
|
|
util::guidance::BearingClass GetBearingClass(const NodeID node) const override final
|
2016-04-26 07:27:40 -04:00
|
|
|
{
|
2017-06-19 09:27:46 -04:00
|
|
|
return intersection_bearings_view.GetBearingClass(node);
|
2016-04-26 07:27:40 -04:00
|
|
|
}
|
|
|
|
|
2018-01-08 13:12:06 -05:00
|
|
|
guidance::TurnBearing PreTurnBearing(const EdgeID eid) const override final
|
2016-08-17 03:49:19 -04:00
|
|
|
{
|
2017-04-01 21:25:55 -04:00
|
|
|
return turn_data.GetPreTurnBearing(eid);
|
2016-08-17 03:49:19 -04:00
|
|
|
}
|
2018-01-08 13:12:06 -05:00
|
|
|
guidance::TurnBearing PostTurnBearing(const EdgeID eid) const override final
|
2016-08-17 03:49:19 -04:00
|
|
|
{
|
2017-04-01 21:25:55 -04:00
|
|
|
return turn_data.GetPostTurnBearing(eid);
|
2016-08-17 03:49:19 -04:00
|
|
|
}
|
|
|
|
|
2017-06-19 09:27:46 -04:00
|
|
|
util::guidance::EntryClass GetEntryClass(const EdgeID turn_id) const override final
|
2016-04-26 07:27:40 -04:00
|
|
|
{
|
2017-06-19 09:27:46 -04:00
|
|
|
auto entry_class_id = turn_data.GetEntryClassID(turn_id);
|
2016-04-26 07:27:40 -04:00
|
|
|
return m_entry_class_table.at(entry_class_id);
|
|
|
|
}
|
2016-06-15 08:38:24 -04:00
|
|
|
|
2017-04-01 21:25:55 -04:00
|
|
|
bool HasLaneData(const EdgeID id) const override final { return turn_data.HasLaneData(id); }
|
2016-06-15 08:38:24 -04:00
|
|
|
|
2016-10-04 15:28:13 -04:00
|
|
|
util::guidance::LaneTupleIdPair GetLaneData(const EdgeID id) const override final
|
2016-06-15 08:38:24 -04:00
|
|
|
{
|
2017-04-01 21:00:03 -04:00
|
|
|
BOOST_ASSERT(HasLaneData(id));
|
2017-04-01 21:25:55 -04:00
|
|
|
return m_lane_tupel_id_pairs.at(turn_data.GetLaneDataID(id));
|
2016-06-15 08:38:24 -04:00
|
|
|
}
|
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
extractor::TurnLaneDescription
|
2016-06-21 04:41:08 -04:00
|
|
|
GetTurnDescription(const LaneDescriptionID lane_description_id) const override final
|
2016-06-15 08:38:24 -04:00
|
|
|
{
|
2016-06-21 04:41:08 -04:00
|
|
|
if (lane_description_id == INVALID_LANE_DESCRIPTIONID)
|
|
|
|
return {};
|
|
|
|
else
|
2018-01-05 08:33:53 -05:00
|
|
|
return extractor::TurnLaneDescription(
|
2016-06-21 04:41:08 -04:00
|
|
|
m_lane_description_masks.begin() + m_lane_description_offsets[lane_description_id],
|
2016-07-26 09:00:58 -04:00
|
|
|
m_lane_description_masks.begin() +
|
|
|
|
m_lane_description_offsets[lane_description_id + 1]);
|
2016-06-15 08:38:24 -04:00
|
|
|
}
|
2017-05-22 10:09:53 -04:00
|
|
|
|
2017-08-16 06:07:46 -04:00
|
|
|
bool IsLeftHandDriving(const NodeID id) const override final
|
2017-05-22 10:09:53 -04:00
|
|
|
{
|
2017-08-16 06:07:46 -04:00
|
|
|
// TODO: can be moved to a data block indexed by GeometryID
|
|
|
|
return edge_based_node_data.IsLeftHandDriving(id);
|
2017-05-22 10:09:53 -04:00
|
|
|
}
|
2017-10-14 08:21:31 -04:00
|
|
|
|
|
|
|
bool IsSegregated(const NodeID id) const override final
|
|
|
|
{
|
|
|
|
return edge_based_node_data.IsSegregated(id);
|
|
|
|
}
|
2018-02-09 13:32:09 -05:00
|
|
|
|
|
|
|
std::vector<extractor::ManeuverOverride>
|
|
|
|
GetOverridesThatStartAt(const NodeID edge_based_node_id) const override final
|
|
|
|
{
|
|
|
|
std::vector<extractor::ManeuverOverride> results;
|
|
|
|
|
|
|
|
// heterogeneous comparison:
|
|
|
|
struct Comp
|
|
|
|
{
|
|
|
|
bool operator()(const extractor::StorageManeuverOverride &s, NodeID i) const
|
|
|
|
{
|
|
|
|
return s.start_node < i;
|
|
|
|
}
|
|
|
|
bool operator()(NodeID i, const extractor::StorageManeuverOverride &s) const
|
|
|
|
{
|
|
|
|
return i < s.start_node;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
auto found_range = std::equal_range(
|
|
|
|
m_maneuver_overrides.begin(), m_maneuver_overrides.end(), edge_based_node_id, Comp{});
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
std::for_each(found_range.first, found_range.second, [&](const auto &override) {
|
2018-02-09 13:32:09 -05:00
|
|
|
std::vector<NodeID> sequence(
|
|
|
|
m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_begin,
|
|
|
|
m_maneuver_override_node_sequences.begin() + override.node_sequence_offset_end);
|
|
|
|
results.push_back(extractor::ManeuverOverride{std::move(sequence),
|
|
|
|
override.instruction_node,
|
|
|
|
override.override_type,
|
|
|
|
override.direction});
|
|
|
|
});
|
|
|
|
return results;
|
|
|
|
}
|
2015-01-27 06:35:29 -05:00
|
|
|
};
|
2017-01-09 15:40:33 -05:00
|
|
|
|
|
|
|
template <typename AlgorithmT> class ContiguousInternalMemoryDataFacade;
|
|
|
|
|
|
|
|
template <>
|
2017-03-31 06:52:04 -04:00
|
|
|
class ContiguousInternalMemoryDataFacade<CH>
|
2017-01-09 15:40:33 -05:00
|
|
|
: public ContiguousInternalMemoryDataFacadeBase,
|
2017-03-31 06:52:04 -04:00
|
|
|
public ContiguousInternalMemoryAlgorithmDataFacade<CH>
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
|
|
|
public:
|
2017-07-21 17:55:19 -04:00
|
|
|
ContiguousInternalMemoryDataFacade(std::shared_ptr<ContiguousBlockAllocator> allocator,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
|
|
|
: ContiguousInternalMemoryDataFacadeBase(allocator, exclude_index),
|
2017-08-20 19:24:05 -04:00
|
|
|
ContiguousInternalMemoryAlgorithmDataFacade<CH>(allocator, exclude_index)
|
2017-01-09 15:40:33 -05:00
|
|
|
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
2017-02-25 00:13:38 -05:00
|
|
|
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> class ContiguousInternalMemoryAlgorithmDataFacade<MLD> : public AlgorithmDataFacade<MLD>
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
|
|
|
// MLD data
|
2018-02-01 10:47:43 -05:00
|
|
|
partitioner::MultiLevelPartitionView mld_partition;
|
|
|
|
partitioner::CellStorageView mld_cell_storage;
|
2017-07-24 20:05:15 -04:00
|
|
|
customizer::CellMetricView mld_cell_metric;
|
2017-03-06 22:59:28 -05:00
|
|
|
using QueryGraph = customizer::MultiLevelEdgeBasedGraphView;
|
|
|
|
using GraphNode = QueryGraph::NodeArrayEntry;
|
|
|
|
using GraphEdge = QueryGraph::EdgeArrayEntry;
|
|
|
|
|
|
|
|
QueryGraph query_graph;
|
2017-03-01 17:55:18 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeInternalPointers(const storage::DataLayout &data_layout,
|
2017-07-21 17:55:19 -04:00
|
|
|
char *memory_block,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
2017-08-16 16:21:19 -04:00
|
|
|
InitializeMLDDataPointers(data_layout, memory_block, exclude_index);
|
2017-03-06 22:59:28 -05:00
|
|
|
InitializeGraphPointer(data_layout, memory_block);
|
2017-03-01 17:55:18 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeMLDDataPointers(const storage::DataLayout &data_layout,
|
2017-07-21 17:55:19 -04:00
|
|
|
char *memory_block,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
if (data_layout.GetBlockSize("/mld/multilevelpartition/partition") > 0)
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
BOOST_ASSERT(data_layout.GetBlockSize("/mld/multilevelpartition/level_data") > 0);
|
|
|
|
BOOST_ASSERT(data_layout.GetBlockSize("/mld/multilevelpartition/cell_to_children") > 0);
|
2017-03-01 17:55:18 -05:00
|
|
|
|
2017-03-04 13:54:06 -05:00
|
|
|
auto level_data =
|
2018-02-01 10:47:43 -05:00
|
|
|
data_layout.GetBlockPtr<partitioner::MultiLevelPartitionView::LevelData>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/multilevelpartition/level_data");
|
2017-03-03 21:16:20 -05:00
|
|
|
|
2017-03-07 07:57:55 -05:00
|
|
|
auto mld_partition_ptr = data_layout.GetBlockPtr<PartitionID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/multilevelpartition/partition");
|
2017-03-03 21:16:20 -05:00
|
|
|
auto partition_entries_count =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/multilevelpartition/partition");
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<PartitionID> partition(mld_partition_ptr, partition_entries_count);
|
2017-03-03 21:16:20 -05:00
|
|
|
|
2017-03-07 07:57:55 -05:00
|
|
|
auto mld_chilren_ptr = data_layout.GetBlockPtr<CellID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/multilevelpartition/cell_to_children");
|
2017-03-03 21:16:20 -05:00
|
|
|
auto children_entries_count =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/multilevelpartition/cell_to_children");
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<CellID> cell_to_children(mld_chilren_ptr, children_entries_count);
|
2017-03-01 17:55:18 -05:00
|
|
|
|
2017-03-04 13:54:06 -05:00
|
|
|
mld_partition =
|
2018-02-01 10:47:43 -05:00
|
|
|
partitioner::MultiLevelPartitionView{level_data, partition, cell_to_children};
|
2017-03-01 17:55:18 -05:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
const auto weights_block_id = "/mld/metrics/" + std::to_string(exclude_index) + "/weights";
|
|
|
|
const auto durations_block_id =
|
|
|
|
"/mld/metrics/" + std::to_string(exclude_index) + "/durations";
|
2017-07-24 20:05:15 -04:00
|
|
|
|
2017-07-21 17:55:19 -04:00
|
|
|
if (data_layout.GetBlockSize(weights_block_id) > 0)
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
2017-07-21 17:55:19 -04:00
|
|
|
auto mld_cell_weights_ptr =
|
|
|
|
data_layout.GetBlockPtr<EdgeWeight>(memory_block, weights_block_id);
|
|
|
|
auto mld_cell_durations_ptr =
|
|
|
|
data_layout.GetBlockPtr<EdgeDuration>(memory_block, durations_block_id);
|
2018-03-22 15:16:19 -04:00
|
|
|
auto weight_entries_count = data_layout.GetBlockEntries("/mld/metrics/0/weights");
|
|
|
|
auto duration_entries_count = data_layout.GetBlockEntries("/mld/metrics/0/durations");
|
2017-07-24 20:05:15 -04:00
|
|
|
BOOST_ASSERT(weight_entries_count == duration_entries_count);
|
|
|
|
util::vector_view<EdgeWeight> weights(mld_cell_weights_ptr, weight_entries_count);
|
|
|
|
util::vector_view<EdgeDuration> durations(mld_cell_durations_ptr,
|
|
|
|
duration_entries_count);
|
|
|
|
|
2017-08-14 17:24:33 -04:00
|
|
|
mld_cell_metric = customizer::CellMetricView{std::move(weights), std::move(durations)};
|
2017-07-24 20:05:15 -04:00
|
|
|
}
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
if (data_layout.GetBlockSize("/mld/cellstorage/cells") > 0)
|
2017-07-24 20:05:15 -04:00
|
|
|
{
|
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto mld_source_boundary_ptr =
|
|
|
|
data_layout.GetBlockPtr<NodeID>(memory_block, "/mld/cellstorage/source_boundary");
|
2017-03-04 13:36:29 -05:00
|
|
|
auto mld_destination_boundary_ptr = data_layout.GetBlockPtr<NodeID>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/cellstorage/destination_boundary");
|
2018-02-01 10:47:43 -05:00
|
|
|
auto mld_cells_ptr = data_layout.GetBlockPtr<partitioner::CellStorageView::CellData>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/cellstorage/cells");
|
2017-03-04 13:36:29 -05:00
|
|
|
auto mld_cell_level_offsets_ptr = data_layout.GetBlockPtr<std::uint64_t>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/cellstorage/level_to_cell_offset");
|
2017-03-04 13:36:29 -05:00
|
|
|
|
|
|
|
auto source_boundary_entries_count =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/cellstorage/source_boundary");
|
2017-03-04 13:36:29 -05:00
|
|
|
auto destination_boundary_entries_count =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/cellstorage/destination_boundary");
|
|
|
|
auto cells_entries_counts = data_layout.GetBlockEntries("/mld/cellstorage/cells");
|
2017-03-04 13:36:29 -05:00
|
|
|
auto cell_level_offsets_entries_count =
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/cellstorage/level_to_cell_offset");
|
2017-03-04 13:36:29 -05:00
|
|
|
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<NodeID> source_boundary(mld_source_boundary_ptr,
|
|
|
|
source_boundary_entries_count);
|
|
|
|
util::vector_view<NodeID> destination_boundary(mld_destination_boundary_ptr,
|
|
|
|
destination_boundary_entries_count);
|
2018-02-01 10:47:43 -05:00
|
|
|
util::vector_view<partitioner::CellStorageView::CellData> cells(mld_cells_ptr,
|
|
|
|
cells_entries_counts);
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<std::uint64_t> level_offsets(mld_cell_level_offsets_ptr,
|
|
|
|
cell_level_offsets_entries_count);
|
2017-03-04 13:36:29 -05:00
|
|
|
|
2018-02-01 10:47:43 -05:00
|
|
|
mld_cell_storage = partitioner::CellStorageView{std::move(source_boundary),
|
|
|
|
std::move(destination_boundary),
|
|
|
|
std::move(cells),
|
|
|
|
std::move(level_offsets)};
|
2017-03-01 17:55:18 -05:00
|
|
|
}
|
|
|
|
}
|
2018-03-22 15:16:19 -04:00
|
|
|
void InitializeGraphPointer(const storage::DataLayout &data_layout, char *memory_block)
|
2017-03-06 17:00:11 -05:00
|
|
|
{
|
2018-03-22 15:16:19 -04:00
|
|
|
auto graph_nodes_ptr =
|
|
|
|
data_layout.GetBlockPtr<GraphNode>(memory_block, "/mld/multilevelgraph/node_array");
|
2017-03-06 17:00:11 -05:00
|
|
|
|
2018-03-22 15:16:19 -04:00
|
|
|
auto graph_edges_ptr =
|
|
|
|
data_layout.GetBlockPtr<GraphEdge>(memory_block, "/mld/multilevelgraph/edge_array");
|
2017-03-06 17:00:11 -05:00
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
auto graph_node_to_offset_ptr = data_layout.GetBlockPtr<QueryGraph::EdgeOffset>(
|
2018-03-22 15:16:19 -04:00
|
|
|
memory_block, "/mld/multilevelgraph/node_to_edge_offset");
|
2017-03-06 22:59:28 -05:00
|
|
|
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<GraphNode> node_list(
|
2018-03-22 15:16:19 -04:00
|
|
|
graph_nodes_ptr, data_layout.GetBlockEntries("/mld/multilevelgraph/node_array"));
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<GraphEdge> edge_list(
|
2018-03-22 15:16:19 -04:00
|
|
|
graph_edges_ptr, data_layout.GetBlockEntries("/mld/multilevelgraph/edge_array"));
|
2017-04-02 15:24:11 -04:00
|
|
|
util::vector_view<QueryGraph::EdgeOffset> node_to_offset(
|
|
|
|
graph_node_to_offset_ptr,
|
2018-03-22 15:16:19 -04:00
|
|
|
data_layout.GetBlockEntries("/mld/multilevelgraph/node_to_edge_offset"));
|
2017-03-06 17:00:11 -05:00
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
query_graph =
|
|
|
|
QueryGraph(std::move(node_list), std::move(edge_list), std::move(node_to_offset));
|
2017-03-06 17:00:11 -05:00
|
|
|
}
|
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
// allocator that keeps the allocation data
|
|
|
|
std::shared_ptr<ContiguousBlockAllocator> allocator;
|
2017-03-01 17:55:18 -05:00
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
public:
|
|
|
|
ContiguousInternalMemoryAlgorithmDataFacade(
|
2017-08-16 16:21:19 -04:00
|
|
|
std::shared_ptr<ContiguousBlockAllocator> allocator_, const std::size_t exclude_index)
|
2017-03-06 22:59:28 -05:00
|
|
|
: allocator(std::move(allocator_))
|
2017-03-01 17:55:18 -05:00
|
|
|
{
|
2017-08-16 16:21:19 -04:00
|
|
|
InitializeInternalPointers(allocator->GetLayout(), allocator->GetMemory(), exclude_index);
|
2017-03-06 17:00:11 -05:00
|
|
|
}
|
|
|
|
|
2018-02-01 10:47:43 -05:00
|
|
|
const partitioner::MultiLevelPartitionView &GetMultiLevelPartition() const override
|
2017-03-06 17:00:11 -05:00
|
|
|
{
|
2017-03-06 22:59:28 -05:00
|
|
|
return mld_partition;
|
2017-03-06 17:00:11 -05:00
|
|
|
}
|
|
|
|
|
2018-02-01 10:47:43 -05:00
|
|
|
const partitioner::CellStorageView &GetCellStorage() const override { return mld_cell_storage; }
|
2017-03-06 22:59:28 -05:00
|
|
|
|
2017-07-24 20:05:15 -04:00
|
|
|
const customizer::CellMetricView &GetCellMetric() const override { return mld_cell_metric; }
|
|
|
|
|
2017-03-06 17:00:11 -05:00
|
|
|
// search graph access
|
2017-03-06 22:59:28 -05:00
|
|
|
unsigned GetNumberOfNodes() const override final { return query_graph.GetNumberOfNodes(); }
|
2017-03-06 17:00:11 -05:00
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
unsigned GetNumberOfEdges() const override final { return query_graph.GetNumberOfEdges(); }
|
2017-03-06 17:00:11 -05:00
|
|
|
|
|
|
|
unsigned GetOutDegree(const NodeID n) const override final
|
|
|
|
{
|
2017-03-06 22:59:28 -05:00
|
|
|
return query_graph.GetOutDegree(n);
|
2017-03-06 17:00:11 -05:00
|
|
|
}
|
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
NodeID GetTarget(const EdgeID e) const override final { return query_graph.GetTarget(e); }
|
2017-03-06 17:00:11 -05:00
|
|
|
|
2017-03-06 22:59:28 -05:00
|
|
|
const EdgeData &GetEdgeData(const EdgeID e) const override final
|
2017-03-06 17:00:11 -05:00
|
|
|
{
|
2017-03-06 22:59:28 -05:00
|
|
|
return query_graph.GetEdgeData(e);
|
2017-03-06 17:00:11 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
EdgeRange GetAdjacentEdgeRange(const NodeID node) const override final
|
|
|
|
{
|
2017-03-06 22:59:28 -05:00
|
|
|
return query_graph.GetAdjacentEdgeRange(node);
|
|
|
|
}
|
|
|
|
|
|
|
|
EdgeRange GetBorderEdgeRange(const LevelID level, const NodeID node) const override final
|
|
|
|
{
|
|
|
|
return query_graph.GetBorderEdgeRange(level, node);
|
2017-03-01 17:55:18 -05:00
|
|
|
}
|
2017-03-15 09:36:41 -04:00
|
|
|
|
|
|
|
// searches for a specific edge
|
|
|
|
EdgeID FindEdge(const NodeID from, const NodeID to) const override final
|
|
|
|
{
|
2017-03-06 22:59:28 -05:00
|
|
|
return query_graph.FindEdge(from, to);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
2017-03-31 06:52:04 -04:00
|
|
|
class ContiguousInternalMemoryDataFacade<MLD> final
|
2017-03-06 22:59:28 -05:00
|
|
|
: public ContiguousInternalMemoryDataFacadeBase,
|
2017-03-31 06:52:04 -04:00
|
|
|
public ContiguousInternalMemoryAlgorithmDataFacade<MLD>
|
2017-03-06 22:59:28 -05:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
public:
|
2017-07-21 17:55:19 -04:00
|
|
|
ContiguousInternalMemoryDataFacade(std::shared_ptr<ContiguousBlockAllocator> allocator,
|
2017-08-16 16:21:19 -04:00
|
|
|
const std::size_t exclude_index)
|
|
|
|
: ContiguousInternalMemoryDataFacadeBase(allocator, exclude_index),
|
|
|
|
ContiguousInternalMemoryAlgorithmDataFacade<MLD>(allocator, exclude_index)
|
2017-03-06 22:59:28 -05:00
|
|
|
|
|
|
|
{
|
2017-03-15 09:36:41 -04:00
|
|
|
}
|
2017-03-01 17:55:18 -05:00
|
|
|
};
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-11-14 21:34:39 -05:00
|
|
|
#endif // CONTIGUOUS_INTERNALMEM_DATAFACADE_HPP
|