diff options
Diffstat (limited to 'src/memory-type-defs.hpp')
| -rw-r--r-- | src/memory-type-defs.hpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/memory-type-defs.hpp b/src/memory-type-defs.hpp index fea8b36..bc45160 100644 --- a/src/memory-type-defs.hpp +++ b/src/memory-type-defs.hpp @@ -1,6 +1,22 @@ #ifndef PKE_MEMORY_TYPE_DEFS_HPP #define PKE_MEMORY_TYPE_DEFS_HPP +#include <cstdint> + +struct PkeHandle { + union { + struct { + uint32_t bucketIndex; + uint32_t itemIndex; + }; + uint64_t hash = 0xFFFFFFFFFFFFFFFF; + }; +}; + +constexpr bool operator==(const PkeHandle &a, const PkeHandle &b) { + return a.hash == b.hash; +} + struct MemBucket; #endif /* PKE_MEMORY_TYPE_DEFS_HPP */ |
