mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-27 08:23:38 +00:00
[core] Switch to ankerl::unordered_dense
Signed-off-by: x7z4w <x7z4w@noreply.codeberg.org>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user