AllianceDB  0.0.1
AllianceDB is an open-source suite, including benchmarks and libs for evaluating and improving stream operation algorithms on modern hardwares.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
INTELLI::MultiThreadHashTable Class Reference

The multithread-supported hash table, holding buckets. More...

#include <Common/MultiThreadHashTable.h>

Collaboration diagram for INTELLI::MultiThreadHashTable:

Public Member Functions

 MultiThreadHashTable (size_t bks)
 pre-init with several buckets More...
 
void buildTable (TuplePtrQueue tps)
 build the hashtable from tuple queue More...
 
void buildTable (TuplePtr *tps, size_t len)
 build the hashtable from tuple memory aray More...
 
size_t probeTuple (TuplePtr tp)
 probe one tuple More...
 

Public Attributes

uint32_t hash_mask
 
uint32_t skip_bits
 
vector< MtBucketbuckets
 

Detailed Description

The multithread-supported hash table, holding buckets.

Todo:
Improve the efficiency of build phase

Constructor & Destructor Documentation

◆ MultiThreadHashTable()

INTELLI::MultiThreadHashTable::MultiThreadHashTable ( size_t  bks)

pre-init with several buckets

Parameters
bksthe number of buckets

Member Function Documentation

◆ buildTable() [1/2]

void INTELLI::MultiThreadHashTable::buildTable ( TuplePtr tps,
size_t  len 
)

build the hashtable from tuple memory aray

Parameters
tpsthe tuple aray
lenthe length
Note
This is thread-safe
Warning
This function with pointer is NOT intended for API, but only inline use

◆ buildTable() [2/2]

void INTELLI::MultiThreadHashTable::buildTable ( TuplePtrQueue  tps)

build the hashtable from tuple queue

Parameters
tpsthe tuple queue
Note
This is thread-safe

◆ probeTuple()

size_t INTELLI::MultiThreadHashTable::probeTuple ( TuplePtr  tp)

probe one tuple

Parameters
tpTge tuple
Returns
Number of matches

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