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 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 101 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 103 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.

~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>>

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 171 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().

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 218 of file ConcurrentHashtable.h.

References BucketsArray, llvm::Count, float, InitialBucketSize, NumberOfBuckets, llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::Bucket::NumberOfEntries, Size, 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 288 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().

BucketsArray

template<typename KeyTy, typename KeyDataTy, typename AllocatorTy, typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>

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


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