This commit is contained in:
Siarhei Fedartsou 2024-07-03 22:27:47 +03:00
parent bbdac63362
commit 611a3c250b
2 changed files with 7 additions and 8 deletions

View File

@ -36,6 +36,11 @@ inline LegGeometry assembleGeometry(const datafacade::BaseDataFacade &facade,
const bool reversed_target)
{
LegGeometry geometry;
geometry.locations.reserve(leg_data.size() + 2);
geometry.segment_distances.reserve(leg_data.size() + 1);
geometry.segment_offsets.reserve(leg_data.size() + 1);
geometry.annotations.reserve(leg_data.size() + 1);
geometry.node_ids.reserve(leg_data.size() + 2);
// segment 0 first and last
geometry.segment_offsets.push_back(0);

View File

@ -121,10 +121,7 @@ template <typename NodeID, typename Key> class UnorderedMapStorage
void Clear() { nodes.clear(); }
private:
template <typename T>
using PoolAllocator = boost::fast_pool_allocator<T,
boost::default_user_allocator_new_delete,
boost::details::pool::null_mutex>;
template <typename T> using PoolAllocator = boost::fast_pool_allocator<T>;
template <typename K, typename V>
using UnorderedMap = std::
@ -216,10 +213,7 @@ class QueryHeap
return weight > other.weight;
}
};
using HeapContainerAllocator =
boost::fast_pool_allocator<HeapData,
boost::default_user_allocator_new_delete,
boost::details::pool::null_mutex>;
using HeapContainerAllocator = boost::fast_pool_allocator<HeapData>;
using HeapContainer = boost::heap::d_ary_heap<HeapData,
boost::heap::arity<4>,
boost::heap::mutable_<true>,