[core] Switch to ankerl::unordered_dense

Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
x7z4w
2025-11-24 17:34:56 +00:00
parent 7e561d09d3
commit 0288b97b13
282 changed files with 4385 additions and 1457 deletions

View File

@@ -43,9 +43,10 @@
#include <algorithm>
#include <map>
#include <memory>
#include <unordered_map>
#include <vector>
#include "3party/ankerl/unordered_dense.h"
namespace routing_builder
{
using namespace feature;
@@ -130,7 +131,7 @@ public:
graph.Import(joints);
}
std::unordered_map<uint32_t, VehicleMask> const & GetMasks() const { return m_masks; }
ankerl::unordered_dense::map<uint32_t, VehicleMask> const & GetMasks() const { return m_masks; }
private:
void ProcessFeature(FeatureType & f, uint32_t id)
@@ -150,8 +151,8 @@ private:
}
VehicleMaskBuilder const m_maskBuilder;
std::unordered_map<uint64_t, Joint> m_posToJoint;
std::unordered_map<uint32_t, VehicleMask> m_masks;
ankerl::unordered_dense::map<uint64_t, Joint> m_posToJoint;
ankerl::unordered_dense::map<uint32_t, VehicleMask> m_masks;
};
class IndexGraphWrapper final
@@ -494,7 +495,7 @@ void FillWeights(string const & path, string const & mwmFile, string const & cou
DijkstraWrapperJoints wrapper(indexGraphWrapper, enter);
Algorithm::Context context(wrapper);
std::unordered_map<uint32_t, vector<JointSegment>> visitedVertexes;
ankerl::unordered_dense::map<uint32_t, vector<JointSegment>> visitedVertexes;
astar.PropagateWave(wrapper, wrapper.GetStartJoint(), [&](JointSegment const & vertex)
{
if (vertex.IsFake())