Blender V5.0
mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn > Class Template Reference

#include <mikk_atomic_hash_set.hh>

Classes

struct  Config

Public Member Functions

 AtomicHashSet (size_t maxSize, KeyHash hasher=KeyHash(), KeyEqual equalityChecker=KeyEqual(), const Config &c=Config())
 AtomicHashSet (const AtomicHashSet &)=delete
AtomicHashSetoperator= (const AtomicHashSet &)=delete
 ~AtomicHashSet ()=default
bool tryUpdateCell (KeyT *cell, KeyT &existingKey, KeyT newKey)
bool tryUpdateCell (std::atomic< KeyT > *cell, KeyT &existingKey, KeyT newKey)
std::pair< KeyT, bool > emplace (KeyT key)

Public Attributes

const size_t capacity_
const KeyT kEmptyKey_
KeyHash hasher_
KeyEqual equalityChecker_

Detailed Description

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
class mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >

Definition at line 61 of file mikk_atomic_hash_set.hh.

Constructor & Destructor Documentation

◆ AtomicHashSet() [1/2]

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::AtomicHashSet ( size_t maxSize,
KeyHash hasher = KeyHash(),
KeyEqual equalityChecker = KeyEqual(),
const Config & c = Config() )
inline

Definition at line 97 of file mikk_atomic_hash_set.hh.

References capacity_, equalityChecker_, hasher_, and kEmptyKey_.

Referenced by AtomicHashSet(), and operator=().

◆ AtomicHashSet() [2/2]

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::AtomicHashSet ( const AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn > & )
delete

References AtomicHashSet().

◆ ~AtomicHashSet()

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::~AtomicHashSet ( )
default

Member Function Documentation

◆ emplace()

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
std::pair< KeyT, bool > mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::emplace ( KeyT key)
inline

◆ operator=()

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
AtomicHashSet & mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::operator= ( const AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn > & )
delete

References AtomicHashSet().

◆ tryUpdateCell() [1/2]

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
bool mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::tryUpdateCell ( KeyT * cell,
KeyT & existingKey,
KeyT newKey )
inline

Definition at line 128 of file mikk_atomic_hash_set.hh.

Referenced by emplace().

◆ tryUpdateCell() [2/2]

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
bool mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::tryUpdateCell ( std::atomic< KeyT > * cell,
KeyT & existingKey,
KeyT newKey )
inline

Definition at line 139 of file mikk_atomic_hash_set.hh.

Member Data Documentation

◆ capacity_

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
const size_t mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::capacity_

Definition at line 69 of file mikk_atomic_hash_set.hh.

Referenced by AtomicHashSet(), and emplace().

◆ equalityChecker_

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
KeyEqual mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::equalityChecker_

Definition at line 73 of file mikk_atomic_hash_set.hh.

Referenced by AtomicHashSet(), and emplace().

◆ hasher_

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
KeyHash mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::hasher_

Definition at line 72 of file mikk_atomic_hash_set.hh.

Referenced by AtomicHashSet().

◆ kEmptyKey_

template<class KeyT, bool isAtomic, class KeyHash = std::hash<KeyT>, class KeyEqual = std::equal_to<KeyT>, class ProbeFcn = AtomicHashSetLinearProbeFcn>
const KeyT mikk::AtomicHashSet< KeyT, isAtomic, KeyHash, KeyEqual, ProbeFcn >::kEmptyKey_

Definition at line 70 of file mikk_atomic_hash_set.hh.

Referenced by AtomicHashSet(), and emplace().


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