LLVM: llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info (original) (raw)
#include "[llvm/ADT/ConcurrentHashtable.h](ConcurrentHashtable%5F8h%5Fsource.html)"
Public Member Functions | |
---|---|
ConcurrentHashTableByPtr (AllocatorTy &Allocator, uint64_t EstimatedSize=100000, size_t ThreadsNum=parallel::strategy.compute_thread_count(), size_t InitialNumberOfBuckets=128) | |
virtual | ~ConcurrentHashTableByPtr () |
std::pair< KeyDataTy *, bool > | insert (const KeyTy &NewValue) |
Insert new value NewValue or return already existing entry. | |
void | printStatistic (raw_ostream &OS) |
Print information about current state of hash table structures. | |
Protected Types | |
---|---|
using | ExtHashBitsTy = uint32_t |
using | EntryDataTy = KeyDataTy * |
using | HashesPtr = ExtHashBitsTy * |
using | DataPtr = EntryDataTy * |
Protected Member Functions | |
---|---|
void | RehashBucket (Bucket &CurBucket) |
uint32_t | getBucketIdx (hash_code Hash) |
uint32_t | getExtHashBits (uint64_t Hash) |
uint32_t | getStartIdx (uint32_t ExtHashBits, uint32_t BucketSize) |
Protected Attributes | |
---|---|
uint64_t | HashBitsNum = 0 |
uint64_t | HashMask = 0 |
uint64_t | ExtHashMask = 0 |
uint32_t | MaxBucketSize = 0 |
uint32_t | InitialBucketSize = 0 |
uint32_t | NumberOfBuckets = 0 |
std::unique_ptr< Bucket[]> | BucketsArray |
AllocatorTy & | MultiThreadAllocator |
template<typename KeyTy, typename KeyDataTy, typename AllocatorTy, typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
class llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >
Definition at line 102 of file ConcurrentHashtable.h.
◆ DataPtr
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ EntryDataTy
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ ExtHashBitsTy
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ HashesPtr
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ConcurrentHashTableByPtr ( AllocatorTy & Allocator, uint64_t EstimatedSize = 100000, size_t ThreadsNum = parallel::strategy.compute_thread_count(), size_t InitialNumberOfBuckets = 128 ) | inline |
---|
Definition at line 104 of file ConcurrentHashtable.h.
References assert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, llvm::countl_zero(), llvm::countr_zero(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashMask, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashBitsNum, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashMask, Idx, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::InitialBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MaxBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets, and llvm::PowerOf2Ceil().
◆ ~ConcurrentHashTableByPtr()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ getBucketIdx()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ getExtHashBits()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Definition at line 364 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashMask, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashBitsNum.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
◆ getStartIdx()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ insert()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Insert new value NewValue
or return already existing entry.
Returns
entry and "true" if an entry is just inserted or "false" if an entry already exists.
Definition at line 172 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getBucketIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getExtHashBits(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, llvm_unreachable, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MultiThreadAllocator, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::RehashBucket(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneScalarAttr(), llvm::dwarf_linker::parallel::DIEAttributeCloner::cloneStringAttr(), llvm::dwarf_linker::parallel::CompileUnit::getFileName(), llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::save(), and llvm::dwarf_linker::parallel::AcceleratorRecordsSaver::saveObjC().
◆ printStatistic()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Print information about current state of hash table structures.
Definition at line 228 of file ConcurrentHashtable.h.
References llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray, Idx, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::InitialBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, OS, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
◆ RehashBucket()
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Definition at line 299 of file ConcurrentHashtable.h.
References assert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MaxBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, llvm::report_fatal_error(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert().
◆ BucketsArray
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Definition at line 393 of file ConcurrentHashtable.h.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ConcurrentHashTableByPtr(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::printStatistic(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::~ConcurrentHashTableByPtr().
◆ ExtHashMask
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ HashBitsNum
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ HashMask
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ InitialBucketSize
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ MaxBucketSize
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ MultiThreadAllocator
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
◆ NumberOfBuckets
template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
Definition at line 390 of file ConcurrentHashtable.h.
Referenced by llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ConcurrentHashTableByPtr(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::printStatistic(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::~ConcurrentHashTableByPtr().
The documentation for this class was generated from the following file:
- include/llvm/ADT/ConcurrentHashtable.h