diff --git a/include/xo/arena/DArenaHashMap.hpp b/include/xo/arena/DArenaHashMap.hpp index 63741e6..2a51eaa 100644 --- a/include/xo/arena/DArenaHashMap.hpp +++ b/include/xo/arena/DArenaHashMap.hpp @@ -16,7 +16,7 @@ #include namespace xo { - namespace mm { + namespace map { #ifdef NOT_YET enum class insert_error : int32_t { /** sentinel **/ @@ -654,7 +654,7 @@ namespace xo { return true; } - } + } /*namespace map*/ } /*namespace xo*/ /* end DArenaHashMap.hpp */ diff --git a/include/xo/arena/hashmap/ControlGroup.hpp b/include/xo/arena/hashmap/ControlGroup.hpp index d5db66a..7d3a129 100644 --- a/include/xo/arena/hashmap/ControlGroup.hpp +++ b/include/xo/arena/hashmap/ControlGroup.hpp @@ -11,7 +11,7 @@ #include namespace xo { - namespace mm { + namespace map { namespace detail { /** @brief 16x 8-bit control bytes. * @@ -77,7 +77,7 @@ namespace xo { #endif }; } - } /*namespace mm*/ + } /*namespace map*/ } /*namespace xo*/ /* end ControlGroup.hpp */ diff --git a/include/xo/arena/hashmap/DArenaHashMapIterator.hpp b/include/xo/arena/hashmap/DArenaHashMapIterator.hpp index 285e449..57573b4 100644 --- a/include/xo/arena/hashmap/DArenaHashMapIterator.hpp +++ b/include/xo/arena/hashmap/DArenaHashMapIterator.hpp @@ -8,7 +8,7 @@ #include "hashmap/DArenaHashMapUtil.hpp" namespace xo { - namespace mm { + namespace map { namespace detail { template namespace xo { - namespace mm { + namespace map { /** @class DArenaHashMapUtil * * @pre @@ -103,7 +103,7 @@ namespace xo { return std::make_pair(ngx, ng);; } }; - } /*namespace mm*/ + } /*namespace map*/ } /*namespace xo*/ /* end DArenaHashMapUtil.hpp */ diff --git a/include/xo/arena/hashmap/HashMapStore.hpp b/include/xo/arena/hashmap/HashMapStore.hpp index 130f4f5..545aa1c 100644 --- a/include/xo/arena/hashmap/HashMapStore.hpp +++ b/include/xo/arena/hashmap/HashMapStore.hpp @@ -9,7 +9,7 @@ #include "hashmap/ControlGroup.hpp" namespace xo { - namespace mm { + namespace map { namespace detail { template @@ -17,6 +17,8 @@ namespace xo { public: using value_type = std::pair; using group_type = detail::ControlGroup; + using control_vector_type = xo::mm::DArenaVector; + using slot_vector_type = xo::mm::DArenaVector; public: /** group_exp2: number of groups {x, 2^x} **/ @@ -26,8 +28,8 @@ namespace xo { n_group_exponent_{group_exp2.first}, n_group_{group_exp2.second}, n_slot_{group_exp2.second * c_group_size}, - control_{DArenaVector::map(ArenaConfig{.size_ = control_size(n_slot_)})}, - slots_{DArenaVector::map(ArenaConfig{.size_ = n_slot_ * sizeof(value_type)})} + control_{control_vector_type::map(xo::mm::ArenaConfig{.size_ = control_size(n_slot_)})}, + slots_{slot_vector_type::map(xo::mm::ArenaConfig{.size_ = n_slot_ * sizeof(value_type)})} { /* here: arenas have allocated address range, but no committed memory yet */ @@ -121,12 +123,12 @@ namespace xo { /** control_[] partitioned into groups of * c_group_size (16) consecutive elements **/ - DArenaVector control_; + control_vector_type control_; /** slots_[] holds {key,value} pairs **/ - DArenaVector slots_; + slot_vector_type slots_; }; } - } /*namespace mm*/ + } /*namespace map*/ } /*namespace xo*/ /* end HashMapStore.hpp */ diff --git a/utest/DArenaHashMap.test.cpp b/utest/DArenaHashMap.test.cpp index 757cd39..088edf2 100644 --- a/utest/DArenaHashMap.test.cpp +++ b/utest/DArenaHashMap.test.cpp @@ -11,8 +11,8 @@ #include namespace xo { - using xo::mm::DArenaHashMapUtil; - using xo::mm::DArenaHashMap; + using xo::map::DArenaHashMapUtil; + using xo::map::DArenaHashMap; using xo::rng::random_seed; using xo::rng::xoshiro256ss; using utest::UtestTools;