CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived > Class Template Reference

#include <compat.h>

Inheritance diagram for compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >:
Collaboration diagram for compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >:

Public Member Functions

 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 Member Functions

static double GetEntrySize ()
 

Public Attributes

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_
 

Static Public Attributes

static const double kLoadFactor
 
static const double kThresholdGrow
 
static const double kThresholdShrink
 

Detailed Description

template<class Key, class Value, class Derived>
class compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >

Definition at line 325 of file compat.h.

Constructor & Destructor Documentation

template<class Key, class Value, class Derived>
compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::SmallHashBase ( )
inline

Definition at line 331 of file compat.h.

template<class Key, class Value, class Derived>
compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::~SmallHashBase ( )
inline

Definition at line 332 of file compat.h.

Member Function Documentation

template<class Key, class Value, class Derived>
uint64_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::bytes_allocated ( ) const
inline

Definition at line 360 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Clear ( )
inline

Definition at line 359 of file compat.h.

template<class Key, class Value, class Derived>
bool compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Contains ( const Key &  key) const
inline

Definition at line 349 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::DoClear ( const bool  reset_capacity)
inline

Definition at line 393 of file compat.h.

template<class Key, class Value, class Derived>
bool compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::DoInsert ( const Key &  key,
const Value &  value,
const bool  count_collisions 
)
inline

Definition at line 377 of file compat.h.

template<class Key, class Value, class Derived>
bool compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::DoLookup ( const Key &  key,
uint32_t *  bucket,
uint32_t *  collisions 
) const
inline
template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Erase ( const Key &  key)
inline

Definition at line 358 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::GetCollisionStats ( uint64_t *  num_collisions,
uint32_t *  max_collisions 
) const
inline

Definition at line 364 of file compat.h.

template<class Key, class Value, class Derived>
static double compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::GetEntrySize ( )
inlinestatic

Definition at line 361 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Grow ( )
inline

Definition at line 398 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Init ( uint32_t  expected_size,
Key  empty,
uint32_t(*)(const Key &key)  hasher 
)
inline

Definition at line 336 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::InitMemory ( )
inline

Definition at line 376 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Insert ( const Key &  key,
const Value &  value 
)
inline

Definition at line 355 of file compat.h.

template<class Key, class Value, class Derived>
bool compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Lookup ( const Key &  key,
Value *  value 
) const
inline

Definition at line 341 of file compat.h.

Referenced by compat::inode_tracker_v2::InodeMap::LookupMd5Path().

Here is the caller graph for this function:

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::ResetCapacity ( )
inline

Definition at line 400 of file compat.h.

template<class Key, class Value, class Derived>
uint32_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::ScaleHash ( const Key &  key) const
inline

Definition at line 371 of file compat.h.

Referenced by compat::inode_tracker_v2::SmallHashBase< uint64_t, shash_v1::Md5, SmallHashDynamic< uint64_t, shash_v1::Md5 > >::DoLookup().

Here is the caller graph for this function:

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::SetThresholds ( )
inline

Definition at line 397 of file compat.h.

template<class Key, class Value, class Derived>
void compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::Shrink ( )
inline

Definition at line 399 of file compat.h.

Member Data Documentation

template<class Key, class Value, class Derived>
uint64_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::bytes_allocated_
template<class Key, class Value, class Derived>
Key compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::empty_key_
template<class Key, class Value, class Derived>
uint32_t(* compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::hasher_)(const Key &key)
template<class Key, class Value, class Derived>
uint32_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::initial_capacity_

Definition at line 406 of file compat.h.

template<class Key, class Value, class Derived>
const double compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::kLoadFactor
static

Definition at line 327 of file compat.h.

template<class Key, class Value, class Derived>
const double compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::kThresholdGrow
static

Definition at line 328 of file compat.h.

template<class Key, class Value, class Derived>
const double compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::kThresholdShrink
static

Definition at line 329 of file compat.h.

template<class Key, class Value, class Derived>
uint32_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::max_collisions_

maximum collisions for a single insert

Definition at line 411 of file compat.h.

template<class Key, class Value, class Derived>
uint64_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::num_collisions_

Definition at line 410 of file compat.h.

template<class Key, class Value, class Derived>
uint32_t compat::inode_tracker_v2::SmallHashBase< Key, Value, Derived >::size_

Definition at line 407 of file compat.h.


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