xo-arena: DArenaHashMap: compiler nits after refactor

This commit is contained in:
Roland Conybeare 2026-01-08 18:37:18 -05:00
commit 63caccb8a7
2 changed files with 5 additions and 4 deletions

View file

@ -68,7 +68,7 @@ namespace xo {
struct HashMapStore : DArenaHashMapUtil { struct HashMapStore : DArenaHashMapUtil {
public: public:
using value_type = std::pair<const Key, Value>; using value_type = std::pair<const Key, Value>;
using group_type = detail::Group; using group_type = detail::ControlGroup;
public: public:
/** group_exp2: number of groups {x, 2^x} **/ /** group_exp2: number of groups {x, 2^x} **/
@ -264,7 +264,7 @@ namespace xo {
using key_hash = Hash; using key_hash = Hash;
using key_equal = Equal; using key_equal = Equal;
using byte = std::byte; using byte = std::byte;
using group_type = detail::Group; using group_type = detail::ControlGroup;
using store_type = detail::HashMapStore<Key, Value>; using store_type = detail::HashMapStore<Key, Value>;
using insert_value_type = std::pair<value_type *, bool>; using insert_value_type = std::pair<value_type *, bool>;
using iterator = detail::DArenaHashMapIterator<Key, Value>; using iterator = detail::DArenaHashMapIterator<Key, Value>;

View file

@ -17,10 +17,11 @@ namespace xo {
* *
* Support optimization using SIMD operations * Support optimization using SIMD operations
**/ **/
struct Group { struct ControlGroup {
std::array<uint8_t, DArenaHashMapUtil::c_group_size> ctrl_; std::array<uint8_t, DArenaHashMapUtil::c_group_size> ctrl_;
explicit Group(uint8_t * lo) { /** Require: lo is aligned on c_group_size (probably 16 bytes) **/
explicit ControlGroup(uint8_t * lo) {
::memcpy(ctrl_.data(), lo, DArenaHashMapUtil::c_group_size); ::memcpy(ctrl_.data(), lo, DArenaHashMapUtil::c_group_size);
} }