From 20e890964f5b711362cd04ba7334251f44e5ae4c Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Wed, 23 Sep 2026 00:21:51 +0100 Subject: [PATCH] Add hash table for default hasher --- src/base/hash/table/table.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/base/hash/table/table.h b/src/base/hash/table/table.h index 4ac5279..11ceec1 100644 --- a/src/base/hash/table/table.h +++ b/src/base/hash/table/table.h @@ -19,6 +19,7 @@ #define TABLE_H #include "../hasher/hasher.h" +#include "../hasher/murmur3.h" #include "../../array/array.h" #include "../../mem/allocator/mem_allocator.h" #include "../../stream/stream.h" @@ -29,11 +30,12 @@ BEGIN_C_LINKAGE #endif // !WP_PLATFORM_CPP -#define WP_HASH_TABLE_MAGIC wpU64Const(0x57504854424c) -#define WP_HASH_TAG_BITS wpU64Const(32) -#define WP_HASH_DIST_INC (wpU64Const(1) << WP_HASH_TAG_BITS) -#define WP_HASH_TAG_MASK (WP_HASH_DIST_INC - wpU64Const(1)) -#define WP_HASH_MAX_LOAD_FACTOR 0.65f +#define WP_HASH_TABLE_MAGIC wpU64Const(0x57504854424c) +#define WP_HASH_TAG_BITS wpU64Const(32) +#define WP_HASH_DIST_INC (wpU64Const(1) << WP_HASH_TAG_BITS) +#define WP_HASH_TAG_MASK (WP_HASH_DIST_INC - wpU64Const(1)) +#define WP_HASH_MAX_LOAD_FACTOR 0.65f +#define WP_HASH_TABLE_DEFAULT_HASHER wpX64Mur3Hasher() typedef WpU8Stream (*WpU8StreamEncoder)(void *data); typedef b8 (*WpKeyEqualTest)(void *a, void *b);