LLVM 20.0.0git
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info > Class Template Reference

#include "llvm/ADT/ConcurrentHashtable.h"

Inheritance diagram for llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >:
Inheritance graph
[legend]

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 *, boolinsert (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
 

Detailed Description

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.

Member Typedef Documentation

◆ DataPtr

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
using llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::DataPtr = EntryDataTy *
protected

Definition at line 273 of file ConcurrentHashtable.h.

◆ EntryDataTy

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
using llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::EntryDataTy = KeyDataTy *
protected

Definition at line 270 of file ConcurrentHashtable.h.

◆ ExtHashBitsTy

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
using llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashBitsTy = uint32_t
protected

Definition at line 269 of file ConcurrentHashtable.h.

◆ HashesPtr

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
using llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashesPtr = ExtHashBitsTy *
protected

Definition at line 272 of file ConcurrentHashtable.h.

Constructor & Destructor Documentation

◆ ConcurrentHashTableByPtr()

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

◆ ~ConcurrentHashTableByPtr()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
virtual llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::~ConcurrentHashTableByPtr ( )
inlinevirtual

Member Function Documentation

◆ getBucketIdx()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getBucketIdx ( hash_code  Hash)
inlineprotected

◆ getExtHashBits()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getExtHashBits ( uint64_t  Hash)
inlineprotected

◆ getStartIdx()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::getStartIdx ( uint32_t  ExtHashBits,
uint32_t  BucketSize 
)
inlineprotected

◆ insert()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
std::pair< KeyDataTy *, bool > llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::insert ( const KeyTy &  NewValue)
inline

◆ printStatistic()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
void llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::printStatistic ( raw_ostream OS)
inline

◆ RehashBucket()

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
void llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::RehashBucket ( Bucket CurBucket)
inlineprotected

Member Data Documentation

◆ BucketsArray

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
std::unique_ptr<Bucket[]> llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::BucketsArray
protected

◆ ExtHashMask

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint64_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::ExtHashMask = 0
protected

◆ HashBitsNum

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint64_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashBitsNum = 0
protected

◆ HashMask

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint64_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::HashMask = 0
protected

◆ InitialBucketSize

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::InitialBucketSize = 0
protected

◆ MaxBucketSize

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MaxBucketSize = 0
protected

◆ MultiThreadAllocator

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
AllocatorTy& llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::MultiThreadAllocator
protected

◆ NumberOfBuckets

template<typename KeyTy , typename KeyDataTy , typename AllocatorTy , typename Info = ConcurrentHashTableInfoByPtr<KeyTy, KeyDataTy, AllocatorTy>>
uint32_t llvm::ConcurrentHashTableByPtr< KeyTy, KeyDataTy, AllocatorTy, Info >::NumberOfBuckets = 0
protected

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