CernVM-FS
2.12.0
|
#include <compat.h>
Public Types | |
typedef SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > | Base |
Public Member Functions | |
SmallHashDynamic () | |
SmallHashDynamic (const SmallHashDynamic< Key, Value > &other) | |
SmallHashDynamic< Key, Value > & | operator= (const SmallHashDynamic< Key, Value > &other) |
uint32_t | capacity () const |
uint32_t | size () const |
uint32_t | num_migrates () const |
Public Member Functions inherited from compat::inode_tracker_v2::SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > | |
SmallHashBase () | |
~SmallHashBase () | |
void | Init (uint32_t expected_size, Key empty, uint32_t(*hasher)(const Key &key)) |
bool | Lookup (const Key &key, Value *value) const |
bool | Contains (const Key &key) const |
void | Insert (const Key &key, const Value &value) |
void | Erase (const Key &key) |
void | Clear () |
uint64_t | bytes_allocated () const |
void | GetCollisionStats (uint64_t *num_collisions, uint32_t *max_collisions) const |
uint32_t | ScaleHash (const Key &key) const |
void | InitMemory () |
bool | DoInsert (const Key &key, const Value &value, const bool count_collisions) |
bool | DoLookup (const Key &key, uint32_t *bucket, uint32_t *collisions) const |
void | DoClear (const bool reset_capacity) |
void | SetThresholds () |
void | Grow () |
void | Shrink () |
void | ResetCapacity () |
Static Public Attributes | |
static const double | kThresholdGrow |
static const double | kThresholdShrink |
Static Public Attributes inherited from compat::inode_tracker_v2::SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > | |
static const double | kLoadFactor |
static const double | kThresholdGrow |
static const double | kThresholdShrink |
Protected Member Functions | |
void | SetThresholds () |
void | Grow () |
void | Shrink () |
void | ResetCapacity () |
Private Member Functions | |
void | Migrate (const uint32_t new_capacity) |
void | CopyFrom (const SmallHashDynamic< Key, Value > &other) |
Private Attributes | |
uint32_t | num_migrates_ |
uint32_t | threshold_grow_ |
uint32_t | threshold_shrink_ |
Friends | |
class | SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > |
Additional Inherited Members | |
Static Public Member Functions inherited from compat::inode_tracker_v2::SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > | |
static double | GetEntrySize () |
Public Attributes inherited from compat::inode_tracker_v2::SmallHashBase< Key, Value, SmallHashDynamic< Key, Value > > | |
Key * | keys_ |
Value * | values_ |
uint32_t | capacity_ |
uint32_t | initial_capacity_ |
uint32_t | size_ |
uint32_t(* | hasher_ )(const Key &key) |
uint64_t | bytes_allocated_ |
uint64_t | num_collisions_ |
uint32_t | max_collisions_ |
Key | empty_key_ |
typedef SmallHashBase< Key, Value, SmallHashDynamic<Key, Value> > compat::inode_tracker_v2::SmallHashDynamic< Key, Value >::Base |
|
inline |
|
inlineexplicit |
|
inline |
|
inlineprivate |
|
inlineprotected |
|
inlineprivate |
|
inline |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inline |
|
friend |
|
static |
|
static |
|
private |
|
private |
|
private |