From c548499e68e473452592c9b0bf860f76bd8b94b8 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Fri, 30 Aug 2024 07:52:53 +0200 Subject: Added tool for checking new tables (and they are wrong) --- src/solvers/h48/map.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/solvers/h48/map.h') diff --git a/src/solvers/h48/map.h b/src/solvers/h48/map.h index 82e5a2c..0e9f926 100644 --- a/src/solvers/h48/map.h +++ b/src/solvers/h48/map.h @@ -1,6 +1,7 @@ #define MAP_UNSET UINT64_C(0xFFFFFFFFFFFFFFFF) #define MAP_KEYMASK UINT64_C(0xFFFFFFFFFF) #define MAP_KEYSHIFT UINT64_C(40) +#define MAP_UNSET_VAL (MAP_UNSET >> MAP_KEYSHIFT) typedef struct { uint64_t n; @@ -84,8 +85,8 @@ h48map_nextkvpair(h48map_t *map, uint64_t *p) kvpair_t kv; uint64_t pair; - kv.key = MAP_UNSET; - kv.val = MAP_UNSET; + kv.key = MAP_KEYMASK; + kv.val = MAP_UNSET_VAL; DBG_ASSERT(*p < map->capacity, kv, "Error looping over map: given index %" PRIu64 " is out of " -- cgit v1.3