[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 03132c6877
commit ef6522ed28
282 changed files with 4386 additions and 1456 deletions

View File

@@ -9,7 +9,8 @@
#include <mutex>
#include <set>
#include <string>
#include <unordered_set>
#include "3party/ankerl/unordered_dense.h"
namespace dp
{
@@ -48,7 +49,7 @@ private:
private:
GlyphUsageStatistic m_glyphStat;
std::unordered_set<std::string> m_processedStrings;
ankerl::unordered_dense::set<std::string> m_processedStrings;
std::mutex m_mutex;
};

View File

@@ -8,9 +8,10 @@
#include <map>
#include <mutex>
#include <string>
#include <unordered_map>
#include <utility>
#include "3party/ankerl/unordered_dense.h"
namespace dp
{
class GPUMemTracker
@@ -38,7 +39,7 @@ public:
uint32_t m_summaryAllocatedInMb = 0;
uint32_t m_summaryUsedInMb = 0;
std::map<std::string, TagMemorySnapshot> m_tagStats;
std::unordered_map<uint64_t, AverageAllocation> m_averageAllocations;
ankerl::unordered_dense::map<uint64_t, AverageAllocation> m_averageAllocations;
};
static GPUMemTracker & Inst();
@@ -57,7 +58,7 @@ private:
using TAlocUsedMem = std::pair<uint32_t, uint32_t>;
using TMemTag = std::pair<std::string, uint32_t>;
std::map<TMemTag, TAlocUsedMem> m_memTracker;
std::unordered_map<uint64_t, AverageAllocation> m_averageAllocations;
ankerl::unordered_dense::map<uint64_t, AverageAllocation> m_averageAllocations;
std::mutex m_mutex;