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