wip
This commit is contained in:
parent
233a7563b6
commit
53032e556a
@ -20,7 +20,8 @@ using ContractorHeap = util::QueryHeap<NodeID,
|
||||
NodeID,
|
||||
EdgeWeight,
|
||||
ContractorHeapData,
|
||||
util::XORFastHashStorage<NodeID, NodeID>>;
|
||||
util::XORFastHashStorage<NodeID, NodeID>,
|
||||
false>;
|
||||
|
||||
} // namespace osrm::contractor
|
||||
|
||||
|
@ -25,7 +25,7 @@ class CellCustomizer
|
||||
|
||||
public:
|
||||
using Heap =
|
||||
util::QueryHeap<NodeID, NodeID, EdgeWeight, HeapData, util::ArrayStorage<NodeID, int>>;
|
||||
util::QueryHeap<NodeID, NodeID, EdgeWeight, HeapData, util::ArrayStorage<NodeID, int>, false>;
|
||||
using HeapPtr = tbb::enumerable_thread_specific<Heap>;
|
||||
|
||||
CellCustomizer(const partitioner::MultiLevelPartition &partition) : partition(partition) {}
|
||||
|
@ -124,7 +124,7 @@ template <typename NodeID, typename Key> class UnorderedMapStorage
|
||||
private:
|
||||
template <typename K, typename V>
|
||||
using UnorderedMap = std::
|
||||
unordered_map<K, V, std::hash<K>, std::equal_to<K>, PoolAllocator<std::pair<const K, V>>>;
|
||||
unordered_map<K, V/*, std::hash<K>, std::equal_to<K>, PoolAllocator<std::pair<const K, V>>*/>;
|
||||
|
||||
UnorderedMap<NodeID, Key> nodes;
|
||||
};
|
||||
@ -241,7 +241,8 @@ template <typename NodeID,
|
||||
typename Key,
|
||||
typename Weight,
|
||||
typename Data,
|
||||
typename IndexStorage = ArrayStorage<NodeID, NodeID>>
|
||||
typename IndexStorage = ArrayStorage<NodeID, NodeID>,
|
||||
bool ThreadLocal = true>
|
||||
class QueryHeap
|
||||
{
|
||||
private:
|
||||
@ -259,11 +260,17 @@ class QueryHeap
|
||||
return weight > other.weight;
|
||||
}
|
||||
};
|
||||
|
||||
using AllocatorType = typename std::conditional<ThreadLocal,
|
||||
PoolAllocator<HeapData>,
|
||||
std::allocator<HeapData>>::type;
|
||||
|
||||
|
||||
using HeapContainer = boost::heap::d_ary_heap<HeapData,
|
||||
boost::heap::arity<4>,
|
||||
boost::heap::mutable_<true>,
|
||||
boost::heap::compare<std::greater<HeapData>>,
|
||||
boost::heap::allocator<PoolAllocator<HeapData>>>;
|
||||
boost::heap::allocator<AllocatorType>>;
|
||||
using HeapHandle = typename HeapContainer::handle_type;
|
||||
|
||||
public:
|
||||
|
Loading…
Reference in New Issue
Block a user