summaryrefslogtreecommitdiff
path: root/src/memory-type-defs.hpp
blob: bc451600ddfed29ec78364c6a0e4dcae292c231d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 */