2 #ifndef _JOINALGO_NPJ_MULTITHREADHASHTABLE_H_
3 #define _JOINALGO_NPJ_MULTITHREADHASHTABLE_H_
7 #include <condition_variable>
20 typedef std::shared_ptr<MtBucket> MtBucketPtr;
36 MtBucketPtr next =
nullptr;
46 while (!m_mut.try_lock());
82 std::vector<MtBucket> buckets;
106 typedef std::shared_ptr<MultiThreadHashTable> MultiThreadHashTablePtr;
The multithread-supported bucket.
Definition: MultiThreadHashTable.h:31
void unlock()
unlock this bucket
Definition: MultiThreadHashTable.h:51
size_t probeTuple(NPJTuplePtr tp)
probe one tuple, just on the bucket
Definition: MultiThreadHashTable.cpp:48
void duplicatedInsert(NPJTuplePtr tp)
Insert a tuple, allowing key duplication.
Definition: MultiThreadHashTable.cpp:28
void lock()
lock this bucket
Definition: MultiThreadHashTable.h:45
The multithread-supported hash table, holding buckets.
Definition: MultiThreadHashTable.h:76
size_t probeTuple(NPJTuplePtr tp)
probe one tuple
Definition: MultiThreadHashTable.cpp:91
void buildTable(NPJTuplePtr *tps, size_t len)
build the hashtable from tuple memory aray
Definition: MultiThreadHashTable.cpp:75
#define BUCKET_SIZE
Definition: MultiThreadHashTable.h:18
uint64_t keyType
Definition: Tuples.h:18
std::shared_ptr< class TrackTuple > TrackTuplePtr
The class to describe a shared pointer to TrackTuple.
Definition: Tuples.h:171
Definition: OperatorTable.cpp:7