6 #ifndef _JOINALGO_NPJ_NPJ_H_
7 #define _JOINALGO_NPJ_NPJ_H_
39 size_t sLen = 0, rLen = 0;
41 MultiThreadHashTablePtr table =
nullptr;
43 BarrierPtr buildBar =
nullptr;
44 std::shared_ptr<std::thread> threadPtr;
45 struct timeval timeBaseStruct;
77 void init(NPJTuplePtr *_ts,
82 MultiThreadHashTablePtr _table,
96 void waitBuildBar(
void) {
98 buildBar->arrive_and_wait();
110 std::vector<NPJ_thread> workers;
137 #define newNPJ std::make_shared<NPJ>
173 #define newNPJSingle std::make_shared<NPJSingle>
The base class and abstraction of C++20 thread, and it can be derived into other threads.
Definition: AbstractC20Thread.hpp:29
The abstraction to describe a join algorithm, providing virtual function of join.
Definition: AbstractJoinAlgo.h:36
void setAlgoName(std::string name)
set the name of algorithm
Definition: AbstractJoinAlgo.h:68
The top class package of single threadNPJ, providing a "join function".
Definition: NPJ.h:143
The thread used by NPJ.
Definition: NPJ.h:36
The top class package of NPJ, providing a "join function".
Definition: NPJ.h:107
std::shared_ptr< NPJSingle > NPJSinglePtr
The class to describe a shared pointer to NPJSingle.
Definition: NPJ.h:168
void inlineMain()
The 'main' function of NPJ thread.
Definition: NPJ.cpp:8
virtual size_t join(C20Buffer< OoOJoin::TrackTuplePtr > windS, C20Buffer< OoOJoin::TrackTuplePtr > windR, int threads=1)
The function to execute join,.
Definition: NPJ.cpp:33
void syncTimeStruct(struct timeval tv)
Synchronize the time structure with outside setting.
Definition: NPJ.h:61
void init(NPJTuplePtr *_ts, NPJTuplePtr *_tr, size_t _sLen, size_t _rLen, int _cpu, MultiThreadHashTablePtr _table, BarrierPtr bar)
THe init function.
Definition: NPJ.h:77
std::shared_ptr< NPJ > NPJPtr
The class to describe a shared pointer to NPJ.
Definition: NPJ.h:132
virtual size_t join(C20Buffer< OoOJoin::TrackTuplePtr > windS, C20Buffer< OoOJoin::TrackTuplePtr > windR, int threads=1)
The function to execute join,.
Definition: NPJ.cpp:83
Definition: OperatorTable.cpp:7