CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SmallHashFixed< Key, Value > Class Template Reference

#include <smallhash.h>

Inheritance diagram for SmallHashFixed< Key, Value >:
Collaboration diagram for SmallHashFixed< Key, Value >:

Protected Member Functions

void SetThresholds ()
 
void Grow ()
 
void Shrink ()
 
void ResetCapacity ()
 
- Protected Member Functions inherited from SmallHashBase< Key, Value, SmallHashFixed< Key, Value > >
uint32_t ScaleHash (const Key &key) const
 
void AllocMemory ()
 
void DeallocMemory (Key *k, Value *v, uint32_t c)
 
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 ()
 

Friends

class SmallHashBase< Key, Value, SmallHashFixed< Key, Value > >
 

Additional Inherited Members

- Public Member Functions inherited from SmallHashBase< Key, Value, SmallHashFixed< 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 LookupEx (Key *key, Value *value) const
 
bool Contains (const Key &key) const
 
void Insert (const Key &key, const Value &value)
 
bool Erase (const Key &key)
 
void Clear ()
 
uint64_t bytes_allocated () const
 
void GetCollisionStats (uint64_t *num_collisions, uint32_t *max_collisions) const
 
uint32_t capacity () const
 
Key empty_key () const
 
Key * keys () const
 
Value * values () const
 
void SetHasher (uint32_t(*hasher)(const Key &key))
 
- Static Public Member Functions inherited from SmallHashBase< Key, Value, SmallHashFixed< Key, Value > >
static double GetEntrySize ()
 
- Static Public Attributes inherited from SmallHashBase< Key, Value, SmallHashFixed< Key, Value > >
static const double kLoadFactor
 
static const double kThresholdGrow
 
static const double kThresholdShrink
 
- Protected Attributes inherited from SmallHashBase< Key, Value, SmallHashFixed< 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_
 

Detailed Description

template<class Key, class Value>
class SmallHashFixed< Key, Value >

Definition at line 254 of file smallhash.h.

Member Function Documentation

template<class Key, class Value>
void SmallHashFixed< Key, Value >::Grow ( )
inlineprotected

Definition at line 261 of file smallhash.h.

template<class Key, class Value>
void SmallHashFixed< Key, Value >::ResetCapacity ( )
inlineprotected

Definition at line 263 of file smallhash.h.

template<class Key, class Value>
void SmallHashFixed< Key, Value >::SetThresholds ( )
inlineprotected

Definition at line 260 of file smallhash.h.

template<class Key, class Value>
void SmallHashFixed< Key, Value >::Shrink ( )
inlineprotected

Definition at line 262 of file smallhash.h.

Friends And Related Function Documentation

template<class Key, class Value>
friend class SmallHashBase< Key, Value, SmallHashFixed< Key, Value > >
friend

Definition at line 257 of file smallhash.h.


The documentation for this class was generated from the following file: