43 #ifndef FIXEDSIZEHASHTABLE_H_INCLUDED
44 #define FIXEDSIZEHASHTABLE_H_INCLUDED
55 return val ? ((
set_lsbs(val - 1) << 1) | 1) : 0;
68 #pragma warning(suppress : 4293)
77 template <
typename K,
typename V,
typename hashFunc =
typename std::hash<K>,
size_t log2_buckets = 16>
101 for (
size_t i = 0; i < (1 << log2_buckets); i++)
109 for (
size_t i = 0; i < (1 << log2_buckets); i++)
117 pool.deallocate(del);
127 size_t bucket_size = 0;
129 size_t hk =
hash(key);
135 if ((*ptr)->key == key)
162 size_t hk =
hash(key);
168 if ((*ptr)->key == key)
173 pool.deallocate(del);
182 size_t hk =
hash(key);
186 if ((*ptr)->key == key)
194 const V *
find(
const K &key)
const
196 size_t hk =
hash(key);
200 if ((*ptr)->key == key)
Entry(const Entry &)=delete
Entry & operator=(const Entry &)=delete
Entry & operator=(Entry &&)=delete
Entry(const K &key, const V &val)
etiss_del_como(FixedSizeHashMap) V *insert(const K &key
Entry * map[1<< log2_buckets]
const V * find(const K &key) const
etiss::ObjectPool< Entry > pool
prealloc_inc defines the number of objects that is availabe within ObjectPools memory; default: 100
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
CONSTEXPR size_t set_lsbs(size_t val)
void log(Verbosity level, std::string msg)
write log message at the given level.
__INTPTR_TYPE__ intptr_t
A signed integer type with the property that any valid pointer to void can be converted to this type,...
size_t operator()(const K *const &k_) const