|
| void | OoOJoin::NPJ_thread::inlineMain () |
| | The 'main' function of NPJ thread. More...
|
| |
| void | OoOJoin::NPJ_thread::syncTimeStruct (struct timeval tv) |
| | Synchronize the time structure with outside setting. More...
|
| |
| void | OoOJoin::NPJ_thread::init (NPJTuplePtr *_ts, NPJTuplePtr *_tr, size_t _sLen, size_t _rLen, int _cpu, MultiThreadHashTablePtr _table, BarrierPtr bar) |
| | THe init function. More...
|
| |
|
size_t | OoOJoin::NPJ_thread::getResult () |
| |
|
void | OoOJoin::NPJ_thread::waitBuildBar (void) |
| |
| virtual size_t | OoOJoin::NPJ::join (C20Buffer< OoOJoin::TrackTuplePtr > windS, C20Buffer< OoOJoin::TrackTuplePtr > windR, int threads=1) |
| | The function to execute join,. More...
|
| |
| virtual size_t | OoOJoin::NPJSingle::join (C20Buffer< OoOJoin::TrackTuplePtr > windS, C20Buffer< OoOJoin::TrackTuplePtr > windR, int threads=1) |
| | The function to execute join,. More...
|
| |
| typedef std::shared_ptr< NPJ > | OoOJoin::NPJPtr |
| | The class to describe a shared pointer to NPJ. More...
|
| |
|
typedef std::shared_ptr< NPJSingle > | OoOJoin::NPJSinglePtr |
| | The class to describe a shared pointer to NPJSingle.
|
| |
| #define | newNPJ std::make_shared<NPJ> |
| | (Macro) To creat a new NPJ under shared pointer. More...
|
| |
|
#define | newNPJSingle std::make_shared<NPJSingle> |
| | (Macro) To creat a new NPJSingle under shared pointer.
|
| |
|
typedef std::shared_ptr< MtBucket > | OoOJoin::MtBucketPtr |
| |
|
typedef TrackTuplePtr | OoOJoin::NPJTuplePtr |
| |
|
typedef std::shared_ptr< MultiThreadHashTable > | OoOJoin::MultiThreadHashTablePtr |
| |
| #define | BUCKET_SIZE 4 |
| |
NPJ is a parallel version of the canonical hash join algorithm. Both input relations are divided into equisized portions to be assigned to a number of threads. In the build phase, all threads populate a shared hash table with all tuples of R. After synchronization via a barrier, all threads enter the probe phase, and concurrently find matching join tuples in their assigned portions of S.
◆ BUCKET_SIZE
()
The hashtable achieves thread-safe by std::mutex. Instead of locking the whole table, only the bucketed to be inserted will be locked, which reduces waiting
◆ newNPJ
| #define newNPJ std::make_shared<NPJ> |
(Macro) To creat a new NPJ under shared pointer.
[newNPJ]
◆ NPJPtr
The class to describe a shared pointer to NPJ.
[NPJPtr]
◆ init()
| void OoOJoin::NPJ_thread::init |
( |
NPJTuplePtr * |
_ts, |
|
|
NPJTuplePtr * |
_tr, |
|
|
size_t |
_sLen, |
|
|
size_t |
_rLen, |
|
|
int |
_cpu, |
|
|
MultiThreadHashTablePtr |
_table, |
|
|
BarrierPtr |
bar |
|
) |
| |
|
inline |
THe init function.
- Parameters
-
| _ts | Memory pointer of S |
| _tr | Memory pointer of S |
| _sLen | Length of S |
| _rLen | Length of R |
| _cpu | Core to bind, -1 means let OS decide |
| _table | The shared pointer of hash table |
| bar | THe barrier used for build phase |
◆ inlineMain()
| void NPJ_thread::inlineMain |
( |
| ) |
|
|
protectedvirtual |
◆ join() [1/2]
The function to execute join,.
- Parameters
-
| windS | The window of S tuples |
| windR | The window of R tuples |
| threads | The threads for executing this join |
- Returns
- The joined tuples
Reimplemented from OoOJoin::AbstractJoinAlgo.
◆ join() [2/2]
The function to execute join,.
- Parameters
-
| windS | The window of S tuples |
| windR | The window of R tuples |
| threads | The threads for executing this join |
- Returns
- The joined tuples
Reimplemented from OoOJoin::AbstractJoinAlgo.
◆ syncTimeStruct()
| void OoOJoin::NPJ_thread::syncTimeStruct |
( |
struct timeval |
tv | ) |
|
|
inline |
Synchronize the time structure with outside setting.
- Parameters
-
| tv | The outside time structure |