aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch26
-rw-r--r--CMakeLists.txt1
-rw-r--r--cpmfile.json11
-rw-r--r--docs/Deps.md9
-rw-r--r--docs/dynarmic/README.md26
-rw-r--r--externals/CMakeLists.txt3
-rw-r--r--src/android/app/src/main/jni/game_metadata.cpp2
-rw-r--r--src/android/app/src/main/jni/native_input.cpp2
-rw-r--r--src/common/CMakeLists.txt5
-rw-r--r--src/common/container/unordered_map.h16
-rw-r--r--src/common/container/unordered_set.h16
-rw-r--r--src/common/container_hash.h33
-rw-r--r--src/common/fs/path_util.cpp6
-rw-r--r--src/common/host_memory.cpp4
-rw-r--r--src/common/input.h4
-rw-r--r--src/common/param_package.h4
-rw-r--r--src/common/x64/xbyak.h7
-rw-r--r--src/core/arm/dynarmic/arm_dynarmic_64.h2
-rw-r--r--src/core/arm/nce/patcher.h4
-rw-r--r--src/core/file_sys/ips_layer.cpp4
-rw-r--r--src/core/file_sys/registered_cache.cpp2
-rw-r--r--src/core/file_sys/registered_cache.h12
-rw-r--r--src/core/file_sys/vfs/vfs_layered.cpp6
-rw-r--r--src/core/hle/kernel/k_process.h4
-rw-r--r--src/core/hle/kernel/kernel.cpp7
-rw-r--r--src/core/hle/kernel/kernel.h2
-rw-r--r--src/core/hle/service/am/frontend/applet_web_browser_types.h4
-rw-r--r--src/core/hle/service/bcat/news/builtin_news.cpp4
-rw-r--r--src/core/hle/service/bcat/news/news_storage.h4
-rw-r--r--src/core/hle/service/caps/caps_manager.h4
-rw-r--r--src/core/hle/service/ldn/lan_discovery.h4
-rw-r--r--src/core/hle/service/lm/lm.cpp4
-rw-r--r--src/core/hle/service/nifm/nifm.cpp2
-rw-r--r--src/core/hle/service/nvdrv/core/container.h2
-rw-r--r--src/core/hle/service/nvdrv/core/nvmap.h4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_gpu.h2
-rw-r--r--src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h4
-rw-r--r--src/core/hle/service/nvdrv/devices/nvmap.h4
-rw-r--r--src/core/hle/service/nvdrv/nvdrv.h6
-rw-r--r--src/core/hle/service/nvnflinger/hos_binder_driver_server.h6
-rw-r--r--src/core/hle/service/olsc/daemon_controller.h10
-rw-r--r--src/core/hle/service/service.h6
-rw-r--r--src/core/hle/service/sm/sm.h6
-rw-r--r--src/core/hle/service/vi/conductor.h4
-rw-r--r--src/core/launch_timestamp_cache.cpp6
-rw-r--r--src/dynarmic/CMakeLists.txt1
-rw-r--r--src/dynarmic/CMakeModules/dynarmicConfig.cmake.in1
-rw-r--r--src/dynarmic/src/dynarmic/CMakeLists.txt1
-rw-r--r--src/dynarmic/src/dynarmic/backend/arm64/address_space.cpp2
-rw-r--r--src/dynarmic/src/dynarmic/backend/arm64/address_space.h11
-rw-r--r--src/dynarmic/src/dynarmic/backend/arm64/emit_arm64.h6
-rw-r--r--src/dynarmic/src/dynarmic/backend/arm64/fastmem.h4
-rw-r--r--src/dynarmic/src/dynarmic/backend/arm64/reg_alloc.h5
-rw-r--r--src/dynarmic/src/dynarmic/backend/block_range_information.cpp8
-rw-r--r--src/dynarmic/src/dynarmic/backend/block_range_information.h7
-rw-r--r--src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp4
-rw-r--r--src/dynarmic/src/dynarmic/backend/loongarch64/a32_address_space.h6
-rw-r--r--src/dynarmic/src/dynarmic/backend/loongarch64/reg_alloc.h2
-rw-r--r--src/dynarmic/src/dynarmic/backend/riscv64/a32_address_space.h6
-rw-r--r--src/dynarmic/src/dynarmic/backend/riscv64/reg_alloc.h2
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/a32_emit_x64.h13
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/a64_emit_x64.h13
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/constant_pool.h4
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/emit_x64.cpp5
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/emit_x64.h9
-rw-r--r--src/dynarmic/src/dynarmic/backend/x64/xbyak.h7
-rw-r--r--src/dynarmic/src/dynarmic/ir/opt_passes.cpp4
-rw-r--r--src/dynarmic/tests/A64/fibonacci.cpp4
-rw-r--r--src/dynarmic/tests/A64/testenv.h4
-rw-r--r--src/dynarmic/tests/CMakeLists.txt10
-rw-r--r--src/hid_core/frontend/emulated_console.h4
-rw-r--r--src/hid_core/frontend/emulated_controller.h4
-rw-r--r--src/hid_core/frontend/emulated_devices.h4
-rw-r--r--src/input_common/drivers/android.h2
-rw-r--r--src/input_common/drivers/sdl_driver.cpp2
-rw-r--r--src/input_common/drivers/sdl_driver.h4
-rw-r--r--src/input_common/input_engine.h14
-rw-r--r--src/input_common/main.h8
-rw-r--r--src/shader_recompiler/backend/spirv/spirv_emit_context.h4
-rw-r--r--src/shader_recompiler/environment.h8
-rw-r--r--src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp4
-rw-r--r--src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp2
-rw-r--r--src/shader_recompiler/ir_opt/texture_pass.cpp2
-rw-r--r--src/tests/common/fibers.cpp4
-rw-r--r--src/tests/video_core/memory_tracker.cpp4
-rw-r--r--src/video_core/buffer_cache/buffer_cache_base.h2
-rw-r--r--src/video_core/buffer_cache/memory_tracker_base.h4
-rw-r--r--src/video_core/control/channel_state_cache.h6
-rw-r--r--src/video_core/control/scheduler.h4
-rw-r--r--src/video_core/engines/maxwell_3d.h2
-rw-r--r--src/video_core/engines/sw_blitter/converter.cpp4
-rw-r--r--src/video_core/gpu.cpp2
-rw-r--r--src/video_core/gpu_logging/gpu_logging.h4
-rw-r--r--src/video_core/host1x/codecs/decoder.h2
-rw-r--r--src/video_core/host1x/host1x.h4
-rw-r--r--src/video_core/macro.h6
-rw-r--r--src/video_core/query_cache.h4
-rw-r--r--src/video_core/query_cache/query_cache.h2
-rw-r--r--src/video_core/query_cache/query_cache_base.h8
-rw-r--r--src/video_core/renderer_opengl/gl_buffer_cache.h4
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h6
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.h2
-rw-r--r--src/video_core/renderer_vulkan/vk_pipeline_cache.h6
-rw-r--r--src/video_core/renderer_vulkan/vk_query_cache.cpp8
-rw-r--r--src/video_core/renderer_vulkan/vk_render_pass_cache.cpp2
-rw-r--r--src/video_core/renderer_vulkan/vk_render_pass_cache.h4
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.h2
-rw-r--r--src/video_core/shader_cache.h6
-rw-r--r--src/video_core/shader_environment.h18
-rw-r--r--src/video_core/texture_cache/texture_cache.h4
-rw-r--r--src/video_core/texture_cache/texture_cache_base.h23
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp11
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h4
-rw-r--r--src/yuzu/configuration/input_profiles.h4
-rw-r--r--src/yuzu/loading_screen.cpp2
-rw-r--r--src/yuzu/loading_screen.h4
-rw-r--r--src/yuzu/multiplayer/chat_room.h7
118 files changed, 348 insertions, 340 deletions
diff --git a/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch b/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch
deleted file mode 100644
index f7d7c7ebe2..0000000000
--- a/.patch/unordered-dense/0001-avoid-memset-when-clearing-an-empty-table.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From b3622608433c183ba868a1dc8dd9cf285eb3b916 Mon Sep 17 00:00:00 2001
-From: Dario Petrillo <dario.pk1@gmail.com>
-Date: Thu, 27 Nov 2025 23:12:38 +0100
-Subject: [PATCH] avoid extra memset when clearing an empty table
-
----
- include/ankerl/unordered_dense.h | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/include/ankerl/unordered_dense.h b/include/ankerl/unordered_dense.h
-index 0835342..4938212 100644
---- a/include/ankerl/unordered_dense.h
-+++ b/include/ankerl/unordered_dense.h
-@@ -1490,8 +1490,10 @@ class table : public std::conditional_t<is_map_v<T>, base_table_type_map<T>, bas
- // modifiers //////////////////////////////////////////////////////////////
-
- void clear() {
-- m_values.clear();
-- clear_buckets();
-+ if (!empty()) {
-+ m_values.clear();
-+ clear_buckets();
-+ }
- }
-
- auto insert(value_type const& value) -> std::pair<iterator, bool> {
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbcdaccd0c..477e7c636d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -540,7 +540,6 @@ add_subdirectory(externals)
# pass targets from externals
# TODO(crueter): CPMUtil Propagate func?
find_package(enet)
-find_package(unordered_dense REQUIRED)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
find_package(xbyak)
diff --git a/cpmfile.json b/cpmfile.json
index 66b8ae89ab..ce6275fb99 100644
--- a/cpmfile.json
+++ b/cpmfile.json
@@ -301,17 +301,6 @@
"repo": "eden-emu/tzdb_to_nx",
"version": "230326"
},
- "unordered-dense": {
- "bundled": true,
- "find_args": "CONFIG",
- "hash": "d2106f6640f6bfb81755e4b8bfb64982e46ec4a507cacdb38f940123212ccf35a20b43c70c6f01d7bfb8c246d1a16f7845d8052971949cea9def1475e3fa02c8",
- "package": "unordered_dense",
- "patches": [
- "0001-avoid-memset-when-clearing-an-empty-table.patch"
- ],
- "repo": "martinus/unordered_dense",
- "version": "7b55cab841"
- },
"vulkan-headers": {
"hash": "d2846ea228415772645eea4b52a9efd33e6a563043dd3de059e798be6391a8f0ca089f455ae420ff22574939ed0f48ed7c6ff3d5a9987d5231dbf3b3f89b484b",
"min_version": "1.4.317",
diff --git a/docs/Deps.md b/docs/Deps.md
index 612e423d9f..ae526b2543 100644
--- a/docs/Deps.md
+++ b/docs/Deps.md
@@ -80,7 +80,6 @@ Certain other dependencies will be fetched by CPM regardless. System packages *c
* [httplib](https://github.com/yhirose/cpp-httplib) - if `ENABLE_UPDATE_CHECKER` or `ENABLE_WEB_SERVICE` are on
* This package is known to be broken on the AUR.
* [cpp-jwt](https://github.com/arun11299/cpp-jwt) 1.4+ - if `ENABLE_WEB_SERVICE` is on
-* [unordered-dense](https://github.com/martinus/unordered_dense)
On amd64:
@@ -119,7 +118,7 @@ Now, install all deps:
sudo emerge -a \
app-arch/lz4 app-arch/zstd app-arch/unzip \
dev-libs/libfmt dev-libs/libusb dev-libs/mcl dev-libs/sirit \
- dev-libs/unordered_dense dev-libs/boost dev-libs/openssl dev-libs/discord-rpc \
+ dev-libs/boost dev-libs/openssl dev-libs/discord-rpc \
dev-util/spirv-tools dev-util/spirv-headers dev-util/vulkan-headers \
dev-util/vulkan-utility-libraries dev-util/glslang \
media-gfx/renderdoc media-libs/libva media-libs/opus media-video/ffmpeg \
@@ -260,7 +259,7 @@ brew install molten-vk
<details>
<summary>FreeBSD</summary>
-As root run: `pkg install devel/cmake sdl3 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/qt6-charts devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib devel/unordered-dense vulkan-headers quazip-qt6`
+As root run: `pkg install devel/cmake sdl3 devel/boost-libs devel/catch2 devel/libfmt devel/nlohmann-json devel/ninja devel/nasm devel/autoconf devel/pkgconf devel/qt6-base devel/qt6-charts devel/simpleini net/enet multimedia/ffnvcodec-headers multimedia/ffmpeg audio/opus archivers/liblz4 lang/gcc12 graphics/glslang graphics/vulkan-utility-libraries graphics/spirv-tools www/cpp-httplib vulkan-headers quazip-qt6`
If using FreeBSD 12 or prior, use `devel/pkg-config` instead.
@@ -294,7 +293,7 @@ pkg_add cmake nasm git boost unzip--iconv autoconf-2.72p0 bash ffmpeg glslang gm
<summary>DragonFlyBSD</summary>
```sh
-pkg install gcc14 git cmake unzip nasm autoconf bash pkgconf ffmpeg glslang gmake jq nlohmann-json enet spirv-tools sdl3 vulkan-utility-libraries vulkan-headers catch2 libfmt openssl liblz4 boost-libs cpp-httplib qt6-base qt6-charts quazip-qt6 unordered-dense libva-vdpau-driver libva-utils libva-intel-driver
+pkg install gcc14 git cmake unzip nasm autoconf bash pkgconf ffmpeg glslang gmake jq nlohmann-json enet spirv-tools sdl3 vulkan-utility-libraries vulkan-headers catch2 libfmt openssl liblz4 boost-libs cpp-httplib qt6-base qt6-charts quazip-qt6 libva-vdpau-driver libva-utils libva-intel-driver
```
[Caveats](./Caveats.md#dragonflybsd).
@@ -328,7 +327,7 @@ sudo pkgin install git cmake autoconf build-essential libusb-1 nasm gcc13
```sh
BASE="git make autoconf libtool automake-wrapper jq patch"
-MINGW="qt6-base qt6-charts qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus libusb unordered_dense openssl SDL3"
+MINGW="qt6-base qt6-charts qt6-tools qt6-translations qt6-svg cmake toolchain clang python-pip openssl vulkan-memory-allocator vulkan-devel glslang boost fmt lz4 nlohmann-json zlib zstd enet opus libusb openssl SDL3"
# Either x86_64 or clang-aarch64 (Windows on ARM)
packages="$BASE"
for pkg in $MINGW; do
diff --git a/docs/dynarmic/README.md b/docs/dynarmic/README.md
index bfba7c9cb0..376e1f6b37 100644
--- a/docs/dynarmic/README.md
+++ b/docs/dynarmic/README.md
@@ -308,32 +308,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
-### unordered_dense
-
-```
-MIT License
-
-Copyright (c) 2022 Martin Leitner-Ankerl
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-```
-
### xbyak
```
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index f190f68b9d..e89a766106 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -58,9 +58,6 @@ if (WIN32 AND NOT TARGET LLVM::Demangle)
add_library(LLVM::Demangle ALIAS demangle)
endif()
-# unordered_dense
-AddJsonPackage(unordered-dense)
-
# httplib
if (IOS)
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF)
diff --git a/src/android/app/src/main/jni/game_metadata.cpp b/src/android/app/src/main/jni/game_metadata.cpp
index 0f23e4d2ac..49d92bca75 100644
--- a/src/android/app/src/main/jni/game_metadata.cpp
+++ b/src/android/app/src/main/jni/game_metadata.cpp
@@ -20,7 +20,7 @@ struct RomMetadata {
std::vector<u8> icon;
bool isHomebrew;
};
-static ankerl::unordered_dense::map<std::string, RomMetadata> m_rom_metadata_cache;
+static ::Common::unordered_map<std::string, RomMetadata> m_rom_metadata_cache;
static RomMetadata CacheRomMetadata(const std::string& path) {
auto& instance = EmulationSession::GetInstance();
diff --git a/src/android/app/src/main/jni/native_input.cpp b/src/android/app/src/main/jni/native_input.cpp
index 730d4f0a27..e05ab2f209 100644
--- a/src/android/app/src/main/jni/native_input.cpp
+++ b/src/android/app/src/main/jni/native_input.cpp
@@ -21,7 +21,7 @@
#include "input_common/drivers/virtual_gamepad.h"
#include "native.h"
-ankerl::unordered_dense::map<std::string, std::unique_ptr<AndroidConfig>> map_profiles;
+::Common::unordered_map<std::string, std::unique_ptr<AndroidConfig>> map_profiles;
bool IsHandheldOnly() {
const auto npad_style_set =
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 10e8cd0cc7..d90190e6a0 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -147,7 +147,8 @@ add_library(
cpu_features.cpp
cpu_features.h
httplib.h
- net/net.h net/net.cpp)
+ net/net.h net/net.cpp
+ container/unordered_map.h container/unordered_set.h)
if(WIN32)
target_sources(common PRIVATE windows/timer_resolution.cpp
@@ -241,7 +242,7 @@ if (lz4_ADDED)
target_include_directories(common PRIVATE ${lz4_SOURCE_DIR}/lib)
endif()
-target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads unordered_dense::unordered_dense)
+target_link_libraries(common PUBLIC fmt::fmt stb::headers Threads::Threads)
target_link_libraries(common PRIVATE lz4::lz4 zstd::zstd)
# Please refer to src/common/demangle.cpp
diff --git a/src/common/container/unordered_map.h b/src/common/container/unordered_map.h
new file mode 100644
index 0000000000..7d9e49fd80
--- /dev/null
+++ b/src/common/container/unordered_map.h
@@ -0,0 +1,16 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
+
+#include "common/container_hash.h"
+
+#include <boost/unordered/unordered_flat_map.hpp>
+
+namespace Common {
+
+template <class Key, class T, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>,
+ class Allocator = std::allocator<std::pair<const Key, T>>>
+using unordered_map = boost::unordered::unordered_flat_map<Key, T, Hash, Pred, Allocator>;
+
+}
diff --git a/src/common/container/unordered_set.h b/src/common/container/unordered_set.h
new file mode 100644
index 0000000000..54d71406a1
--- /dev/null
+++ b/src/common/container/unordered_set.h
@@ -0,0 +1,16 @@
+// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#pragma once
+
+#include "common/container_hash.h"
+
+#include <boost/unordered/unordered_flat_set.hpp>
+
+namespace Common {
+
+template <class Key, class Hash = std::hash<Key>, class Pred = std::equal_to<Key>,
+ class Allocator = std::allocator<Key>>
+using unordered_set = boost::unordered::unordered_flat_set<Key, Hash, Pred, Allocator>;
+
+}
diff --git a/src/common/container_hash.h b/src/common/container_hash.h
index b6d8e02e26..d7477f7e4f 100644
--- a/src/common/container_hash.h
+++ b/src/common/container_hash.h
@@ -10,8 +10,11 @@
#include <array>
#include <climits>
#include <cstdint>
+#include <functional>
#include <limits>
+#include <tuple>
#include <type_traits>
+#include <utility>
#include <vector>
namespace Common {
@@ -69,10 +72,17 @@ struct HashCombineImpl<64> {
} // namespace detail
template <typename T>
+ requires std::is_unsigned_v<T>
inline void HashCombine(std::size_t& seed, const T& v) {
seed = detail::HashCombineImpl<sizeof(std::size_t) * CHAR_BIT>::fn(seed, detail::HashValue(v));
}
+template <typename T>
+ requires (!std::is_unsigned_v<T>)
+inline void HashCombine(std::size_t& seed, const T& v) {
+ seed = detail::HashCombineImpl<sizeof(std::size_t) * CHAR_BIT>::fn(seed, std::hash<T>{}(v));
+}
+
template <typename It>
inline std::size_t HashRange(It first, It last) {
std::size_t seed = 0;
@@ -95,3 +105,26 @@ std::size_t HashValue(const std::vector<T, Allocator>& v) {
}
} // namespace Common
+
+namespace std {
+
+template <typename... Args>
+struct hash<std::tuple<Args...>> {
+ std::size_t operator()(const std::tuple<Args...>& t) const noexcept {
+ std::size_t seed = 0;
+ std::apply([&seed](const Args&... args) { (Common::HashCombine(seed, args), ...); }, t);
+ return seed;
+ }
+};
+
+template <class A, class B>
+struct hash<std::pair<A, B>> {
+ std::size_t operator()(const std::pair<A, B>& p) const noexcept {
+ std::size_t seed = 0;
+ Common::HashCombine(seed, p.first);
+ Common::HashCombine(seed, p.second);
+ return seed;
+ }
+};
+
+} // namespace std
diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp
index 9adf210ab7..b4c7eae343 100644
--- a/src/common/fs/path_util.cpp
+++ b/src/common/fs/path_util.cpp
@@ -7,7 +7,7 @@
#include <algorithm>
#include <iostream>
#include <sstream>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/assert.h"
#include "common/fs/fs.h"
@@ -196,8 +196,8 @@ private:
SetLegacyPathImpl(legacy_path, new_path);
}
- ankerl::unordered_dense::map<EdenPath, fs::path> eden_paths;
- ankerl::unordered_dense::map<EmuPath, fs::path> legacy_paths;
+ ::Common::unordered_map<EdenPath, fs::path> eden_paths;
+ ::Common::unordered_map<EmuPath, fs::path> legacy_paths;
};
bool ValidatePath(const fs::path& path) {
diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp
index 445d34c444..fa30b2c047 100644
--- a/src/common/host_memory.cpp
+++ b/src/common/host_memory.cpp
@@ -7,7 +7,7 @@
#ifdef _WIN32
#include <iterator>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/icl/separate_interval_set.hpp>
#include <windows.h>
#include "common/dynamic_library.h"
@@ -391,7 +391,7 @@ private:
std::mutex placeholder_mutex; ///< Mutex for placeholders
boost::icl::separate_interval_set<size_t> placeholders; ///< Mapped placeholders
- ankerl::unordered_dense::map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset
+ ::Common::unordered_map<size_t, size_t> placeholder_host_pointers; ///< Placeholder backing offset
};
#elif defined(__OPENORBIS__) || defined(__managarm__)
diff --git a/src/common/input.h b/src/common/input.h
index bd9b2d1656..514f93b494 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -9,7 +9,7 @@
#include <functional>
#include <memory>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include <vector>
#include "common/logging.h"
@@ -412,7 +412,7 @@ public:
namespace Impl {
template <typename InputDeviceType>
-using FactoryListType = ankerl::unordered_dense::map<std::string, std::shared_ptr<Factory<InputDeviceType>>>;
+using FactoryListType = ::Common::unordered_map<std::string, std::shared_ptr<Factory<InputDeviceType>>>;
template <typename InputDeviceType>
struct FactoryList {
diff --git a/src/common/param_package.h b/src/common/param_package.h
index 0216863a39..5561dc1b7b 100644
--- a/src/common/param_package.h
+++ b/src/common/param_package.h
@@ -8,14 +8,14 @@
#include <initializer_list>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
namespace Common {
/// A string-based key-value container supporting serializing to and deserializing from a string
class ParamPackage {
public:
- using DataType = ankerl::unordered_dense::map<std::string, std::string>;
+ using DataType = ::Common::unordered_map<std::string, std::string>;
ParamPackage() = default;
explicit ParamPackage(const std::string& serialized);
diff --git a/src/common/x64/xbyak.h b/src/common/x64/xbyak.h
index 5288c5184f..11d3e2b184 100644
--- a/src/common/x64/xbyak.h
+++ b/src/common/x64/xbyak.h
@@ -22,10 +22,11 @@
#endif
// You must ensure this matches with src/common/x64/xbyak.h on root dir
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <boost/unordered_map.hpp>
-#define XBYAK_STD_UNORDERED_SET ankerl::unordered_dense::set
-#define XBYAK_STD_UNORDERED_MAP ankerl::unordered_dense::map
+#define XBYAK_STD_UNORDERED_SET ::Common::unordered_set
+#define XBYAK_STD_UNORDERED_MAP ::Common::unordered_map
#define XBYAK_STD_UNORDERED_MULTIMAP boost::unordered_multimap
#include <xbyak/xbyak.h>
#include <xbyak/xbyak_util.h>
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.h b/src/core/arm/dynarmic/arm_dynarmic_64.h
index 6d0760986f..4c8570913f 100644
--- a/src/core/arm/dynarmic/arm_dynarmic_64.h
+++ b/src/core/arm/dynarmic/arm_dynarmic_64.h
@@ -8,7 +8,7 @@
#include <atomic>
#include <memory>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <dynarmic/interface/A64/a64.h>
#include <dynarmic/interface/code_page.h>
diff --git a/src/core/arm/nce/patcher.h b/src/core/arm/nce/patcher.h
index 04d8534351..a3b314000c 100644
--- a/src/core/arm/nce/patcher.h
+++ b/src/core/arm/nce/patcher.h
@@ -4,7 +4,7 @@
#pragma once
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include <oaknut/code_block.hpp>
#include <oaknut/oaknut.hpp>
@@ -46,7 +46,7 @@ enum class PatchMode : u32 {
using ModuleTextAddress = u64;
using PatchTextAddress = u64;
-using EntryTrampolines = ankerl::unordered_dense::map<ModuleTextAddress, PatchTextAddress>;
+using EntryTrampolines = ::Common::unordered_map<ModuleTextAddress, PatchTextAddress>;
class Patcher {
public:
diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp
index 7207fb9f7f..1df2f9dadd 100644
--- a/src/core/file_sys/ips_layer.cpp
+++ b/src/core/file_sys/ips_layer.cpp
@@ -8,7 +8,7 @@
#include <utility>
#include <span>
#include <cctype>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/hex_util.h"
#include "common/logging.h"
@@ -104,7 +104,7 @@ struct IPSwitchRecord {
size_t count;
};
struct IPSwitchCompiler::IPSwitchPatch {
- ankerl::unordered_dense::map<u32, IPSwitchRecord> records;
+ ::Common::unordered_map<u32, IPSwitchRecord> records;
bool enabled;
};
diff --git a/src/core/file_sys/registered_cache.cpp b/src/core/file_sys/registered_cache.cpp
index 83f5e265dd..ce851e4d38 100644
--- a/src/core/file_sys/registered_cache.cpp
+++ b/src/core/file_sys/registered_cache.cpp
@@ -566,7 +566,7 @@ VirtualFile RegisteredCache::GetFileAtID(NcaID id) const {
return file;
}
-static std::optional<NcaID> CheckMapForContentRecord(const ankerl::unordered_dense::map<u64, CNMT>& map, u64 title_id, ContentRecordType type) {
+static std::optional<NcaID> CheckMapForContentRecord(const ::Common::unordered_map<u64, CNMT>& map, u64 title_id, ContentRecordType type) {
auto cmnt_iter = map.find(title_id);
u8 id_offset = 0;
diff --git a/src/core/file_sys/registered_cache.h b/src/core/file_sys/registered_cache.h
index 0cc6cb56b4..a8e60ad470 100644
--- a/src/core/file_sys/registered_cache.h
+++ b/src/core/file_sys/registered_cache.h
@@ -12,7 +12,7 @@
#include <optional>
#include <string>
#include <vector>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/container/flat_map.hpp>
#include "common/common_types.h"
#include "core/crypto/key_manager.h"
@@ -209,11 +209,11 @@ private:
ContentProviderParsingFunction parser;
// maps tid -> NcaID of meta
- ankerl::unordered_dense::map<u64, NcaID> meta_id;
+ ::Common::unordered_map<u64, NcaID> meta_id;
// maps tid -> meta
- ankerl::unordered_dense::map<u64, CNMT> meta;
+ ::Common::unordered_map<u64, CNMT> meta;
// maps tid -> meta for CNMT in yuzu_meta
- ankerl::unordered_dense::map<u64, CNMT> yuzu_meta;
+ ::Common::unordered_map<u64, CNMT> yuzu_meta;
};
enum class ContentProviderUnionSlot {
@@ -313,8 +313,8 @@ private:
void ProcessXCI(const VirtualFile& file);
std::vector<VirtualDir> load_dirs;
- ankerl::unordered_dense::map<std::tuple<u64, ContentRecordType, TitleType>, VirtualFile> entries;
- ankerl::unordered_dense::map<u64, u32> versions;
+ ::Common::unordered_map<std::tuple<u64, ContentRecordType, TitleType>, VirtualFile> entries;
+ ::Common::unordered_map<u64, u32> versions;
std::vector<ExternalUpdateEntry> multi_version_entries;
};
diff --git a/src/core/file_sys/vfs/vfs_layered.cpp b/src/core/file_sys/vfs/vfs_layered.cpp
index 8dabe03e16..c650b45f4c 100644
--- a/src/core/file_sys/vfs/vfs_layered.cpp
+++ b/src/core/file_sys/vfs/vfs_layered.cpp
@@ -6,7 +6,7 @@
#include <algorithm>
#include <set>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
#include <utility>
#include "core/file_sys/vfs/vfs_layered.h"
@@ -63,7 +63,7 @@ std::string LayeredVfsDirectory::GetFullPath() const {
std::vector<VirtualFile> LayeredVfsDirectory::GetFiles() const {
std::vector<VirtualFile> out;
- ankerl::unordered_dense::set<std::string> out_names;
+ ::Common::unordered_set<std::string> out_names;
for (const auto& layer : dirs) {
for (auto& file : layer->GetFiles()) {
@@ -79,7 +79,7 @@ std::vector<VirtualFile> LayeredVfsDirectory::GetFiles() const {
std::vector<VirtualDir> LayeredVfsDirectory::GetSubdirectories() const {
std::vector<VirtualDir> out;
- ankerl::unordered_dense::set<std::string> out_names;
+ ::Common::unordered_set<std::string> out_names;
for (const auto& layer : dirs) {
for (const auto& sd : layer->GetSubdirectories()) {
diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h
index c861a9ea51..b5693751c3 100644
--- a/src/core/hle/kernel/k_process.h
+++ b/src/core/hle/kernel/k_process.h
@@ -78,7 +78,7 @@ private:
std::array<DebugWatchpoint, Core::Hardware::NUM_WATCHPOINTS> m_watchpoints{};
std::map<KProcessAddress, u64> m_debug_page_refcounts{};
#ifdef HAS_NCE
- ankerl::unordered_dense::map<u64, u64> m_post_handlers{};
+ ::Common::unordered_map<u64, u64> m_post_handlers{};
#endif
std::unique_ptr<Core::ExclusiveMonitor> m_exclusive_monitor;
Core::Memory::Memory m_memory;
@@ -494,7 +494,7 @@ public:
static void Switch(KernelCore& kernel, KProcess* cur_process, KProcess* next_process);
#ifdef HAS_NCE
- ankerl::unordered_dense::map<u64, u64>& GetPostHandlers() noexcept {
+ ::Common::unordered_map<u64, u64>& GetPostHandlers() noexcept {
return m_post_handlers;
}
#endif
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index a739e7020c..4f1d849209 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -10,7 +10,8 @@
#include <functional>
#include <memory>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <utility>
#include "common/assert.h"
@@ -792,8 +793,8 @@ struct KernelCore::Impl {
std::optional<KObjectNameGlobalData> object_name_global_data;
- ankerl::unordered_dense::set<KAutoObject*> registered_objects;
- ankerl::unordered_dense::set<KAutoObject*> registered_in_use_objects;
+ ::Common::unordered_set<KAutoObject*> registered_objects;
+ ::Common::unordered_set<KAutoObject*> registered_in_use_objects;
std::mutex server_lock;
std::vector<std::unique_ptr<Service::ServerManager>> server_managers;
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h
index 04790c8b38..2d44654f4d 100644
--- a/src/core/hle/kernel/kernel.h
+++ b/src/core/hle/kernel/kernel.h
@@ -11,7 +11,7 @@
#include <list>
#include <memory>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/polyfill_thread.h"
diff --git a/src/core/hle/service/am/frontend/applet_web_browser_types.h b/src/core/hle/service/am/frontend/applet_web_browser_types.h
index 3574568f6f..80e7fdb0bd 100644
--- a/src/core/hle/service/am/frontend/applet_web_browser_types.h
+++ b/src/core/hle/service/am/frontend/applet_web_browser_types.h
@@ -7,7 +7,7 @@
#pragma once
#include <array>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_funcs.h"
@@ -176,6 +176,6 @@ struct WebCommonReturnValue {
};
static_assert(sizeof(WebCommonReturnValue) == 0x1010, "WebCommonReturnValue has incorrect size.");
-using WebArgInputTLVMap = ankerl::unordered_dense::map<WebArgInputTLVType, std::vector<u8>>;
+using WebArgInputTLVMap = ::Common::unordered_map<WebArgInputTLVType, std::vector<u8>>;
} // namespace Service::AM::Frontend
diff --git a/src/core/hle/service/bcat/news/builtin_news.cpp b/src/core/hle/service/bcat/news/builtin_news.cpp
index 2a7756a155..bf4e989fb8 100644
--- a/src/core/hle/service/bcat/news/builtin_news.cpp
+++ b/src/core/hle/service/bcat/news/builtin_news.cpp
@@ -40,8 +40,8 @@ std::vector<u8> default_logo_small;
std::vector<u8> default_logo_large;
bool default_logos_loaded = false;
-ankerl::unordered_dense::map<std::string, std::vector<u8>> news_images_small;
-ankerl::unordered_dense::map<std::string, std::vector<u8>> news_images_large;
+::Common::unordered_map<std::string, std::vector<u8>> news_images_small;
+::Common::unordered_map<std::string, std::vector<u8>> news_images_large;
std::mutex images_mutex;
diff --git a/src/core/hle/service/bcat/news/news_storage.h b/src/core/hle/service/bcat/news/news_storage.h
index 531e2adb9a..3f5f366cc2 100644
--- a/src/core/hle/service/bcat/news/news_storage.h
+++ b/src/core/hle/service/bcat/news/news_storage.h
@@ -12,7 +12,7 @@
#include <optional>
#include <span>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -93,7 +93,7 @@ private:
static s64 Now();
mutable std::mutex mtx;
- ankerl::unordered_dense::map<std::string, StoredNews> items;
+ ::Common::unordered_map<std::string, StoredNews> items;
size_t open_counter{};
};
diff --git a/src/core/hle/service/caps/caps_manager.h b/src/core/hle/service/caps/caps_manager.h
index 22f5672e47..af2d22697b 100644
--- a/src/core/hle/service/caps/caps_manager.h
+++ b/src/core/hle/service/caps/caps_manager.h
@@ -6,7 +6,7 @@
#pragma once
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/fs/fs.h"
#include "core/hle/result.h"
@@ -88,7 +88,7 @@ private:
AlbumFileDateTime ConvertToAlbumDateTime(u64 posix_time) const;
bool is_mounted{};
- ankerl::unordered_dense::map<AlbumFileId, std::filesystem::path> album_files;
+ ::Common::unordered_map<AlbumFileId, std::filesystem::path> album_files;
Core::System& system;
};
diff --git a/src/core/hle/service/ldn/lan_discovery.h b/src/core/hle/service/ldn/lan_discovery.h
index fb24608ae1..5d0642bd0f 100644
--- a/src/core/hle/service/ldn/lan_discovery.h
+++ b/src/core/hle/service/ldn/lan_discovery.h
@@ -15,7 +15,7 @@
#include <random>
#include <span>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/logging.h"
#include "common/socket_types.h"
@@ -119,7 +119,7 @@ protected:
std::array<LanStation, StationCountMax> stations;
std::array<NodeLatestUpdate, NodeCountMax> node_changes{};
std::array<u8, NodeCountMax> node_last_states{};
- ankerl::unordered_dense::map<MacAddress, NetworkInfo, MACAddressHash> scan_results{};
+ ::Common::unordered_map<MacAddress, NetworkInfo, MACAddressHash> scan_results{};
NodeInfo node_info{};
NetworkInfo network_info{};
State state{State::None};
diff --git a/src/core/hle/service/lm/lm.cpp b/src/core/hle/service/lm/lm.cpp
index 1d9a610b30..d631a6dd80 100644
--- a/src/core/hle/service/lm/lm.cpp
+++ b/src/core/hle/service/lm/lm.cpp
@@ -7,7 +7,7 @@
#include <string>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/container_hash/hash.hpp>
#include "common/logging.h"
#include "core/core.h"
@@ -331,7 +331,7 @@ private:
};
static_assert(sizeof(LogPacketHeader) == 0x18, "LogPacketHeader is an invalid size");
- ankerl::unordered_dense::map<LogPacketHeaderEntry, std::vector<u8>> entries{};
+ ::Common::unordered_map<LogPacketHeaderEntry, std::vector<u8>> entries{};
LogDestination destination{LogDestination::All};
};
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp
index 4408abae4d..898b9ecfb2 100644
--- a/src/core/hle/service/nifm/nifm.cpp
+++ b/src/core/hle/service/nifm/nifm.cpp
@@ -23,7 +23,7 @@
#include <mutex>
#include <optional>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <common/settings.h>
#ifdef _WIN32
diff --git a/src/core/hle/service/nvdrv/core/container.h b/src/core/hle/service/nvdrv/core/container.h
index 62404e14a7..bc60636ac5 100644
--- a/src/core/hle/service/nvdrv/core/container.h
+++ b/src/core/hle/service/nvdrv/core/container.h
@@ -9,7 +9,7 @@
#include <deque>
#include <memory>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "core/device_memory_manager.h"
#include "core/hle/service/nvdrv/nvdata.h"
diff --git a/src/core/hle/service/nvdrv/core/nvmap.h b/src/core/hle/service/nvdrv/core/nvmap.h
index 17b9ccd1c7..98b1d5a6cc 100644
--- a/src/core/hle/service/nvdrv/core/nvmap.h
+++ b/src/core/hle/service/nvdrv/core/nvmap.h
@@ -12,7 +12,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <assert.h>
#include "common/bit_field.h"
@@ -161,7 +161,7 @@ private:
std::list<std::shared_ptr<Handle>> unmap_queue{};
std::mutex unmap_queue_lock{}; //!< Protects access to `unmap_queue`
- ankerl::unordered_dense::map<Handle::Id, std::shared_ptr<Handle>>
+ ::Common::unordered_map<Handle::Id, std::shared_ptr<Handle>>
handles{}; //!< Main owning map of handles
std::mutex handles_lock; //!< Protects access to `handles`
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
index b8ae57e1b4..b13b1c9efa 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_as_gpu.h
@@ -13,7 +13,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
#include <vector>
#include "common/address_space.h"
@@ -113,7 +113,7 @@ private:
};
static_assert(sizeof(IoctlRemapEntry) == 20, "IoctlRemapEntry is incorrect size");
- ankerl::unordered_dense::set<s64_le> map_buffer_offsets{};
+ ::Common::unordered_set<s64_le> map_buffer_offsets{};
struct IoctlMapBufferEx {
MappingFlags flags{}; // bit0: fixed_offset, bit2: cacheable
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
index c49aaa54a2..70a6b1bd68 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h
@@ -217,7 +217,7 @@ private:
NvCore::SyncpointManager& syncpoint_manager;
NvCore::NvMap& nvmap;
std::shared_ptr<Tegra::Control::ChannelState> channel_state;
- ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
+ ::Common::unordered_map<DeviceFD, NvCore::SessionId> sessions;
u32 channel_syncpoint;
std::mutex channel_mutex;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
index 8b3b7ee285..7c8d5e0eb1 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
+++ b/src/core/hle/service/nvdrv/devices/nvhost_nvdec_common.h
@@ -7,7 +7,7 @@
#pragma once
#include <deque>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -138,7 +138,7 @@ protected:
NvCore::NvMap& nvmap;
NvCore::ChannelType channel_type;
std::array<u32, MaxSyncPoints> device_syncpoints{};
- ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
+ ::Common::unordered_map<DeviceFD, NvCore::SessionId> sessions;
};
}; // namespace Devices
} // namespace Service::Nvidia
diff --git a/src/core/hle/service/nvdrv/devices/nvmap.h b/src/core/hle/service/nvdrv/devices/nvmap.h
index 19c5b479df..16ad8b3414 100644
--- a/src/core/hle/service/nvdrv/devices/nvmap.h
+++ b/src/core/hle/service/nvdrv/devices/nvmap.h
@@ -7,7 +7,7 @@
#pragma once
#include <memory>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_funcs.h"
#include "common/common_types.h"
@@ -118,7 +118,7 @@ private:
NvCore::Container& container;
NvCore::NvMap& file;
- ankerl::unordered_dense::map<DeviceFD, NvCore::SessionId> sessions;
+ ::Common::unordered_map<DeviceFD, NvCore::SessionId> sessions;
};
} // namespace Service::Nvidia::Devices
diff --git a/src/core/hle/service/nvdrv/nvdrv.h b/src/core/hle/service/nvdrv/nvdrv.h
index 329ac91c41..f503f108c3 100644
--- a/src/core/hle/service/nvdrv/nvdrv.h
+++ b/src/core/hle/service/nvdrv/nvdrv.h
@@ -12,7 +12,7 @@
#include <memory>
#include <span>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "core/hle/service/kernel_helpers.h"
@@ -103,7 +103,7 @@ private:
/// Id to use for the next open file descriptor.
DeviceFD next_fd = 1;
- using FilesContainerType = ankerl::unordered_dense::map<DeviceFD, std::shared_ptr<Devices::nvdevice>>;
+ using FilesContainerType = ::Common::unordered_map<DeviceFD, std::shared_ptr<Devices::nvdevice>>;
/// Mapping of file descriptors to the devices they reference.
FilesContainerType open_files;
@@ -111,7 +111,7 @@ private:
EventInterface events_interface;
- ankerl::unordered_dense::map<std::string, std::function<FilesContainerType::iterator(DeviceFD)>> builders;
+ ::Common::unordered_map<std::string, std::function<FilesContainerType::iterator(DeviceFD)>> builders;
};
void LoopProcess(Core::System& system);
diff --git a/src/core/hle/service/nvnflinger/hos_binder_driver_server.h b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
index b66f1776b0..d6ea945004 100644
--- a/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
+++ b/src/core/hle/service/nvnflinger/hos_binder_driver_server.h
@@ -8,7 +8,7 @@
#include <memory>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "core/hle/service/nvnflinger/binder.h"
@@ -39,8 +39,8 @@ private:
mutable std::mutex lock;
s32 last_id = 0;
- ankerl::unordered_dense::map<s32, std::shared_ptr<android::IBinder>> binders;
- ankerl::unordered_dense::map<s32, RefCounts> refcounts;
+ ::Common::unordered_map<s32, std::shared_ptr<android::IBinder>> binders;
+ ::Common::unordered_map<s32, RefCounts> refcounts;
};
} // namespace Service::Nvnflinger
diff --git a/src/core/hle/service/olsc/daemon_controller.h b/src/core/hle/service/olsc/daemon_controller.h
index 5f978ab153..70f3d9e235 100644
--- a/src/core/hle/service/olsc/daemon_controller.h
+++ b/src/core/hle/service/olsc/daemon_controller.h
@@ -6,7 +6,7 @@
#pragma once
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/uuid.h"
#include "core/hle/service/cmif_types.h"
@@ -56,10 +56,10 @@ private:
}
};
- ankerl::unordered_dense::map<AppKey, bool, AppKeyHash> app_auto_transfer_{};
- ankerl::unordered_dense::map<Common::UUID, bool> global_auto_upload_{};
- ankerl::unordered_dense::map<Common::UUID, bool> global_auto_download_{};
- ankerl::unordered_dense::map<AppKey, u8, AppKeyHash> autonomy_task_status_{};
+ ::Common::unordered_map<AppKey, bool, AppKeyHash> app_auto_transfer_{};
+ ::Common::unordered_map<Common::UUID, bool> global_auto_upload_{};
+ ::Common::unordered_map<Common::UUID, bool> global_auto_download_{};
+ ::Common::unordered_map<AppKey, u8, AppKeyHash> autonomy_task_status_{};
};
} // namespace Service::OLSC
diff --git a/src/core/hle/service/service.h b/src/core/hle/service/service.h
index e52a832a1e..df56b69847 100644
--- a/src/core/hle/service/service.h
+++ b/src/core/hle/service/service.h
@@ -8,7 +8,7 @@
#include <cstddef>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "core/hle/service/hle_ipc.h"
@@ -99,8 +99,8 @@ private:
void ReportUnimplementedFunction(HLERequestContext& ctx, const FunctionInfoBase* info);
protected:
- ankerl::unordered_dense::map<u32, FunctionInfoBase> handlers;
- ankerl::unordered_dense::map<u32, FunctionInfoBase> handlers_tipc;
+ ::Common::unordered_map<u32, FunctionInfoBase> handlers;
+ ::Common::unordered_map<u32, FunctionInfoBase> handlers_tipc;
/// Used to gain exclusive access to the service members, e.g. from CoreTiming thread.
std::mutex lock_service;
/// System context that the service operates under.
diff --git a/src/core/hle/service/sm/sm.h b/src/core/hle/service/sm/sm.h
index b566452ad7..c520a46fb2 100644
--- a/src/core/hle/service/sm/sm.h
+++ b/src/core/hle/service/sm/sm.h
@@ -10,7 +10,7 @@
#include <memory>
#include <mutex>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <concepts>
#include "core/hle/kernel/k_port.h"
@@ -100,8 +100,8 @@ private:
/// Map of registered services, retrieved using GetServicePort.
mutable std::mutex lock;
- ankerl::unordered_dense::map<std::string, SessionRequestHandlerFactory> registered_services;
- ankerl::unordered_dense::map<std::string, Kernel::KClientPort*> service_ports;
+ ::Common::unordered_map<std::string, SessionRequestHandlerFactory> registered_services;
+ ::Common::unordered_map<std::string, Kernel::KClientPort*> service_ports;
/// Kernel context
Kernel::KernelCore& kernel;
diff --git a/src/core/hle/service/vi/conductor.h b/src/core/hle/service/vi/conductor.h
index 7c93c230f7..fdccd48670 100644
--- a/src/core/hle/service/vi/conductor.h
+++ b/src/core/hle/service/vi/conductor.h
@@ -7,7 +7,7 @@
#pragma once
#include <memory>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "common/polyfill_thread.h"
@@ -49,7 +49,7 @@ private:
private:
Core::System& m_system;
Container& m_container;
- ankerl::unordered_dense::map<u64, VsyncManager> m_vsync_managers;
+ ::Common::unordered_map<u64, VsyncManager> m_vsync_managers;
std::shared_ptr<Core::Timing::EventType> m_event;
Common::Event m_signal;
std::jthread m_thread;
diff --git a/src/core/launch_timestamp_cache.cpp b/src/core/launch_timestamp_cache.cpp
index c58ffa1d5e..2b030f20b3 100644
--- a/src/core/launch_timestamp_cache.cpp
+++ b/src/core/launch_timestamp_cache.cpp
@@ -8,7 +8,7 @@
#include <mutex>
#include <sstream>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <fmt/format.h>
#include <nlohmann/json.hpp>
@@ -21,8 +21,8 @@
namespace Core::LaunchTimestampCache {
namespace {
-using CacheMap = ankerl::unordered_dense::map<u64, s64>;
-using CountMap = ankerl::unordered_dense::map<u64, u64>;
+using CacheMap = ::Common::unordered_map<u64, s64>;
+using CountMap = ::Common::unordered_map<u64, u64>;
std::mutex g_mutex;
CacheMap g_cache;
diff --git a/src/dynarmic/CMakeLists.txt b/src/dynarmic/CMakeLists.txt
index d733dc6a09..bacbd7ab57 100644
--- a/src/dynarmic/CMakeLists.txt
+++ b/src/dynarmic/CMakeLists.txt
@@ -120,7 +120,6 @@ if (NOT Boost_FOUND)
endif()
find_package(fmt 8 CONFIG)
-find_package(unordered_dense REQUIRED)
if ("arm64" IN_LIST ARCHITECTURE OR DYNARMIC_TESTS)
find_package(oaknut 2.0.1 CONFIG)
diff --git a/src/dynarmic/CMakeModules/dynarmicConfig.cmake.in b/src/dynarmic/CMakeModules/dynarmicConfig.cmake.in
index ce14607c89..baa1db7c45 100644
--- a/src/dynarmic/CMakeModules/dynarmicConfig.cmake.in
+++ b/src/dynarmic/CMakeModules/dynarmicConfig.cmake.in
@@ -8,7 +8,6 @@ if (NOT @BUILD_SHARED_LIBS@)
find_dependency(Boost 1.57)
find_dependency(fmt 9)
find_dependency(mcl 0.1.12 EXACT)
- find_dependency(unordered_dense)
if ("arm64" IN_LIST ARCHITECTURE)
find_dependency(oaknut 2.0.1)
diff --git a/src/dynarmic/src/dynarmic/CMakeLists.txt b/src/dynarmic/src/dynarmic/CMakeLists.txt
index ff5c4e7608..cc1cbcbe39 100644
--- a/src/dynarmic/src/dynarmic/CMakeLists.txt
+++ b/src/dynarmic/src/dynarmic/CMakeLists.txt
@@ -387,7 +387,6 @@ set_target_properties(dynarmic PROPERTIES
target_compile_options(dynarmic PRIVATE ${DYNARMIC_CXX_FLAGS})
-target_link_libraries(dynarmic PRIVATE unordered_dense::unordered_dense)
target_link_libraries(dynarmic PUBLIC fmt::fmt common)
if (BOOST_NO_HEADERS)
diff --git a/src/dynarmic/src/dynarmic/backend/arm64/address_space.cpp b/src/dynarmic/src/dynarmic/backend/arm64/address_space.cpp
index aa36119830..947c50f4c3 100644
--- a/src/dynarmic/src/dynarmic/backend/arm64/address_space.cpp
+++ b/src/dynarmic/src/dynarmic/backend/arm64/address_space.cpp
@@ -75,7 +75,7 @@ CodePtr AddressSpace::GetOrEmit(IR::LocationDescriptor descriptor) {
return block_info.entry_point;
}
-void AddressSpace::InvalidateBasicBlocks(const ankerl::unordered_dense::set<IR::LocationDescriptor>& descriptors) {
+void AddressSpace::InvalidateBasicBlocks(const ::Common::unordered_set<IR::LocationDescriptor>& descriptors) {
UnprotectCodeMemory();
for (const auto& descriptor : descriptors) {
diff --git a/src/dynarmic/src/dynarmic/backend/arm64/address_space.h b/src/dynarmic/src/dynarmic/backend/arm64/address_space.h
index fba199aefb..755b05bd02 100644
--- a/src/dynarmic/src/dynarmic/backend/arm64/address_space.h
+++ b/src/dynarmic/src/dynarmic/backend/arm64/address_space.h
@@ -14,7 +14,8 @@
#include "common/common_types.h"
#include <oaknut/code_block.hpp>
#include <oaknut/oaknut.hpp>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "dynarmic/backend/arm64/emit_arm64.h"
#include "dynarmic/backend/arm64/fastmem.h"
@@ -41,7 +42,7 @@ public:
CodePtr GetOrEmit(IR::LocationDescriptor descriptor);
- void InvalidateBasicBlocks(const ankerl::unordered_dense::set<IR::LocationDescriptor>& descriptors);
+ void InvalidateBasicBlocks(const ::Common::unordered_set<IR::LocationDescriptor>& descriptors);
void ClearCache();
protected:
@@ -76,9 +77,9 @@ protected:
// A IR::LocationDescriptor will have one current CodePtr.
// However, there can be multiple other CodePtrs which are older, previously invalidated blocks.
std::map<CodePtr, IR::LocationDescriptor> reverse_block_entries;
- ankerl::unordered_dense::map<IR::LocationDescriptor, CodePtr> block_entries;
- ankerl::unordered_dense::map<CodePtr, EmittedBlockInfo> block_infos;
- ankerl::unordered_dense::map<IR::LocationDescriptor, ankerl::unordered_dense::set<CodePtr>> block_references;
+ ::Common::unordered_map<IR::LocationDescriptor, CodePtr> block_entries;
+ ::Common::unordered_map<CodePtr, EmittedBlockInfo> block_infos;
+ ::Common::unordered_map<IR::LocationDescriptor, ::Common::unordered_set<CodePtr>> block_references;
ExceptionHandler exception_handler;
FastmemManager fastmem_manager;
diff --git a/src/dynarmic/src/dynarmic/backend/arm64/emit_arm64.h b/src/dynarmic/src/dynarmic/backend/arm64/emit_arm64.h
index fefbcd8f5a..f2c89bbfc0 100644
--- a/src/dynarmic/src/dynarmic/backend/arm64/emit_arm64.h
+++ b/src/dynarmic/src/dynarmic/backend/arm64/emit_arm64.h
@@ -14,7 +14,7 @@
#include <vector>
#include "common/common_types.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "dynarmic/backend/arm64/fastmem.h"
#include "dynarmic/interface/A32/coprocessor.h"
@@ -105,8 +105,8 @@ struct EmittedBlockInfo {
CodePtr entry_point;
std::size_t size;
std::vector<Relocation> relocations;
- ankerl::unordered_dense::map<IR::LocationDescriptor, std::vector<BlockRelocation>> block_relocations;
- ankerl::unordered_dense::map<std::ptrdiff_t, FastmemPatchInfo> fastmem_patch_info;
+ ::Common::unordered_map<IR::LocationDescriptor, std::vector<BlockRelocation>> block_relocations;
+ ::Common::unordered_map<std::ptrdiff_t, FastmemPatchInfo> fastmem_patch_info;
};
struct EmitConfig {
diff --git a/src/dynarmic/src/dynarmic/backend/arm64/fastmem.h b/src/dynarmic/src/dynarmic/backend/arm64/fastmem.h
index 83ce16d753..6947392325 100644
--- a/src/dynarmic/src/dynarmic/backend/arm64/fastmem.h
+++ b/src/dynarmic/src/dynarmic/backend/arm64/fastmem.h
@@ -10,7 +10,7 @@
#include <cstddef>
#include <tuple>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
#include "dynarmic/mcl/bit.hpp"
#include "common/common_types.h"
@@ -59,7 +59,7 @@ public:
private:
ExceptionHandler& exception_handler;
- ankerl::unordered_dense::set<DoNotFastmemMarker, DoNotFastmemMarkerHash> do_not_fastmem;
+ ::Common::unordered_set<DoNotFastmemMarker, DoNotFastmemMarkerHash> do_not_fastmem;
};
} // namespace Dynarmic::Backend::Arm64
diff --git a/src/dynarmic/src/dynarmic/backend/arm64/reg_alloc.h b/src/dynarmic/src/dynarmic/backend/arm64/reg_alloc.h
index af21cfbc25..93afcee0b2 100644
--- a/src/dynarmic/src/dynarmic/backend/arm64/reg_alloc.h
+++ b/src/dynarmic/src/dynarmic/backend/arm64/reg_alloc.h
@@ -18,7 +18,8 @@
#include "common/common_types.h"
#include "dynarmic/mcl/is_instance_of_template.hpp"
#include <oaknut/oaknut.hpp>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "dynarmic/backend/arm64/stack_layout.h"
#include "dynarmic/ir/cond.h"
@@ -336,7 +337,7 @@ private:
std::array<HostLocInfo, SpillCount> spills;
mutable std::size_t alloc_candidate_index = 0;
- ankerl::unordered_dense::set<const IR::Inst*> defined_insts;
+ ::Common::unordered_set<const IR::Inst*> defined_insts;
};
template<typename T>
diff --git a/src/dynarmic/src/dynarmic/backend/block_range_information.cpp b/src/dynarmic/src/dynarmic/backend/block_range_information.cpp
index bd7310194f..1a56b7adb6 100644
--- a/src/dynarmic/src/dynarmic/backend/block_range_information.cpp
+++ b/src/dynarmic/src/dynarmic/backend/block_range_information.cpp
@@ -11,13 +11,13 @@
#include <boost/icl/interval_map.hpp>
#include <boost/icl/interval_set.hpp>
#include "common/common_types.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
namespace Dynarmic::Backend {
template<typename P>
void BlockRangeInformation<P>::AddRange(boost::icl::discrete_interval<P> range, IR::LocationDescriptor location) {
- block_ranges.add(std::make_pair(range, ankerl::unordered_dense::set<IR::LocationDescriptor>{location}));
+ block_ranges.add(std::make_pair(range, ::Common::unordered_set<IR::LocationDescriptor>{location}));
}
template<typename P>
@@ -26,8 +26,8 @@ void BlockRangeInformation<P>::ClearCache() {
}
template<typename P>
-ankerl::unordered_dense::set<IR::LocationDescriptor> BlockRangeInformation<P>::InvalidateRanges(const boost::icl::interval_set<P>& ranges) {
- ankerl::unordered_dense::set<IR::LocationDescriptor> erase_locations;
+::Common::unordered_set<IR::LocationDescriptor> BlockRangeInformation<P>::InvalidateRanges(const boost::icl::interval_set<P>& ranges) {
+ ::Common::unordered_set<IR::LocationDescriptor> erase_locations;
for (auto invalidate_interval : ranges) {
auto pair = block_ranges.equal_range(invalidate_interval);
for (auto it = pair.first; it != pair.second; ++it)
diff --git a/src/dynarmic/src/dynarmic/backend/block_range_information.h b/src/dynarmic/src/dynarmic/backend/block_range_information.h
index 2af1a1120b..8f7daa9d9c 100644
--- a/src/dynarmic/src/dynarmic/backend/block_range_information.h
+++ b/src/dynarmic/src/dynarmic/backend/block_range_information.h
@@ -12,7 +12,8 @@
#include <boost/icl/interval_map.hpp>
#include <boost/icl/interval_set.hpp>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "dynarmic/ir/location_descriptor.h"
@@ -23,8 +24,8 @@ class BlockRangeInformation {
public:
void AddRange(boost::icl::discrete_interval<P> range, IR::LocationDescriptor location);
void ClearCache();
- ankerl::unordered_dense::set<IR::LocationDescriptor> InvalidateRanges(const boost::icl::interval_set<P>& ranges);
- boost::icl::interval_map<P, ankerl::unordered_dense::set<IR::LocationDescriptor>> block_ranges;
+ ::Common::unordered_set<IR::LocationDescriptor> InvalidateRanges(const boost::icl::interval_set<P>& ranges);
+ boost::icl::interval_map<P, ::Common::unordered_set<IR::LocationDescriptor>> block_ranges;
};
} // namespace Dynarmic::Backend
diff --git a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
index a64423581b..24a059aee2 100644
--- a/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
+++ b/src/dynarmic/src/dynarmic/backend/exception_handler_posix.cpp
@@ -17,7 +17,7 @@
#include <optional>
#include <shared_mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <fmt/format.h>
#include <sys/mman.h>
@@ -55,7 +55,7 @@ class SigHandler {
});
}
- ankerl::unordered_dense::map<u64, CodeBlockInfo> code_block_infos;
+ ::Common::unordered_map<u64, CodeBlockInfo> code_block_infos;
std::shared_mutex code_block_infos_mutex;
struct sigaction old_sa_segv;
struct sigaction old_sa_bus;
diff --git a/src/dynarmic/src/dynarmic/backend/loongarch64/a32_address_space.h b/src/dynarmic/src/dynarmic/backend/loongarch64/a32_address_space.h
index 55c4d8c5f3..efb8484810 100644
--- a/src/dynarmic/src/dynarmic/backend/loongarch64/a32_address_space.h
+++ b/src/dynarmic/src/dynarmic/backend/loongarch64/a32_address_space.h
@@ -4,7 +4,7 @@
#pragma once
#include "dynarmic/backend/loongarch64/lagoon_cpp.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "dynarmic/backend/loongarch64/code_block.h"
#include "dynarmic/backend/loongarch64/emit_loongarch64.h"
@@ -53,8 +53,8 @@ private:
const A32::UserConfig conf;
CodeBlock cb;
- ankerl::unordered_dense::map<u64, CodePtr> block_entries;
- ankerl::unordered_dense::map<u64, EmittedBlockInfo> block_infos;
+ ::Common::unordered_map<u64, CodePtr> block_entries;
+ ::Common::unordered_map<u64, EmittedBlockInfo> block_infos;
public:
struct PreludeInfo {
diff --git a/src/dynarmic/src/dynarmic/backend/loongarch64/reg_alloc.h b/src/dynarmic/src/dynarmic/backend/loongarch64/reg_alloc.h
index f3c5ff881b..56a0597484 100644
--- a/src/dynarmic/src/dynarmic/backend/loongarch64/reg_alloc.h
+++ b/src/dynarmic/src/dynarmic/backend/loongarch64/reg_alloc.h
@@ -9,7 +9,7 @@
#include <vector>
#include "dynarmic/backend/loongarch64/lagoon_cpp.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/assert.h"
#include "common/common_types.h"
diff --git a/src/dynarmic/src/dynarmic/backend/riscv64/a32_address_space.h b/src/dynarmic/src/dynarmic/backend/riscv64/a32_address_space.h
index e882a9e2e6..ca5a1d165d 100644
--- a/src/dynarmic/src/dynarmic/backend/riscv64/a32_address_space.h
+++ b/src/dynarmic/src/dynarmic/backend/riscv64/a32_address_space.h
@@ -9,7 +9,7 @@
#pragma once
#include <biscuit/assembler.hpp>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "dynarmic/backend/riscv64/code_block.h"
#include "dynarmic/backend/riscv64/emit_riscv64.h"
@@ -74,8 +74,8 @@ private:
CodeBlock cb;
biscuit::Assembler as;
- ankerl::unordered_dense::map<u64, CodePtr> block_entries;
- ankerl::unordered_dense::map<u64, EmittedBlockInfo> block_infos;
+ ::Common::unordered_map<u64, CodePtr> block_entries;
+ ::Common::unordered_map<u64, EmittedBlockInfo> block_infos;
struct PreludeInfo {
CodePtr end_of_prelude;
diff --git a/src/dynarmic/src/dynarmic/backend/riscv64/reg_alloc.h b/src/dynarmic/src/dynarmic/backend/riscv64/reg_alloc.h
index 5a0bd660de..8a70f284cb 100644
--- a/src/dynarmic/src/dynarmic/backend/riscv64/reg_alloc.h
+++ b/src/dynarmic/src/dynarmic/backend/riscv64/reg_alloc.h
@@ -19,7 +19,7 @@
#include "common/assert.h"
#include "common/common_types.h"
#include "dynarmic/mcl/is_instance_of_template.hpp"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "dynarmic/backend/riscv64/stack_layout.h"
#include "dynarmic/ir/cond.h"
diff --git a/src/dynarmic/src/dynarmic/backend/x64/a32_emit_x64.h b/src/dynarmic/src/dynarmic/backend/x64/a32_emit_x64.h
index 31b1271800..a106bb6482 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/a32_emit_x64.h
+++ b/src/dynarmic/src/dynarmic/backend/x64/a32_emit_x64.h
@@ -13,7 +13,8 @@
#include <set>
#include <tuple>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "dynarmic/backend/block_range_information.h"
#include "dynarmic/backend/x64/a32_jitstate.h"
@@ -126,11 +127,11 @@ public:
RegAlloc reg_alloc; //reusable reg alloc
BlockRangeInformation<u32> block_ranges;
std::array<FastDispatchEntry, fast_dispatch_table_size> fast_dispatch_table;
- ankerl::unordered_dense::map<u64, FastmemPatchInfo> fastmem_patch_info;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> read_fallbacks;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> write_fallbacks;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> exclusive_write_fallbacks;
- ankerl::unordered_dense::set<DoNotFastmemMarker> do_not_fastmem;
+ ::Common::unordered_map<u64, FastmemPatchInfo> fastmem_patch_info;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> read_fallbacks;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> write_fallbacks;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> exclusive_write_fallbacks;
+ ::Common::unordered_set<DoNotFastmemMarker> do_not_fastmem;
boost::container::stable_vector<Xbyak::Label> shared_labels;
void (*memory_read_128)() = nullptr; // Dummy
void (*memory_write_128)() = nullptr; // Dummy
diff --git a/src/dynarmic/src/dynarmic/backend/x64/a64_emit_x64.h b/src/dynarmic/src/dynarmic/backend/x64/a64_emit_x64.h
index 8800455813..1310b4ad34 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/a64_emit_x64.h
+++ b/src/dynarmic/src/dynarmic/backend/x64/a64_emit_x64.h
@@ -12,7 +12,8 @@
#include <map>
#include <optional>
#include <tuple>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <boost/container/static_vector.hpp>
#include "dynarmic/backend/block_range_information.h"
@@ -122,11 +123,11 @@ public:
RegAlloc reg_alloc; //reusable reg alloc
BlockRangeInformation<u64> block_ranges;
std::array<FastDispatchEntry, fast_dispatch_table_size> fast_dispatch_table;
- ankerl::unordered_dense::map<u64, FastmemPatchInfo> fastmem_patch_info;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> read_fallbacks;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> write_fallbacks;
- ankerl::unordered_dense::map<std::tuple<bool, size_t, int, int>, void (*)()> exclusive_write_fallbacks;
- ankerl::unordered_dense::set<DoNotFastmemMarker> do_not_fastmem;
+ ::Common::unordered_map<u64, FastmemPatchInfo> fastmem_patch_info;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> read_fallbacks;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> write_fallbacks;
+ ::Common::unordered_map<std::tuple<bool, size_t, int, int>, void (*)()> exclusive_write_fallbacks;
+ ::Common::unordered_set<DoNotFastmemMarker> do_not_fastmem;
boost::container::stable_vector<Xbyak::Label> shared_labels;
const void* terminal_handler_pop_rsb_hint = nullptr;
const void* terminal_handler_fast_dispatch_hint = nullptr;
diff --git a/src/dynarmic/src/dynarmic/backend/x64/constant_pool.h b/src/dynarmic/src/dynarmic/backend/x64/constant_pool.h
index 36b2ac633e..d3bad95d70 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/constant_pool.h
+++ b/src/dynarmic/src/dynarmic/backend/x64/constant_pool.h
@@ -14,7 +14,7 @@
#include <utility>
#include "common/common_types.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "dynarmic/backend/x64/xbyak.h"
namespace Dynarmic::Backend::X64 {
@@ -43,7 +43,7 @@ private:
}
};
- ankerl::unordered_dense::map<ConstantT, void*, ConstantHash> constant_info;
+ ::Common::unordered_map<ConstantT, void*, ConstantHash> constant_info;
std::span<ConstantT> pool;
std::size_t insertion_point;
};
diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64.cpp b/src/dynarmic/src/dynarmic/backend/x64/emit_x64.cpp
index 3d28365b1c..b9df3987ca 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64.cpp
+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64.cpp
@@ -14,7 +14,8 @@
#include <boost/variant/detail/apply_visitor_binary.hpp>
#include "dynarmic/mcl/bit.hpp"
#include "common/common_types.h"
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "dynarmic/backend/x64/block_of_code.h"
#include "dynarmic/backend/x64/nzcv_util.h"
@@ -396,7 +397,7 @@ void EmitX64::ClearCache() {
PerfMapClear();
}
-void EmitX64::InvalidateBasicBlocks(const ankerl::unordered_dense::set<IR::LocationDescriptor>& locations) {
+void EmitX64::InvalidateBasicBlocks(const ::Common::unordered_set<IR::LocationDescriptor>& locations) {
code.EnableWriting();
for (const auto& descriptor : locations) {
if (auto const it = block_descriptors.find(descriptor); it != block_descriptors.end()) {
diff --git a/src/dynarmic/src/dynarmic/backend/x64/emit_x64.h b/src/dynarmic/src/dynarmic/backend/x64/emit_x64.h
index 11494c2d3e..5e540e5f70 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/emit_x64.h
+++ b/src/dynarmic/src/dynarmic/backend/x64/emit_x64.h
@@ -16,7 +16,8 @@
#include <type_traits>
#include <vector>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <boost/container/stable_vector.hpp>
#include <boost/container/small_vector.hpp>
@@ -88,7 +89,7 @@ public:
virtual void ClearCache();
/// Invalidates a selection of basic blocks.
- void InvalidateBasicBlocks(const ankerl::unordered_dense::set<IR::LocationDescriptor>& locations);
+ void InvalidateBasicBlocks(const ::Common::unordered_set<IR::LocationDescriptor>& locations);
//protected:
// Microinstruction emitters
@@ -131,8 +132,8 @@ public:
// State
BlockOfCode& code;
ExceptionHandler exception_handler;
- ankerl::unordered_dense::map<IR::LocationDescriptor, BlockDescriptor> block_descriptors;
- ankerl::unordered_dense::map<IR::LocationDescriptor, PatchInformation> patch_information;
+ ::Common::unordered_map<IR::LocationDescriptor, BlockDescriptor> block_descriptors;
+ ::Common::unordered_map<IR::LocationDescriptor, PatchInformation> patch_information;
// We need materialized protected members
friend class A64EmitX64;
diff --git a/src/dynarmic/src/dynarmic/backend/x64/xbyak.h b/src/dynarmic/src/dynarmic/backend/x64/xbyak.h
index 38401678e6..9dc67f3778 100644
--- a/src/dynarmic/src/dynarmic/backend/x64/xbyak.h
+++ b/src/dynarmic/src/dynarmic/backend/x64/xbyak.h
@@ -4,10 +4,11 @@
#pragma once
// You must ensure this matches with src/common/x64/xbyak.h on root dir
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <boost/unordered_map.hpp>
-#define XBYAK_STD_UNORDERED_SET ankerl::unordered_dense::set
-#define XBYAK_STD_UNORDERED_MAP ankerl::unordered_dense::map
+#define XBYAK_STD_UNORDERED_SET ::Common::unordered_set
+#define XBYAK_STD_UNORDERED_MAP ::Common::unordered_map
#define XBYAK_STD_UNORDERED_MULTIMAP boost::unordered_multimap
#include <xbyak/xbyak.h>
#include <xbyak/xbyak_util.h>
diff --git a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp
index 2b972cbdf4..02b8e821da 100644
--- a/src/dynarmic/src/dynarmic/ir/opt_passes.cpp
+++ b/src/dynarmic/src/dynarmic/ir/opt_passes.cpp
@@ -11,7 +11,7 @@
#include <map>
#include <bit>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "boost/container/small_vector.hpp"
#include "dynarmic/frontend/A32/a32_ir_emitter.h"
#include "dynarmic/frontend/A32/a32_location_descriptor.h"
@@ -1433,7 +1433,7 @@ static void VerificationPass(const IR::Block& block) {
ASSERT(IR::AreTypesCompatible(t1, t2));
}
}
- ankerl::unordered_dense::map<IR::Inst*, size_t> actual_uses;
+ ::Common::unordered_map<IR::Inst*, size_t> actual_uses;
for (auto const& inst : block.instructions) {
for (size_t i = 0; i < inst.NumArgs(); i++)
if (IR::Value const arg = inst.GetArg(i); !arg.IsImmediate())
diff --git a/src/dynarmic/tests/A64/fibonacci.cpp b/src/dynarmic/tests/A64/fibonacci.cpp
index 12c4170f66..f52a04e217 100644
--- a/src/dynarmic/tests/A64/fibonacci.cpp
+++ b/src/dynarmic/tests/A64/fibonacci.cpp
@@ -8,7 +8,7 @@
#include <array>
#include <exception>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <catch2/catch_test_macros.hpp>
#include "common/common_types.h"
@@ -23,7 +23,7 @@ namespace {
class MyEnvironment final : public A64::UserCallbacks {
public:
u64 ticks_left = 0;
- ankerl::unordered_dense::map<u64, u8> memory{};
+ ::Common::unordered_map<u64, u8> memory{};
u8 MemoryRead8(u64 vaddr) override {
return memory[vaddr];
diff --git a/src/dynarmic/tests/A64/testenv.h b/src/dynarmic/tests/A64/testenv.h
index 1d260f5460..f4ddc63a6b 100644
--- a/src/dynarmic/tests/A64/testenv.h
+++ b/src/dynarmic/tests/A64/testenv.h
@@ -8,7 +8,7 @@
#pragma once
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/assert.h"
#include "common/common_types.h"
#include "dynarmic/interface/A64/a64.h"
@@ -17,7 +17,7 @@ using Vector = Dynarmic::A64::Vector;
class A64TestEnv : public Dynarmic::A64::UserCallbacks {
public:
- ankerl::unordered_dense::map<u64, u8> modified_memory;
+ ::Common::unordered_map<u64, u8> modified_memory;
std::vector<u32> code_mem;
u64 ticks_left = 0;
u64 code_mem_start_address = 0;
diff --git a/src/dynarmic/tests/CMakeLists.txt b/src/dynarmic/tests/CMakeLists.txt
index ca44dce593..15a77e4b5c 100644
--- a/src/dynarmic/tests/CMakeLists.txt
+++ b/src/dynarmic/tests/CMakeLists.txt
@@ -24,7 +24,7 @@ add_executable(dynarmic_tests
A64/real_world.cpp
A64/testenv.h
)
-target_link_libraries(dynarmic_tests PRIVATE merry::oaknut unordered_dense::unordered_dense)
+target_link_libraries(dynarmic_tests PRIVATE merry::oaknut)
if (DYNARMIC_TESTS_USE_UNICORN)
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
@@ -72,7 +72,7 @@ add_executable(dynarmic_print_info
print_info.cpp
)
create_target_directory_groups(dynarmic_print_info)
-target_link_libraries(dynarmic_print_info PRIVATE dynarmic fmt::fmt unordered_dense::unordered_dense)
+target_link_libraries(dynarmic_print_info PRIVATE dynarmic fmt::fmt)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic_print_info PRIVATE Boost::variant Boost::icl Boost::pool)
else()
@@ -93,7 +93,7 @@ add_executable(dynarmic_test_generator
create_target_directory_groups(dynarmic_test_generator)
-target_link_libraries(dynarmic_test_generator PRIVATE dynarmic fmt::fmt unordered_dense::unordered_dense)
+target_link_libraries(dynarmic_test_generator PRIVATE dynarmic fmt::fmt)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic_test_generator PRIVATE Boost::variant Boost::icl Boost::pool)
else()
@@ -110,7 +110,7 @@ add_executable(dynarmic_test_reader
test_reader.cpp
)
create_target_directory_groups(dynarmic_test_reader)
-target_link_libraries(dynarmic_test_reader PRIVATE dynarmic fmt::fmt unordered_dense::unordered_dense)
+target_link_libraries(dynarmic_test_reader PRIVATE dynarmic fmt::fmt)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic_test_reader PRIVATE Boost::variant Boost::icl Boost::pool)
else()
@@ -123,7 +123,7 @@ target_compile_definitions(dynarmic_test_reader PRIVATE FMT_USE_USER_DEFINED_LIT
#
create_target_directory_groups(dynarmic_tests)
-target_link_libraries(dynarmic_tests PRIVATE dynarmic Catch2::Catch2WithMain fmt::fmt unordered_dense::unordered_dense)
+target_link_libraries(dynarmic_tests PRIVATE dynarmic Catch2::Catch2WithMain fmt::fmt)
if (BOOST_NO_HEADERS)
target_link_libraries(dynarmic_tests PRIVATE Boost::variant Boost::icl Boost::pool)
else()
diff --git a/src/hid_core/frontend/emulated_console.h b/src/hid_core/frontend/emulated_console.h
index b8ce45f05c..ca7d7dd8fc 100644
--- a/src/hid_core/frontend/emulated_console.h
+++ b/src/hid_core/frontend/emulated_console.h
@@ -11,7 +11,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_funcs.h"
#include "common/common_types.h"
@@ -185,7 +185,7 @@ private:
mutable std::mutex mutex;
mutable std::mutex callback_mutex;
- ankerl::unordered_dense::map<int, ConsoleUpdateCallback> callback_list;
+ ::Common::unordered_map<int, ConsoleUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all console input
diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h
index bee8fb8b3e..d98ed3df3c 100644
--- a/src/hid_core/frontend/emulated_controller.h
+++ b/src/hid_core/frontend/emulated_controller.h
@@ -14,7 +14,7 @@
#include <vector>
#include <atomic>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "common/input.h"
@@ -636,7 +636,7 @@ private:
ControllerMotionDevices virtual_motion_devices;
mutable std::mutex callback_mutex;
- ankerl::unordered_dense::map<int, ControllerUpdateCallback> callback_list;
+ ::Common::unordered_map<int, ControllerUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all controller input
diff --git a/src/hid_core/frontend/emulated_devices.h b/src/hid_core/frontend/emulated_devices.h
index fb6c982a70..3d4ff4c148 100644
--- a/src/hid_core/frontend/emulated_devices.h
+++ b/src/hid_core/frontend/emulated_devices.h
@@ -10,7 +10,7 @@
#include <functional>
#include <memory>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -205,7 +205,7 @@ private:
mutable std::mutex mutex;
mutable std::mutex callback_mutex;
- ankerl::unordered_dense::map<int, InterfaceUpdateCallback> callback_list;
+ ::Common::unordered_map<int, InterfaceUpdateCallback> callback_list;
int last_callback_key = 0;
// Stores the current status of all external device input
diff --git a/src/input_common/drivers/android.h b/src/input_common/drivers/android.h
index 18678de602..c4663aec5c 100644
--- a/src/input_common/drivers/android.h
+++ b/src/input_common/drivers/android.h
@@ -90,7 +90,7 @@ public:
Common::Input::ButtonNames GetUIName(const Common::ParamPackage& params) const override;
private:
- ankerl::unordered_dense::map<PadIdentifier, jobject> input_devices;
+ ::Common::unordered_map<PadIdentifier, jobject> input_devices;
/// Returns the correct identifier corresponding to the player index
PadIdentifier GetIdentifier(const std::string& guid, size_t port) const;
diff --git a/src/input_common/drivers/sdl_driver.cpp b/src/input_common/drivers/sdl_driver.cpp
index dd7e8edc30..91589063b5 100644
--- a/src/input_common/drivers/sdl_driver.cpp
+++ b/src/input_common/drivers/sdl_driver.cpp
@@ -732,7 +732,7 @@ SDLDriver::~SDLDriver() {
std::vector<Common::ParamPackage> SDLDriver::GetInputDevices() const {
std::vector<Common::ParamPackage> devices;
- ankerl::unordered_dense::map<int, std::shared_ptr<SDLJoystick>> joycon_pairs;
+ ::Common::unordered_map<int, std::shared_ptr<SDLJoystick>> joycon_pairs;
for (const auto& [key, value] : joystick_map) {
for (const auto& joystick : value) {
if (!joystick->GetSDLJoystick()) {
diff --git a/src/input_common/drivers/sdl_driver.h b/src/input_common/drivers/sdl_driver.h
index bf4a45e83d..9a279e926f 100644
--- a/src/input_common/drivers/sdl_driver.h
+++ b/src/input_common/drivers/sdl_driver.h
@@ -9,7 +9,7 @@
#include <atomic>
#include <mutex>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <SDL3/SDL.h>
@@ -117,7 +117,7 @@ private:
Common::SPSCQueue<VibrationRequest> vibration_queue;
/// Map of GUID of a list of corresponding virtual Joysticks
- ankerl::unordered_dense::map<Common::UUID, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map;
+ ::Common::unordered_map<Common::UUID, std::vector<std::shared_ptr<SDLJoystick>>> joystick_map;
std::mutex joystick_map_mutex;
bool start_thread = false;
diff --git a/src/input_common/input_engine.h b/src/input_common/input_engine.h
index 7ad40027e4..3613219f56 100644
--- a/src/input_common/input_engine.h
+++ b/src/input_common/input_engine.h
@@ -8,7 +8,7 @@
#include <functional>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "common/input.h"
@@ -270,10 +270,10 @@ protected:
private:
struct ControllerData {
- ankerl::unordered_dense::map<int, bool> buttons;
- ankerl::unordered_dense::map<int, u8> hat_buttons;
- ankerl::unordered_dense::map<int, float> axes;
- ankerl::unordered_dense::map<int, BasicMotion> motions;
+ ::Common::unordered_map<int, bool> buttons;
+ ::Common::unordered_map<int, u8> hat_buttons;
+ ::Common::unordered_map<int, float> axes;
+ ::Common::unordered_map<int, BasicMotion> motions;
Common::Input::BatteryLevel battery{};
Common::Input::BodyColorStatus color{};
Common::Input::CameraStatus camera{};
@@ -301,8 +301,8 @@ private:
bool configuring{false};
const std::string input_engine;
int last_callback_key = 0;
- ankerl::unordered_dense::map<PadIdentifier, ControllerData> controller_list;
- ankerl::unordered_dense::map<int, InputIdentifier> callback_list;
+ ::Common::unordered_map<PadIdentifier, ControllerData> controller_list;
+ ::Common::unordered_map<int, InputIdentifier> callback_list;
MappingCallback mapping_callback;
};
diff --git a/src/input_common/main.h b/src/input_common/main.h
index d0e447ec2d..3b33ef30eb 100644
--- a/src/input_common/main.h
+++ b/src/input_common/main.h
@@ -8,7 +8,7 @@
#include <memory>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
namespace Common {
@@ -56,9 +56,9 @@ enum class InputType { None, Button, Stick, Motion, Touch };
* Given a ParamPackage for a Device returned from `GetInputDevices`, attempt to get the default
* mapping for the device.
*/
-using AnalogMapping = ankerl::unordered_dense::map<Settings::NativeAnalog::Values, Common::ParamPackage>;
-using ButtonMapping = ankerl::unordered_dense::map<Settings::NativeButton::Values, Common::ParamPackage>;
-using MotionMapping = ankerl::unordered_dense::map<Settings::NativeMotion::Values, Common::ParamPackage>;
+using AnalogMapping = ::Common::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>;
+using ButtonMapping = ::Common::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>;
+using MotionMapping = ::Common::unordered_map<Settings::NativeMotion::Values, Common::ParamPackage>;
class InputSubsystem {
public:
diff --git a/src/shader_recompiler/backend/spirv/spirv_emit_context.h b/src/shader_recompiler/backend/spirv/spirv_emit_context.h
index fb20966b67..7edc104708 100644
--- a/src/shader_recompiler/backend/spirv/spirv_emit_context.h
+++ b/src/shader_recompiler/backend/spirv/spirv_emit_context.h
@@ -9,7 +9,7 @@
#include <array>
#include <sirit/sirit.h>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
#include "shader_recompiler/backend/bindings.h"
#include "shader_recompiler/frontend/ir/program.h"
@@ -370,7 +370,7 @@ public:
Id load_const_func_u32x4{};
// Sirit::Id doesn't play nice with *::set<>
- ankerl::unordered_dense::set<u32> non_uniform_ids;
+ ::Common::unordered_set<u32> non_uniform_ids;
bool uses_nonuniform_sampled_image{};
bool uses_nonuniform_storage_image{};
diff --git a/src/shader_recompiler/environment.h b/src/shader_recompiler/environment.h
index 20381cf467..184b56ebf3 100644
--- a/src/shader_recompiler/environment.h
+++ b/src/shader_recompiler/environment.h
@@ -7,7 +7,7 @@
#pragma once
#include <array>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "shader_recompiler/program_header.h"
@@ -126,9 +126,9 @@ protected:
u32 start_address{};
bool is_proprietary_driver{};
public:
- ankerl::unordered_dense::map<CbufWordKey, u32, CbufWordKeyHash> cbuf_word_cache;
- ankerl::unordered_dense::map<HandleKey, u32, HandleKeyHash> handle_cache;
- ankerl::unordered_dense::map<const IR::Inst*, ConstBufferAddr> track_cache;
+ ::Common::unordered_map<CbufWordKey, u32, CbufWordKeyHash> cbuf_word_cache;
+ ::Common::unordered_map<HandleKey, u32, HandleKeyHash> handle_cache;
+ ::Common::unordered_map<const IR::Inst*, ConstBufferAddr> track_cache;
};
} // namespace Shader
diff --git a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
index 74d5b0872e..329d44443e 100644
--- a/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
+++ b/src/shader_recompiler/frontend/maxwell/structured_control_flow.cpp
@@ -7,7 +7,7 @@
#include <algorithm>
#include <memory>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include <vector>
@@ -390,7 +390,7 @@ private:
std::optional<Node> return_label) {
Statement* const false_stmt{pool.Create(Identity{}, IR::Condition{false}, &root_stmt)};
Tree& root{root_stmt.children};
- ankerl::unordered_dense::map<Flow::Block*, Node> local_labels;
+ ::Common::unordered_map<Flow::Block*, Node> local_labels;
local_labels.reserve(function.blocks.size());
for (Flow::Block& block : function.blocks) {
diff --git a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
index 2bde38a661..b5cd233992 100644
--- a/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
+++ b/src/shader_recompiler/ir_opt/ssa_rewrite_pass.cpp
@@ -19,7 +19,7 @@
#include <deque>
#include <map>
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <variant>
#include <vector>
diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp
index 0d0144fcab..fe34a67555 100644
--- a/src/shader_recompiler/ir_opt/texture_pass.cpp
+++ b/src/shader_recompiler/ir_opt/texture_pass.cpp
@@ -7,7 +7,7 @@
#include <algorithm>
#include <bit>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <tuple>
#include <limits>
#include <boost/container/small_vector.hpp>
diff --git a/src/tests/common/fibers.cpp b/src/tests/common/fibers.cpp
index ce17a5c52c..93f6cd4fdb 100644
--- a/src/tests/common/fibers.cpp
+++ b/src/tests/common/fibers.cpp
@@ -11,7 +11,7 @@
#include <mutex>
#include <stdexcept>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include <catch2/catch_test_macros.hpp>
@@ -39,7 +39,7 @@ public:
private:
mutable std::mutex mutex;
- ankerl::unordered_dense::map<std::thread::id, u32> ids;
+ ::Common::unordered_map<std::thread::id, u32> ids;
};
class TestControl1 {
diff --git a/src/tests/video_core/memory_tracker.cpp b/src/tests/video_core/memory_tracker.cpp
index 5fd8037446..c2236848b5 100644
--- a/src/tests/video_core/memory_tracker.cpp
+++ b/src/tests/video_core/memory_tracker.cpp
@@ -3,7 +3,7 @@
#include <memory>
#include <stdexcept>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <tuple>
#include <vector>
#include <optional>
@@ -65,7 +65,7 @@ public:
}
private:
- ankerl::unordered_dense::map<u64, int> page_table;
+ ::Common::unordered_map<u64, int> page_table;
std::vector<std::tuple<DAddr, u64, int>> calls;
size_t update_calls = 0;
};
diff --git a/src/video_core/buffer_cache/buffer_cache_base.h b/src/video_core/buffer_cache/buffer_cache_base.h
index 14ab3e6ebc..0a521192c6 100644
--- a/src/video_core/buffer_cache/buffer_cache_base.h
+++ b/src/video_core/buffer_cache/buffer_cache_base.h
@@ -16,7 +16,7 @@
#include <span>
#include <vector>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/container/static_vector.hpp>
#include <boost/container/small_vector.hpp>
diff --git a/src/video_core/buffer_cache/memory_tracker_base.h b/src/video_core/buffer_cache/memory_tracker_base.h
index 2c571271d6..b8547f3149 100644
--- a/src/video_core/buffer_cache/memory_tracker_base.h
+++ b/src/video_core/buffer_cache/memory_tracker_base.h
@@ -11,7 +11,7 @@
#include <deque>
#include <limits>
#include <type_traits>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_set.h"
#include <utility>
#include "common/alignment.h"
@@ -257,7 +257,7 @@ private:
std::array<Manager*, NUM_HIGH_PAGES> top_tier{};
std::deque<std::array<Manager, MANAGER_POOL_SIZE>> manager_pool;
std::deque<Manager*> free_managers;
- ankerl::unordered_dense::set<u32> cached_pages;
+ ::Common::unordered_set<u32> cached_pages;
DeviceTracker* device_tracker = nullptr;
};
diff --git a/src/video_core/control/channel_state_cache.h b/src/video_core/control/channel_state_cache.h
index f8b8abcac6..6d70e9be55 100644
--- a/src/video_core/control/channel_state_cache.h
+++ b/src/video_core/control/channel_state_cache.h
@@ -10,7 +10,7 @@
#include <limits>
#include <mutex>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -88,14 +88,14 @@ protected:
std::deque<P> channel_storage;
std::deque<size_t> free_channel_ids;
- ankerl::unordered_dense::map<s32, size_t> channel_map;
+ ::Common::unordered_map<s32, size_t> channel_map;
std::vector<size_t> active_channel_ids;
struct AddressSpaceRef {
size_t ref_count;
size_t storage_id;
Tegra::MemoryManager* gpu_memory;
};
- ankerl::unordered_dense::map<size_t, AddressSpaceRef> address_spaces;
+ ::Common::unordered_map<size_t, AddressSpaceRef> address_spaces;
mutable std::mutex config_mutex;
virtual void OnGPUASRegister([[maybe_unused]] size_t map_id) {}
diff --git a/src/video_core/control/scheduler.h b/src/video_core/control/scheduler.h
index fb9c583386..342bea5025 100644
--- a/src/video_core/control/scheduler.h
+++ b/src/video_core/control/scheduler.h
@@ -8,7 +8,7 @@
#include <memory>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "video_core/dma_pusher.h"
@@ -27,7 +27,7 @@ public:
void DeclareChannel(std::shared_ptr<ChannelState> new_channel);
private:
- ankerl::unordered_dense::map<s32, std::shared_ptr<ChannelState>> channels;
+ ::Common::unordered_map<s32, std::shared_ptr<ChannelState>> channels;
std::mutex scheduling_guard;
};
diff --git a/src/video_core/engines/maxwell_3d.h b/src/video_core/engines/maxwell_3d.h
index f09cf24ed3..0cab2ae986 100644
--- a/src/video_core/engines/maxwell_3d.h
+++ b/src/video_core/engines/maxwell_3d.h
@@ -3111,7 +3111,7 @@ public:
void SetHLEReplacementAttributeType(u32 bank, u32 offset, HLEReplacementAttributeType name);
- ankerl::unordered_dense::map<u64, HLEReplacementAttributeType> replace_table;
+ ::Common::unordered_map<u64, HLEReplacementAttributeType> replace_table;
static_assert(sizeof(Regs) == Regs::NUM_REGS * sizeof(u32), "Maxwell3D Regs has wrong size");
static_assert(std::is_trivially_copyable_v<Regs>, "Maxwell3D Regs must be trivially copyable");
diff --git a/src/video_core/engines/sw_blitter/converter.cpp b/src/video_core/engines/sw_blitter/converter.cpp
index 6682c96444..3aeaa11d10 100644
--- a/src/video_core/engines/sw_blitter/converter.cpp
+++ b/src/video_core/engines/sw_blitter/converter.cpp
@@ -7,7 +7,7 @@
#include <array>
#include <cmath>
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <bit>
#include <numeric>
#include "common/assert.h"
@@ -924,7 +924,7 @@ public:
};
struct ConverterFactory::ConverterFactoryImpl {
- ankerl::unordered_dense::map<RenderTargetFormat, std::unique_ptr<Converter>> converters_cache;
+ ::Common::unordered_map<RenderTargetFormat, std::unique_ptr<Converter>> converters_cache;
};
ConverterFactory::ConverterFactory() {
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp
index dbc7d43553..ff7dafb222 100644
--- a/src/video_core/gpu.cpp
+++ b/src/video_core/gpu.cpp
@@ -333,7 +333,7 @@ struct GPU::Impl {
std::unique_ptr<Core::Frontend::GraphicsContext> cpu_context;
Tegra::Control::Scheduler scheduler;
- ankerl::unordered_dense::map<s32, std::shared_ptr<Tegra::Control::ChannelState>> channels;
+ ::Common::unordered_map<s32, std::shared_ptr<Tegra::Control::ChannelState>> channels;
Tegra::Control::ChannelState* current_channel;
s32 bound_channel{-1};
diff --git a/src/video_core/gpu_logging/gpu_logging.h b/src/video_core/gpu_logging/gpu_logging.h
index b16988ed0b..5685e16bc7 100644
--- a/src/video_core/gpu_logging/gpu_logging.h
+++ b/src/video_core/gpu_logging/gpu_logging.h
@@ -10,7 +10,7 @@
#include <set>
#include <span>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -152,7 +152,7 @@ private:
mutable std::mutex ring_buffer_mutex;
// Memory tracking
- ankerl::unordered_dense::map<uintptr_t, MemoryAllocationEntry> memory_allocations;
+ ::Common::unordered_map<uintptr_t, MemoryAllocationEntry> memory_allocations;
mutable std::mutex memory_mutex;
// Statistics
diff --git a/src/video_core/host1x/codecs/decoder.h b/src/video_core/host1x/codecs/decoder.h
index 2cc6d8dce6..5b0d9ebe62 100644
--- a/src/video_core/host1x/codecs/decoder.h
+++ b/src/video_core/host1x/codecs/decoder.h
@@ -11,7 +11,7 @@
#include <optional>
#include <string_view>
#include <tuple>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <queue>
#include "common/common_types.h"
diff --git a/src/video_core/host1x/host1x.h b/src/video_core/host1x/host1x.h
index 592ec449e8..3b886a59d5 100644
--- a/src/video_core/host1x/host1x.h
+++ b/src/video_core/host1x/host1x.h
@@ -6,7 +6,7 @@
#pragma once
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <unordered_map>
#include <variant>
@@ -118,7 +118,7 @@ private:
}
std::mutex m_mutex{};
- ankerl::unordered_dense::map<s32, FrameDevice> m_frame_devices;
+ ::Common::unordered_map<s32, FrameDevice> m_frame_devices;
static constexpr size_t MAX_PRESENT_QUEUE = 100;
static constexpr size_t MAX_DECODE_MAP = 200;
diff --git a/src/video_core/macro.h b/src/video_core/macro.h
index 43b32ed920..90519a5429 100644
--- a/src/video_core/macro.h
+++ b/src/video_core/macro.h
@@ -10,7 +10,7 @@
#include <span>
#include <variant>
#include <vector>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/bit_field.h"
#include "common/common_types.h"
@@ -237,8 +237,8 @@ struct MacroEngine {
AnyCachedMacro program;
u64 hash{};
};
- ankerl::unordered_dense::map<u32, CacheInfo> macro_cache;
- ankerl::unordered_dense::map<u32, std::vector<u32>> uploaded_macro_code;
+ ::Common::unordered_map<u32, CacheInfo> macro_cache;
+ ::Common::unordered_map<u32, std::vector<u32>> uploaded_macro_code;
bool is_interpreted;
};
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h
index ebb87fe65a..55a68eb1e5 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -15,7 +15,7 @@
#include <memory>
#include <mutex>
#include <optional>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/assert.h"
@@ -350,7 +350,7 @@ private:
mutable std::recursive_mutex mutex;
- ankerl::unordered_dense::map<u64, std::vector<CachedQuery>> cached_queries;
+ ::Common::unordered_map<u64, std::vector<CachedQuery>> cached_queries;
std::array<CounterStream, VideoCore::NumQueryTypes> streams;
diff --git a/src/video_core/query_cache/query_cache.h b/src/video_core/query_cache/query_cache.h
index 50b662e0ad..5404dec943 100644
--- a/src/video_core/query_cache/query_cache.h
+++ b/src/video_core/query_cache/query_cache.h
@@ -10,7 +10,7 @@
#include <deque>
#include <memory>
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include "common/assert.h"
diff --git a/src/video_core/query_cache/query_cache_base.h b/src/video_core/query_cache/query_cache_base.h
index 242e24388f..d73e9039f7 100644
--- a/src/video_core/query_cache/query_cache_base.h
+++ b/src/video_core/query_cache/query_cache_base.h
@@ -10,7 +10,7 @@
#include <mutex>
#include <optional>
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include "common/assert.h"
@@ -155,12 +155,12 @@ protected:
const auto in_range2 = [&](const std::pair<u32, QueryLocation>& pair) {
return in_range(pair.first);
};
- std::erase_if(contents, in_range2);
+ erase_if(contents, in_range2);
}
}
}
- using ContentCache = ankerl::unordered_dense::map<u64, ankerl::unordered_dense::map<u32, QueryLocation>>;
+ using ContentCache = ::Common::unordered_map<u64, ::Common::unordered_map<u32, QueryLocation>>;
void InvalidateQuery(QueryLocation location);
bool IsQueryDirty(QueryLocation location);
@@ -168,7 +168,7 @@ protected:
void RequestGuestHostSync();
void UnregisterPending();
- ankerl::unordered_dense::map<u64, ankerl::unordered_dense::map<u32, QueryLocation>> cached_queries;
+ ::Common::unordered_map<u64, ::Common::unordered_map<u32, QueryLocation>> cached_queries;
std::mutex cache_mutex;
struct QueryCacheBaseImpl;
diff --git a/src/video_core/renderer_opengl/gl_buffer_cache.h b/src/video_core/renderer_opengl/gl_buffer_cache.h
index a0acfc48c1..09fa3a59af 100644
--- a/src/video_core/renderer_opengl/gl_buffer_cache.h
+++ b/src/video_core/renderer_opengl/gl_buffer_cache.h
@@ -8,7 +8,7 @@
#include <array>
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "video_core/buffer_cache/buffer_cache_base.h"
@@ -242,7 +242,7 @@ private:
u32 index_buffer_offset = 0;
u64 device_access_memory;
- ankerl::unordered_dense::map<GPUVAddr, OGLTransformFeedback> tfb_objects;
+ ::Common::unordered_map<GPUVAddr, OGLTransformFeedback> tfb_objects;
};
struct BufferCacheParams {
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index 02e54539fc..794b6773cb 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -7,7 +7,7 @@
#pragma once
#include <filesystem>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/common_types.h"
#include "common/thread_worker.h"
@@ -81,8 +81,8 @@ private:
GraphicsPipeline* current_pipeline{};
ShaderContext::ShaderPools main_pools;
- ankerl::unordered_dense::map<GraphicsPipelineKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
- ankerl::unordered_dense::map<ComputePipelineKey, std::unique_ptr<ComputePipeline>> compute_cache;
+ ::Common::unordered_map<GraphicsPipelineKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
+ ::Common::unordered_map<ComputePipelineKey, std::unique_ptr<ComputePipeline>> compute_cache;
Shader::Profile profile;
Shader::HostTranslateInfo host_info;
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h
index 8aed499bb7..8a830fa0c9 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.h
+++ b/src/video_core/renderer_opengl/gl_texture_cache.h
@@ -159,7 +159,7 @@ private:
UtilShaders util_shaders;
FormatConversionPass format_conversion_pass;
- std::array<ankerl::unordered_dense::map<GLenum, FormatProperties>, 3> format_properties;
+ std::array<::Common::unordered_map<GLenum, FormatProperties>, 3> format_properties;
bool has_broken_texture_view_formats = false;
OGLTexture null_image_1d_array;
diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.h b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
index 9d66b663f5..71dfb46e3d 100644
--- a/src/video_core/renderer_vulkan/vk_pipeline_cache.h
+++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.h
@@ -13,7 +13,7 @@
#include <filesystem>
#include <memory>
#include <type_traits>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -163,8 +163,8 @@ private:
GraphicsPipelineCacheKey graphics_key{};
GraphicsPipeline* current_pipeline{};
- ankerl::unordered_dense::map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache;
- ankerl::unordered_dense::map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
+ ::Common::unordered_map<ComputePipelineCacheKey, std::unique_ptr<ComputePipeline>> compute_cache;
+ ::Common::unordered_map<GraphicsPipelineCacheKey, std::unique_ptr<GraphicsPipeline>> graphics_cache;
ShaderPools main_pools;
diff --git a/src/video_core/renderer_vulkan/vk_query_cache.cpp b/src/video_core/renderer_vulkan/vk_query_cache.cpp
index a12dc00771..2b5aa24053 100644
--- a/src/video_core/renderer_vulkan/vk_query_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_query_cache.cpp
@@ -10,7 +10,7 @@
#include <memory>
#include <span>
#include <type_traits>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include <vector>
#include "video_core/renderer_vulkan/vk_texture_cache.h"
@@ -246,7 +246,7 @@ public:
sync_values_stash.emplace_back();
std::vector<HostSyncValues>* sync_values = &sync_values_stash.back();
sync_values->reserve(num_slots_used);
- ankerl::unordered_dense::map<size_t, std::pair<size_t, size_t>> offsets;
+ ::Common::unordered_map<size_t, std::pair<size_t, size_t>> offsets;
resolve_buffers.clear();
size_t resolve_buffer_index = ObtainBuffer<true>(num_slots_used);
resolve_buffers.push_back(resolve_buffer_index);
@@ -428,7 +428,7 @@ private:
template <bool is_ordered, typename Func>
void ApplyBanksWideOp(std::vector<size_t>& queries, Func&& func) {
std::conditional_t<is_ordered, std::map<size_t, std::pair<size_t, size_t>>,
- ankerl::unordered_dense::map<size_t, std::pair<size_t, size_t>>>
+ ::Common::unordered_map<size_t, std::pair<size_t, size_t>>>
indexer;
for (auto q : queries) {
auto* query = GetQuery(q);
@@ -757,7 +757,7 @@ public:
void SyncWrites() override {
CloseCounter();
- ankerl::unordered_dense::map<size_t, std::vector<HostSyncValues>> sync_values_stash;
+ ::Common::unordered_map<size_t, std::vector<HostSyncValues>> sync_values_stash;
for (auto q : pending_sync) {
auto* query = GetQuery(q);
if (True(query->flags & VideoCommon::QueryFlagBits::IsRewritten)) {
diff --git a/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp b/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
index 1846f1b3cc..4d8fa15d16 100644
--- a/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_render_pass_cache.cpp
@@ -4,7 +4,7 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/container/static_vector.hpp>
diff --git a/src/video_core/renderer_vulkan/vk_render_pass_cache.h b/src/video_core/renderer_vulkan/vk_render_pass_cache.h
index f9923be75a..0edad4639e 100644
--- a/src/video_core/renderer_vulkan/vk_render_pass_cache.h
+++ b/src/video_core/renderer_vulkan/vk_render_pass_cache.h
@@ -7,7 +7,7 @@
#pragma once
#include <mutex>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "common/container_hash.h"
#include "video_core/surface.h"
@@ -75,7 +75,7 @@ public:
private:
const Device* device{};
- ankerl::unordered_dense::map<RenderPassKey, vk::RenderPass> cache;
+ ::Common::unordered_map<RenderPassKey, vk::RenderPass> cache;
std::mutex mutex;
};
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h
index 1b1e35aa45..68bf2af991 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.h
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.h
@@ -186,7 +186,7 @@ public:
};
std::vector<MsaaScratchImage> msaa_scratch_images;
- ankerl::unordered_dense::map<VkImage, ResolveShadow> resolve_shadows;
+ ::Common::unordered_map<VkImage, ResolveShadow> resolve_shadows;
std::vector<std::pair<u64, ResolveShadow>> pending_resolve_shadows;
};
diff --git a/src/video_core/shader_cache.h b/src/video_core/shader_cache.h
index 7d93a542ef..997f2b0371 100644
--- a/src/video_core/shader_cache.h
+++ b/src/video_core/shader_cache.h
@@ -10,7 +10,7 @@
#include <memory>
#include <mutex>
#include <span>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <utility>
#include <vector>
@@ -148,8 +148,8 @@ private:
mutable std::mutex lookup_mutex;
std::mutex invalidation_mutex;
- ankerl::unordered_dense::map<u64, std::unique_ptr<Entry>> lookup_cache;
- ankerl::unordered_dense::map<u64, std::vector<Entry*>> invalidation_cache;
+ ::Common::unordered_map<u64, std::unique_ptr<Entry>> lookup_cache;
+ ::Common::unordered_map<u64, std::vector<Entry*>> invalidation_cache;
std::vector<std::unique_ptr<ShaderInfo>> storage;
std::vector<Entry*> marked_for_removal;
};
diff --git a/src/video_core/shader_environment.h b/src/video_core/shader_environment.h
index 95c6d72f89..924e61ef46 100644
--- a/src/video_core/shader_environment.h
+++ b/src/video_core/shader_environment.h
@@ -14,7 +14,7 @@
#include <optional>
#include <span>
#include <type_traits>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -79,10 +79,10 @@ protected:
GPUVAddr program_base{};
std::vector<u64> code;
- ankerl::unordered_dense::map<u32, Shader::TextureType> texture_types;
- ankerl::unordered_dense::map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
- ankerl::unordered_dense::map<u64, u32> cbuf_values;
- ankerl::unordered_dense::map<u64, Shader::ReplaceConstant> cbuf_replacements;
+ ::Common::unordered_map<u32, Shader::TextureType> texture_types;
+ ::Common::unordered_map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
+ ::Common::unordered_map<u64, u32> cbuf_values;
+ ::Common::unordered_map<u64, Shader::ReplaceConstant> cbuf_replacements;
u32 local_memory_size{};
u32 texture_bound{};
@@ -201,10 +201,10 @@ public:
private:
std::vector<u64> code;
- ankerl::unordered_dense::map<u32, Shader::TextureType> texture_types;
- ankerl::unordered_dense::map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
- ankerl::unordered_dense::map<u64, u32> cbuf_values;
- ankerl::unordered_dense::map<u64, Shader::ReplaceConstant> cbuf_replacements;
+ ::Common::unordered_map<u32, Shader::TextureType> texture_types;
+ ::Common::unordered_map<u32, Shader::TexturePixelFormat> texture_pixel_formats;
+ ::Common::unordered_map<u64, u32> cbuf_values;
+ ::Common::unordered_map<u64, Shader::ReplaceConstant> cbuf_replacements;
std::array<u32, 3> workgroup_size{};
u32 local_memory_size{};
u32 shared_memory_size{};
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index b6a37286a0..640bd38407 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -9,7 +9,7 @@
#include <limits>
#include <optional>
#include <bit>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <boost/container/small_vector.hpp>
#include "common/alignment.h"
@@ -2190,7 +2190,7 @@ void TextureCache<P>::UnregisterImage(ImageId image_id) {
image.flags &= ~ImageFlagBits::BadOverlap;
lru_cache.Free(image.lru_index);
const auto& clear_page_table =
- [image_id](u64 page, ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>& selected_page_table) {
+ [image_id](u64 page, ::Common::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>& selected_page_table) {
const auto page_it = selected_page_table.find(page);
if (page_it == selected_page_table.end()) {
ASSERT_MSG(false, "Unregistering unregistered page={:#x}", page << YUZU_PAGEBITS);
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h
index d143c1ef72..8a2318cc72 100644
--- a/src/video_core/texture_cache/texture_cache_base.h
+++ b/src/video_core/texture_cache/texture_cache_base.h
@@ -14,7 +14,8 @@
#include <type_traits>
// TODO: find out which don't require stable iters
#include <unordered_map>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <vector>
#include <boost/container/small_vector.hpp>
#include <boost/container/static_vector.hpp>
@@ -68,7 +69,7 @@ struct AsyncDecodeContext {
std::atomic_bool complete;
};
-using TextureCacheGPUMap = ankerl::unordered_dense::map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>;
+using TextureCacheGPUMap = ::Common::unordered_map<u64, std::vector<ImageId>, Common::IdentityHash<u64>>;
class TextureCacheChannelInfo : public ChannelInfo {
public:
@@ -86,8 +87,8 @@ public:
std::unordered_map<TICEntry, ImageViewId> image_views;
std::unordered_map<TSCEntry, SamplerId> samplers;
- ankerl::unordered_dense::map<u32, SamplerId> sampler_ids;
- ankerl::unordered_dense::map<u32, ImageViewId> image_view_ids;
+ ::Common::unordered_map<u32, SamplerId> sampler_ids;
+ ::Common::unordered_map<u32, ImageViewId> image_view_ids;
TextureCacheGPUMap* gpu_page_table = nullptr;
TextureCacheGPUMap* sparse_page_table = nullptr;
@@ -441,9 +442,9 @@ private:
FramebufferId last_framebuffer_id{};
u64 last_framebuffer_serial = 0;
- ankerl::unordered_dense::map<RenderTargets, FramebufferId> framebuffers;
- ankerl::unordered_dense::map<u64, std::vector<ImageMapId>, Common::IdentityHash<u64>> page_table;
- ankerl::unordered_dense::map<ImageId, boost::container::small_vector<ImageViewId, 16>> sparse_views;
+ ::Common::unordered_map<RenderTargets, FramebufferId> framebuffers;
+ ::Common::unordered_map<u64, std::vector<ImageMapId>, Common::IdentityHash<u64>> page_table;
+ ::Common::unordered_map<ImageId, boost::container::small_vector<ImageViewId, 16>> sparse_views;
DAddr virtual_invalid_space{};
@@ -499,7 +500,7 @@ private:
DelayedDestructionRing<ImageView, TICKS_TO_DESTROY> sentenced_image_view;
DelayedDestructionRing<Framebuffer, TICKS_TO_DESTROY> sentenced_framebuffers;
- ankerl::unordered_dense::map<GPUVAddr, ImageAllocId> image_allocs_table;
+ ::Common::unordered_map<GPUVAddr, ImageAllocId> image_allocs_table;
Common::ScratchBuffer<u8> swizzle_data_buffer;
Common::ScratchBuffer<u8> unswizzle_data_buffer;
@@ -516,17 +517,17 @@ private:
// Join caching
boost::container::small_vector<ImageId, 4> join_overlap_ids;
- ankerl::unordered_dense::set<ImageId> join_overlaps_found;
+ ::Common::unordered_set<ImageId> join_overlaps_found;
boost::container::small_vector<ImageId, 4> join_left_aliased_ids;
boost::container::small_vector<ImageId, 4> join_right_aliased_ids;
- ankerl::unordered_dense::set<ImageId> join_ignore_textures;
+ ::Common::unordered_set<ImageId> join_ignore_textures;
boost::container::small_vector<ImageId, 4> join_bad_overlap_ids;
struct JoinCopy {
bool is_alias;
ImageId id;
};
boost::container::small_vector<JoinCopy, 4> join_copies_to_do;
- ankerl::unordered_dense::map<ImageId, size_t> join_alias_indices;
+ ::Common::unordered_map<ImageId, size_t> join_alias_indices;
};
} // namespace VideoCommon
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index b2cfd2c01d..fb3a9c4e7a 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -11,7 +11,8 @@
#include <fstream>
#include <optional>
#include <thread>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include <utility>
#include <vector>
@@ -157,7 +158,7 @@ VkFormatFeatureFlags GetFormatFeatures(VkFormatProperties properties, FormatType
}
}
-ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(vk::PhysicalDevice physical) {
+::Common::unordered_map<VkFormat, VkFormatProperties> GetFormatProperties(vk::PhysicalDevice physical) {
static constexpr std::array formats{
VK_FORMAT_A1R5G5B5_UNORM_PACK16,
VK_FORMAT_A2B10G10R10_SINT_PACK32,
@@ -309,7 +310,7 @@ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(v
VK_FORMAT_EAC_R11G11_UNORM_BLOCK,
VK_FORMAT_EAC_R11G11_SNORM_BLOCK,
};
- ankerl::unordered_dense::map<VkFormat, VkFormatProperties> format_properties;
+ ::Common::unordered_map<VkFormat, VkFormatProperties> format_properties;
for (const auto format : formats) {
format_properties.emplace(format, physical.GetFormatProperties(format));
}
@@ -317,7 +318,7 @@ ankerl::unordered_dense::map<VkFormat, VkFormatProperties> GetFormatProperties(v
}
#if defined(__ANDROID__) && defined(ARCHITECTURE_arm64)
-void OverrideBcnFormats(ankerl::unordered_dense::map<VkFormat, VkFormatProperties>& format_properties) {
+void OverrideBcnFormats(::Common::unordered_map<VkFormat, VkFormatProperties>& format_properties) {
// These properties are extracted from Adreno driver 512.687.0
constexpr VkFormatFeatureFlags tiling_features{VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT |
VK_FORMAT_FEATURE_BLIT_SRC_BIT |
@@ -1676,7 +1677,7 @@ void Device::CollectToolingInfo() {
std::vector<VkDeviceQueueCreateInfo> Device::GetDeviceQueueCreateInfos() const {
static constexpr float QUEUE_PRIORITY = 1.0f;
- ankerl::unordered_dense::set<u32> unique_queue_families{graphics_family, present_family};
+ ::Common::unordered_set<u32> unique_queue_families{graphics_family, present_family};
std::vector<VkDeviceQueueCreateInfo> queue_cis;
queue_cis.reserve(unique_queue_families.size());
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index 319a7b2ec3..c53bd6443e 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -11,7 +11,7 @@
#include <set>
#include <span>
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include <vector>
#include "common/common_types.h"
@@ -1241,7 +1241,7 @@ private:
std::vector<size_t> valid_heap_memory; ///< Heaps used.
/// Format properties dictionary.
- ankerl::unordered_dense::map<VkFormat, VkFormatProperties> format_properties;
+ ::Common::unordered_map<VkFormat, VkFormatProperties> format_properties;
/// Nsight Aftermath GPU crash tracker
std::unique_ptr<NsightAftermathTracker> nsight_aftermath_tracker;
diff --git a/src/yuzu/configuration/input_profiles.h b/src/yuzu/configuration/input_profiles.h
index 326e7f9a1d..4ee7a266c4 100644
--- a/src/yuzu/configuration/input_profiles.h
+++ b/src/yuzu/configuration/input_profiles.h
@@ -7,7 +7,7 @@
#pragma once
#include <string>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "qt_common/config/qt_config.h"
@@ -35,5 +35,5 @@ public:
private:
bool ProfileExistsInMap(const std::string& profile_name) const;
- ankerl::unordered_dense::map<std::string, std::unique_ptr<QtConfig>> map_profiles;
+ ::Common::unordered_map<std::string, std::unique_ptr<QtConfig>> map_profiles;
};
diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp
index d67667a91d..495e5447ee 100644
--- a/src/yuzu/loading_screen.cpp
+++ b/src/yuzu/loading_screen.cpp
@@ -13,7 +13,7 @@
#include <QPixmap>
#include <QPropertyAnimation>
#include <QStyleOption>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
#include "core/frontend/framebuffer_layout.h"
#include "core/loader/loader.h"
#include "ui_loading_screen.h"
diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h
index a39d5f6605..2c71d85e55 100644
--- a/src/yuzu/loading_screen.h
+++ b/src/yuzu/loading_screen.h
@@ -80,8 +80,8 @@ private:
std::unique_ptr<QPropertyAnimation> fadeout_animation;
// Definitions for the differences in text and styling for each stage
- ankerl::unordered_dense::map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
- ankerl::unordered_dense::map<VideoCore::LoadCallbackStage, QString> stage_translations;
+ ::Common::unordered_map<VideoCore::LoadCallbackStage, const char*> progressbar_style;
+ ::Common::unordered_map<VideoCore::LoadCallbackStage, QString> stage_translations;
// newly generated shaders are added to the end of the file, so when loading and compiling
// shaders, it will start quickly but end slow if new shaders were added since previous launch.
diff --git a/src/yuzu/multiplayer/chat_room.h b/src/yuzu/multiplayer/chat_room.h
index 44ec8952d1..1ee87758d3 100644
--- a/src/yuzu/multiplayer/chat_room.h
+++ b/src/yuzu/multiplayer/chat_room.h
@@ -10,7 +10,8 @@
#include <QSortFilterProxyModel>
#include <QStandardItemModel>
#include <QVariant>
-#include <ankerl/unordered_dense.h>
+#include "common/container/unordered_map.h"
+#include "common/container/unordered_set.h"
#include "network/network.h"
namespace Ui {
@@ -65,8 +66,8 @@ private:
bool has_mod_perms = false;
QStandardItemModel* player_list;
std::unique_ptr<Ui::ChatRoom> ui;
- ankerl::unordered_dense::set<std::string> block_list;
- ankerl::unordered_dense::map<std::string, QPixmap> icon_cache;
+ ::Common::unordered_set<std::string> block_list;
+ ::Common::unordered_map<std::string, QPixmap> icon_cache;
};
Q_DECLARE_METATYPE(Network::ChatEntry);