LLVM 20.0.0git
|
Lock-free thread-safe hash-mapped trie. More...
#include "llvm/ADT/TrieRawHashMap.h"
Classes | |
class | const_pointer |
class | LazyValueConstructor |
class | pointer |
struct | value_type |
Public Types | |
using | HashT = std::array< uint8_t, NumHashBytes > |
using | HashType = HashT |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::ThreadSafeTrieRawHashMapBase | |
static void * | operator new (size_t Size) |
Static Public Attributes inherited from llvm::ThreadSafeTrieRawHashMapBase | |
static constexpr size_t | TrieContentBaseSize = 4 |
static constexpr size_t | DefaultNumRootBits = 6 |
static constexpr size_t | DefaultNumSubtrieBits = 4 |
Protected Member Functions inherited from llvm::ThreadSafeTrieRawHashMapBase | |
PointerBase | find (ArrayRef< uint8_t > Hash) const |
Find the stored content with hash. | |
PointerBase | insert (PointerBase Hint, ArrayRef< uint8_t > Hash, function_ref< const uint8_t *(void *Mem, ArrayRef< uint8_t > Hash)> Constructor) |
Insert and return the stored content. | |
ThreadSafeTrieRawHashMapBase ()=delete | |
ThreadSafeTrieRawHashMapBase (size_t ContentAllocSize, size_t ContentAllocAlign, size_t ContentOffset, std::optional< size_t > NumRootBits=std::nullopt, std::optional< size_t > NumSubtrieBits=std::nullopt) | |
~ThreadSafeTrieRawHashMapBase () | |
Destructor, which asserts if there's anything to do. | |
void | destroyImpl (function_ref< void(void *ValueMem)> Destructor) |
ThreadSafeTrieRawHashMapBase (ThreadSafeTrieRawHashMapBase &&RHS) | |
ThreadSafeTrieRawHashMapBase & | operator= (ThreadSafeTrieRawHashMapBase &&RHS)=delete |
ThreadSafeTrieRawHashMapBase (const ThreadSafeTrieRawHashMapBase &)=delete | |
ThreadSafeTrieRawHashMapBase & | operator= (const ThreadSafeTrieRawHashMapBase &)=delete |
PointerBase | getRoot () const |
unsigned | getStartBit (PointerBase P) const |
unsigned | getNumBits (PointerBase P) const |
unsigned | getNumSlotUsed (PointerBase P) const |
std::string | getTriePrefixAsString (PointerBase P) const |
unsigned | getNumTries () const |
PointerBase | getNextTrie (PointerBase P) const |
Static Protected Attributes inherited from llvm::ThreadSafeTrieRawHashMapBase | |
template<class T > | |
static constexpr size_t | DefaultContentAllocSize = sizeof(AllocValueType<T>) |
template<class T > | |
static constexpr size_t | DefaultContentAllocAlign = alignof(AllocValueType<T>) |
template<class T > | |
static constexpr size_t | DefaultContentOffset |
Lock-free thread-safe hash-mapped trie.
Definition at line 182 of file TrieRawHashMap.h.
using llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::HashT = std::array<uint8_t, NumHashBytes> |
Definition at line 184 of file TrieRawHashMap.h.
using llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::HashType = HashT |
Definition at line 215 of file TrieRawHashMap.h.
|
inline |
Definition at line 350 of file TrieRawHashMap.h.
|
inline |
Definition at line 357 of file TrieRawHashMap.h.
References llvm::ThreadSafeTrieRawHashMapBase::destroyImpl(), and P.
|
default |
|
delete |
LLVM_DUMP_METHOD void llvm::ThreadSafeTrieRawHashMapBase::dump | ( | ) | const |
|
inline |
Definition at line 340 of file TrieRawHashMap.h.
References assert(), llvm::ThreadSafeTrieRawHashMapBase::find(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 345 of file TrieRawHashMap.h.
References assert(), llvm::ThreadSafeTrieRawHashMapBase::find(), and llvm::ArrayRef< T >::size().
|
inline |
Definition at line 335 of file TrieRawHashMap.h.
References llvm::CallingConv::C, llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::value_type::Hash, and llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::insertLazy().
|
inline |
Definition at line 329 of file TrieRawHashMap.h.
References llvm::CallingConv::C, and llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::insertLazy().
|
inline |
Definition at line 324 of file TrieRawHashMap.h.
References llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::insertLazy().
|
inline |
Insert with a hint.
Default-constructed hint will work, but it's recommended to start with a lookup to avoid overhead in object creation if it already exists.
Definition at line 314 of file TrieRawHashMap.h.
References llvm::ThreadSafeTrieRawHashMapBase::insert().
Referenced by llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::insert(), and llvm::ThreadSafeTrieRawHashMap< T, NumHashBytes >::insertLazy().
|
delete |
|
delete |
void llvm::ThreadSafeTrieRawHashMapBase::print | ( | raw_ostream & | OS | ) | const |