class OnDiskChainedHashTableGenerator

Declaration

template <typename Info>
class OnDiskChainedHashTableGenerator { /* full declaration omitted */ };

Description

Generates an on disk hash table. This needs an \c Info that handles storing values into the hash table's payload and computes the hash for a given key. This should provide the following interface:

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:59

Templates

Info

Member Variables

private llvm::OnDiskChainedHashTableGenerator::offset_type NumBuckets
private llvm::OnDiskChainedHashTableGenerator::offset_type NumEntries
private llvm::SpecificBumpPtrAllocator<Item> BA
private llvm::OnDiskChainedHashTableGenerator::Bucket* Buckets

Method Overview

  • public llvm::OnDiskChainedHashTableGenerator::offset_type Emit(llvm::raw_ostream & Out)
  • public llvm::OnDiskChainedHashTableGenerator::offset_type Emit(llvm::raw_ostream & Out, Info & InfoObj)
  • public OnDiskChainedHashTableGenerator<Info>()
  • public bool contains(typename Info::key_type_ref Key, Info & InfoObj)
  • private void insert(llvm::OnDiskChainedHashTableGenerator::Bucket * Buckets, size_t Size, llvm::OnDiskChainedHashTableGenerator::Item * E)
  • public void insert(typename Info::key_type_ref Key, typename Info::data_type_ref Data)
  • public void insert(typename Info::key_type_ref Key, typename Info::data_type_ref Data, Info & InfoObj)
  • private void resize(size_t NewSize)
  • public ~OnDiskChainedHashTableGenerator<Info>()

Methods

llvm::OnDiskChainedHashTableGenerator::offset_type
Emit(llvm::raw_ostream& Out)

Description

Emit the table to Out, which must not be at offset 0.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:143

Parameters

llvm::raw_ostream& Out

llvm::OnDiskChainedHashTableGenerator::offset_type
Emit(llvm::raw_ostream& Out, Info& InfoObj)

Description

Emit the table to Out, which must not be at offset 0. Uses the provided Info instead of a stack allocated one.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:151

Parameters

llvm::raw_ostream& Out
Info& InfoObj

OnDiskChainedHashTableGenerator<Info>()

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:225

bool contains(typename Info::key_type_ref Key,
              Info& InfoObj)

Description

Determine whether an entry has been inserted.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:134

Parameters

typename Info::key_type_ref Key
Info& InfoObj

void insert(
    llvm::OnDiskChainedHashTableGenerator::Bucket*
        Buckets,
    size_t Size,
    llvm::OnDiskChainedHashTableGenerator::Item*
        E)

Description

Insert an item into the appropriate hash bucket.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:89

Parameters

llvm::OnDiskChainedHashTableGenerator::Bucket* Buckets
size_t Size
llvm::OnDiskChainedHashTableGenerator::Item* E

void insert(typename Info::key_type_ref Key,
            typename Info::data_type_ref Data)

Description

Insert an entry into the table.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:116

Parameters

typename Info::key_type_ref Key
typename Info::data_type_ref Data

void insert(typename Info::key_type_ref Key,
            typename Info::data_type_ref Data,
            Info& InfoObj)

Description

Insert an entry into the table. Uses the provided Info instead of a stack allocated one.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:125

Parameters

typename Info::key_type_ref Key
typename Info::data_type_ref Data
Info& InfoObj

void resize(size_t NewSize)

Description

Resize the hash table, moving the old entries into the new buckets.

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:97

Parameters

size_t NewSize

~OnDiskChainedHashTableGenerator<Info>()

Declared at: llvm/include/llvm/Support/OnDiskHashTable.h:233