Run clang-format
This commit is contained in:
@@ -85,10 +85,10 @@ template <class EdgeDataT> class BaseDataFacade
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) = 0;
|
||||
|
||||
virtual std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) = 0;
|
||||
virtual std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) = 0;
|
||||
|
||||
virtual unsigned GetCheckSum() const = 0;
|
||||
|
||||
@@ -102,7 +102,6 @@ template <class EdgeDataT> class BaseDataFacade
|
||||
|
||||
virtual std::string GetTimestamp() const = 0;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,8 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
using QueryGraph = util::StaticGraph<typename super::EdgeData>;
|
||||
using InputEdge = typename QueryGraph::InputEdge;
|
||||
using RTreeLeaf = typename super::RTreeLeaf;
|
||||
using InternalRTree = util::StaticRTree<RTreeLeaf, util::ShM<util::FixedPointCoordinate, false>::vector, false>;
|
||||
using InternalRTree =
|
||||
util::StaticRTree<RTreeLeaf, util::ShM<util::FixedPointCoordinate, false>::vector, false>;
|
||||
using InternalGeospatialQuery = GeospatialQuery<InternalRTree>;
|
||||
|
||||
InternalDataFacade() {}
|
||||
@@ -98,8 +99,8 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
|
||||
BOOST_ASSERT_MSG(0 != node_list.size(), "node list empty");
|
||||
// BOOST_ASSERT_MSG(0 != edge_list.size(), "edge list empty");
|
||||
util::SimpleLogger().Write() << "loaded " << node_list.size() << " nodes and " << edge_list.size()
|
||||
<< " edges";
|
||||
util::SimpleLogger().Write() << "loaded " << node_list.size() << " nodes and "
|
||||
<< edge_list.size() << " edges";
|
||||
m_query_graph = std::unique_ptr<QueryGraph>(new QueryGraph(node_list, edge_list));
|
||||
|
||||
BOOST_ASSERT_MSG(0 == node_list.size(), "node list not flushed");
|
||||
@@ -120,7 +121,8 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
for (unsigned i = 0; i < number_of_coordinates; ++i)
|
||||
{
|
||||
nodes_input_stream.read((char *)¤t_node, sizeof(extractor::QueryNode));
|
||||
m_coordinate_list->at(i) = util::FixedPointCoordinate(current_node.lat, current_node.lon);
|
||||
m_coordinate_list->at(i) =
|
||||
util::FixedPointCoordinate(current_node.lat, current_node.lon);
|
||||
BOOST_ASSERT((std::abs(m_coordinate_list->at(i).lat) >> 30) == 0);
|
||||
BOOST_ASSERT((std::abs(m_coordinate_list->at(i).lon) >> 30) == 0);
|
||||
}
|
||||
@@ -140,7 +142,8 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
extractor::OriginalEdgeData current_edge_data;
|
||||
for (unsigned i = 0; i < number_of_edges; ++i)
|
||||
{
|
||||
edges_input_stream.read((char *)&(current_edge_data), sizeof(extractor::OriginalEdgeData));
|
||||
edges_input_stream.read((char *)&(current_edge_data),
|
||||
sizeof(extractor::OriginalEdgeData));
|
||||
m_via_node_list[i] = current_edge_data.via_node;
|
||||
m_name_ID_list[i] = current_edge_data.name_id;
|
||||
m_turn_instruction_list[i] = current_edge_data.turn_instruction;
|
||||
@@ -371,10 +374,10 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
bearing_range);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get())
|
||||
{
|
||||
@@ -444,7 +447,6 @@ template <class EdgeDataT> class InternalDataFacade final : public BaseDataFacad
|
||||
|
||||
std::string GetTimestamp() const override final { return m_timestamp; }
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ struct SharedBarriers
|
||||
// Is there any query?
|
||||
int number_of_queries;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,8 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
using NameIndexBlock = typename util::RangeTable<16, true>::BlockT;
|
||||
using InputEdge = typename QueryGraph::InputEdge;
|
||||
using RTreeLeaf = typename super::RTreeLeaf;
|
||||
using SharedRTree = util::StaticRTree<RTreeLeaf, util::ShM<util::FixedPointCoordinate, true>::vector, true>;
|
||||
using SharedRTree =
|
||||
util::StaticRTree<RTreeLeaf, util::ShM<util::FixedPointCoordinate, true>::vector, true>;
|
||||
using SharedGeospatialQuery = GeospatialQuery<SharedRTree>;
|
||||
using TimeStampedRTreePair = std::pair<unsigned, std::shared_ptr<SharedRTree>>;
|
||||
using RTreeNode = typename SharedRTree::TreeNode;
|
||||
@@ -125,19 +126,22 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
void LoadNodeAndEdgeInformation()
|
||||
{
|
||||
|
||||
util::FixedPointCoordinate *coordinate_list_ptr = data_layout->GetBlockPtr<util::FixedPointCoordinate>(
|
||||
shared_memory, SharedDataLayout::COORDINATE_LIST);
|
||||
util::FixedPointCoordinate *coordinate_list_ptr =
|
||||
data_layout->GetBlockPtr<util::FixedPointCoordinate>(shared_memory,
|
||||
SharedDataLayout::COORDINATE_LIST);
|
||||
m_coordinate_list = util::make_unique<util::ShM<util::FixedPointCoordinate, true>::vector>(
|
||||
coordinate_list_ptr, data_layout->num_entries[SharedDataLayout::COORDINATE_LIST]);
|
||||
|
||||
extractor::TravelMode *travel_mode_list_ptr =
|
||||
data_layout->GetBlockPtr<extractor::TravelMode>(shared_memory, SharedDataLayout::TRAVEL_MODE);
|
||||
data_layout->GetBlockPtr<extractor::TravelMode>(shared_memory,
|
||||
SharedDataLayout::TRAVEL_MODE);
|
||||
typename util::ShM<extractor::TravelMode, true>::vector travel_mode_list(
|
||||
travel_mode_list_ptr, data_layout->num_entries[SharedDataLayout::TRAVEL_MODE]);
|
||||
m_travel_mode_list.swap(travel_mode_list);
|
||||
|
||||
extractor::TurnInstruction *turn_instruction_list_ptr = data_layout->GetBlockPtr<extractor::TurnInstruction>(
|
||||
shared_memory, SharedDataLayout::TURN_INSTRUCTION);
|
||||
extractor::TurnInstruction *turn_instruction_list_ptr =
|
||||
data_layout->GetBlockPtr<extractor::TurnInstruction>(
|
||||
shared_memory, SharedDataLayout::TURN_INSTRUCTION);
|
||||
typename util::ShM<extractor::TurnInstruction, true>::vector turn_instruction_list(
|
||||
turn_instruction_list_ptr,
|
||||
data_layout->num_entries[SharedDataLayout::TURN_INSTRUCTION]);
|
||||
@@ -258,7 +262,8 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
file_index_path = boost::filesystem::path(file_index_ptr);
|
||||
if (!boost::filesystem::exists(file_index_path))
|
||||
{
|
||||
util::SimpleLogger().Write(logDEBUG) << "Leaf file name " << file_index_path.string();
|
||||
util::SimpleLogger().Write(logDEBUG) << "Leaf file name "
|
||||
<< file_index_path.string();
|
||||
throw util::exception("Could not load leaf index file. "
|
||||
"Is any data loaded into shared memory?");
|
||||
}
|
||||
@@ -397,10 +402,10 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
bearing_range);
|
||||
}
|
||||
|
||||
std::pair<PhantomNode, PhantomNode>
|
||||
NearestPhantomNodeWithAlternativeFromBigComponent(const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
std::pair<PhantomNode, PhantomNode> NearestPhantomNodeWithAlternativeFromBigComponent(
|
||||
const util::FixedPointCoordinate &input_coordinate,
|
||||
const int bearing = 0,
|
||||
const int bearing_range = 180) override final
|
||||
{
|
||||
if (!m_static_rtree.get() || CURRENT_TIMESTAMP != m_static_rtree->first)
|
||||
{
|
||||
@@ -452,7 +457,6 @@ template <class EdgeDataT> class SharedDataFacade final : public BaseDataFacade<
|
||||
|
||||
std::string GetTimestamp() const override final { return m_timestamp; }
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,41 +54,41 @@ struct SharedDataLayout
|
||||
void PrintInformation() const
|
||||
{
|
||||
util::SimpleLogger().Write(logDEBUG) << "NAME_OFFSETS "
|
||||
<< ": " << GetBlockSize(NAME_OFFSETS);
|
||||
<< ": " << GetBlockSize(NAME_OFFSETS);
|
||||
util::SimpleLogger().Write(logDEBUG) << "NAME_BLOCKS "
|
||||
<< ": " << GetBlockSize(NAME_BLOCKS);
|
||||
<< ": " << GetBlockSize(NAME_BLOCKS);
|
||||
util::SimpleLogger().Write(logDEBUG) << "NAME_CHAR_LIST "
|
||||
<< ": " << GetBlockSize(NAME_CHAR_LIST);
|
||||
<< ": " << GetBlockSize(NAME_CHAR_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "NAME_ID_LIST "
|
||||
<< ": " << GetBlockSize(NAME_ID_LIST);
|
||||
<< ": " << GetBlockSize(NAME_ID_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "VIA_NODE_LIST "
|
||||
<< ": " << GetBlockSize(VIA_NODE_LIST);
|
||||
<< ": " << GetBlockSize(VIA_NODE_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "GRAPH_NODE_LIST "
|
||||
<< ": " << GetBlockSize(GRAPH_NODE_LIST);
|
||||
<< ": " << GetBlockSize(GRAPH_NODE_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "GRAPH_EDGE_LIST "
|
||||
<< ": " << GetBlockSize(GRAPH_EDGE_LIST);
|
||||
<< ": " << GetBlockSize(GRAPH_EDGE_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "COORDINATE_LIST "
|
||||
<< ": " << GetBlockSize(COORDINATE_LIST);
|
||||
<< ": " << GetBlockSize(COORDINATE_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "TURN_INSTRUCTION "
|
||||
<< ": " << GetBlockSize(TURN_INSTRUCTION);
|
||||
<< ": " << GetBlockSize(TURN_INSTRUCTION);
|
||||
util::SimpleLogger().Write(logDEBUG) << "TRAVEL_MODE "
|
||||
<< ": " << GetBlockSize(TRAVEL_MODE);
|
||||
<< ": " << GetBlockSize(TRAVEL_MODE);
|
||||
util::SimpleLogger().Write(logDEBUG) << "R_SEARCH_TREE "
|
||||
<< ": " << GetBlockSize(R_SEARCH_TREE);
|
||||
<< ": " << GetBlockSize(R_SEARCH_TREE);
|
||||
util::SimpleLogger().Write(logDEBUG) << "GEOMETRIES_INDEX "
|
||||
<< ": " << GetBlockSize(GEOMETRIES_INDEX);
|
||||
<< ": " << GetBlockSize(GEOMETRIES_INDEX);
|
||||
util::SimpleLogger().Write(logDEBUG) << "GEOMETRIES_LIST "
|
||||
<< ": " << GetBlockSize(GEOMETRIES_LIST);
|
||||
<< ": " << GetBlockSize(GEOMETRIES_LIST);
|
||||
util::SimpleLogger().Write(logDEBUG) << "GEOMETRIES_INDICATORS"
|
||||
<< ": " << GetBlockSize(GEOMETRIES_INDICATORS);
|
||||
<< ": " << GetBlockSize(GEOMETRIES_INDICATORS);
|
||||
util::SimpleLogger().Write(logDEBUG) << "HSGR_CHECKSUM "
|
||||
<< ": " << GetBlockSize(HSGR_CHECKSUM);
|
||||
<< ": " << GetBlockSize(HSGR_CHECKSUM);
|
||||
util::SimpleLogger().Write(logDEBUG) << "TIMESTAMP "
|
||||
<< ": " << GetBlockSize(TIMESTAMP);
|
||||
<< ": " << GetBlockSize(TIMESTAMP);
|
||||
util::SimpleLogger().Write(logDEBUG) << "FILE_INDEX_PATH "
|
||||
<< ": " << GetBlockSize(FILE_INDEX_PATH);
|
||||
<< ": " << GetBlockSize(FILE_INDEX_PATH);
|
||||
util::SimpleLogger().Write(logDEBUG) << "CORE_MARKER "
|
||||
<< ": " << GetBlockSize(CORE_MARKER);
|
||||
<< ": " << GetBlockSize(CORE_MARKER);
|
||||
}
|
||||
|
||||
template <typename T> inline void SetBlockSize(BlockID bid, uint64_t entries)
|
||||
@@ -171,7 +171,6 @@ struct SharedDataTimestamp
|
||||
SharedDataType data;
|
||||
unsigned timestamp;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user