|
LLVM 22.0.0git
|
#include "llvm/ADT/ConcurrentHashtable.h"
Classes | |
| struct | Bucket |
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 |
Definition at line 102 of file ConcurrentHashtable.h.
|
protected |
Definition at line 264 of file ConcurrentHashtable.h.
|
protected |
Definition at line 261 of file ConcurrentHashtable.h.
|
protected |
Definition at line 260 of file ConcurrentHashtable.h.
|
protected |
Definition at line 263 of file ConcurrentHashtable.h.
|
inline |
Definition at line 104 of file ConcurrentHashtable.h.
References Allocator, assert(), BucketsArray, llvm::countl_zero(), llvm::countr_zero(), ExtHashMask, HashBitsNum, HashMask, InitialBucketSize, MaxBucketSize, MultiThreadAllocator, NumberOfBuckets, llvm::PowerOf2Ceil(), and llvm::parallel::strategy.
|
inlinevirtual |
Definition at line 160 of file ConcurrentHashtable.h.
References BucketsArray, and NumberOfBuckets.
|
inlineprotected |
|
inlineprotected |
Definition at line 354 of file ConcurrentHashtable.h.
References ExtHashMask, and HashBitsNum.
Referenced by insert().
|
inlineprotected |
Definition at line 358 of file ConcurrentHashtable.h.
References assert().
Referenced by insert(), and RehashBucket().
|
inline |
Insert new value NewValue or return already existing entry.
Definition at line 172 of file ConcurrentHashtable.h.
References BucketsArray, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, getBucketIdx(), getExtHashBits(), getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, llvm_unreachable, MultiThreadAllocator, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, RehashBucket(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by llvm::dwarf_linker::parallel::CompileUnit::getFileName().
|
inline |
Print information about current state of hash table structures.
Definition at line 219 of file ConcurrentHashtable.h.
References BucketsArray, llvm::Count, InitialBucketSize, NumberOfBuckets, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, Size, and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
|
inlineprotected |
Definition at line 289 of file ConcurrentHashtable.h.
References assert(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Entries, getStartIdx(), llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Hashes, MaxBucketSize, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, llvm::report_fatal_error(), and llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::Size.
Referenced by insert().
|
protected |
Definition at line 383 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), insert(), printStatistic(), and ~ConcurrentHashTableByPtr().
|
protected |
Definition at line 371 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and getExtHashBits().
|
protected |
Definition at line 365 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and getExtHashBits().
|
protected |
Definition at line 368 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and getBucketIdx().
|
protected |
Definition at line 377 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and printStatistic().
|
protected |
Definition at line 374 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and RehashBucket().
|
protected |
Definition at line 386 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), and insert().
|
protected |
Definition at line 380 of file ConcurrentHashtable.h.
Referenced by ConcurrentHashTableByPtr(), printStatistic(), and ~ConcurrentHashTableByPtr().