#include <robin_hash.h>
Public Types | |
using | distance_type = std::int16_t |
using | value_type = ValueType |
Public Member Functions | |
bucket_entry () noexcept | |
bucket_entry (bool last_bucket) noexcept | |
bucket_entry (bucket_entry &&other) noexcept(std::is_nothrow_move_constructible< value_type >::value) | |
bucket_entry (const bucket_entry &other) noexcept(std::is_nothrow_copy_constructible< value_type >::value) | |
void | clear () noexcept |
distance_type | dist_from_ideal_bucket () const noexcept |
bool | empty () const noexcept |
bool | last_bucket () const noexcept |
bucket_entry & | operator= (bucket_entry &&)=delete |
bucket_entry & | operator= (const bucket_entry &other) noexcept(std::is_nothrow_copy_constructible< value_type >::value) |
void | set_as_last_bucket () noexcept |
template<typename... Args> | |
void | set_value_of_empty_bucket (distance_type dist_from_ideal_bucket, truncated_hash_type hash, Args &&... value_type_args) |
void | swap_with_value_in_bucket (distance_type &dist_from_ideal_bucket, truncated_hash_type &hash, value_type &value) |
const value_type & | value () const noexcept |
value_type & | value () noexcept |
~bucket_entry () noexcept | |
Public Member Functions inherited from tsl::detail_robin_hash::bucket_entry_hash< StoreHash > | |
bool | bucket_hash_equal (std::size_t) const noexcept |
truncated_hash_type | truncated_hash () const noexcept |
Static Public Member Functions | |
static truncated_hash_type | truncate_hash (std::size_t hash) noexcept |
Static Public Attributes | |
static const distance_type | DIST_FROM_IDEAL_BUCKET_LIMIT = 8192 |
static const distance_type | EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET = -1 |
Private Types | |
using | bucket_hash = bucket_entry_hash< StoreHash > |
Private Member Functions | |
void | destroy_value () noexcept |
Private Attributes | |
distance_type | m_dist_from_ideal_bucket |
bool | m_last_bucket |
unsigned char | m_value [sizeof(value_type)] |
Additional Inherited Members | |
Protected Member Functions inherited from tsl::detail_robin_hash::bucket_entry_hash< StoreHash > | |
void | set_hash (truncated_hash_type) noexcept |
Each bucket entry has:
ValueType
.== 3,
dist_from_ideal_bucket()` will return 2 as the current value of the bucket is two buckets away from its ideal bucket) If there is no value in the bucket (i.e. empty()
is true) dist_from_ideal_bucket()
will be < 0.StoreHash
is true, 32 bits of the hash of the value, if any, are also stored in the bucket. If the size of the hash is more than 32 bits, it is truncated. We don't store the full hash as storing the hash is a potential opportunity to use the unused space due to the alignment of the bucket_entry structure. We can thus potentially store the hash without any extra space (which would not be possible with 64 bits of the hash). Definition at line 170 of file robin_hash.h.
|
private |
Definition at line 171 of file robin_hash.h.
using tsl::detail_robin_hash::bucket_entry< ValueType, StoreHash >::distance_type = std::int16_t |
Definition at line 175 of file robin_hash.h.
using tsl::detail_robin_hash::bucket_entry< ValueType, StoreHash >::value_type = ValueType |
Definition at line 174 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 177 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 184 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 191 of file robin_hash.h.
|
inlinenoexcept |
Never really used, but still necessary as we must call resize on an empty std::vector<bucket_entry>
. and we need to support move-only types. See robin_hash constructor for details.
Definition at line 209 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 242 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 244 of file robin_hash.h.
|
inlineprivatenoexcept |
Definition at line 322 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 275 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 251 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 279 of file robin_hash.h.
|
delete |
|
inlinenoexcept |
Definition at line 222 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 281 of file robin_hash.h.
|
inline |
Definition at line 284 of file robin_hash.h.
|
inline |
Definition at line 298 of file robin_hash.h.
|
inlinestaticnoexcept |
Definition at line 317 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 265 of file robin_hash.h.
|
inlinenoexcept |
Definition at line 255 of file robin_hash.h.
|
static |
Definition at line 329 of file robin_hash.h.
|
static |
Definition at line 328 of file robin_hash.h.
|
private |
Definition at line 333 of file robin_hash.h.
|
private |
Definition at line 337 of file robin_hash.h.
|
private |
Definition at line 338 of file robin_hash.h.