make first heaps algorithm-aware

This commit is contained in:
Michael Krasnyk
2017-03-31 21:53:39 +02:00
parent 3fc0fc65f9
commit d66cc125aa
6 changed files with 92 additions and 54 deletions
@@ -228,10 +228,10 @@ void unpackLegs(const datafacade::ContiguousInternalMemoryDataFacade<ch::Algorit
}
}
template <typename AlgorithmT>
template <typename Algorithm>
InternalRouteResult
shortestPathSearchImpl(SearchEngineData &engine_working_data,
const datafacade::ContiguousInternalMemoryDataFacade<AlgorithmT> &facade,
const datafacade::ContiguousInternalMemoryDataFacade<Algorithm> &facade,
const std::vector<PhantomNodes> &phantom_nodes_vector,
const boost::optional<bool> continue_straight_at_waypoint)
{
@@ -241,11 +241,12 @@ shortestPathSearchImpl(SearchEngineData &engine_working_data,
!(continue_straight_at_waypoint ? *continue_straight_at_waypoint
: facade.GetContinueStraightDefault());
engine_working_data.InitializeOrClearFirstThreadLocalStorage(facade.GetNumberOfNodes());
engine_working_data.InitializeOrClearFirstThreadLocalStorage(Algorithm{},
facade.GetNumberOfNodes());
engine_working_data.InitializeOrClearSecondThreadLocalStorage(facade.GetNumberOfNodes());
QueryHeap &forward_heap = *(engine_working_data.forward_heap_1);
QueryHeap &reverse_heap = *(engine_working_data.reverse_heap_1);
auto &forward_heap = *engine_working_data.GetForwardHeapPtr(Algorithm{});
auto &reverse_heap = *engine_working_data.GetReverseHeapPtr(Algorithm{});
QueryHeap &forward_core_heap = *(engine_working_data.forward_heap_2);
QueryHeap &reverse_core_heap = *(engine_working_data.reverse_heap_2);