2 #ifndef JOINMETHODS_ABSTRACTJOINMETHOD_H_
3 #define JOINMETHODS_ABSTRACTJOINMETHOD_H_
9 template<
class wsType=AbstractEagerWS>
14 size_t sLen = relationCouple.relationS.size();
15 size_t rLen = relationCouple.relationR.size();
16 wsType windowSlider(sLen, rLen);
17 joinResult.algoName = windowSlider.getName();
18 windowSlider.setParallelSMP(THREAD_NUMBER);
20 windowSlider.setTimeBased(
true);
21 windowSlider.setWindowLen(WINDOW_SIZE);
22 windowSlider.setSlideLen(WINDOW_SIZE);
23 windowSlider.setRunTimeScheduling(
true);
24 windowSlider.initJoinProcessors();
27 struct timeval timeSys = windowSlider.getSysTime();
29 INTELLI::UtilityFunctions::timerStart(joinResult);
30 while (!relationCouple.relationR.empty() || !relationCouple.relationS.empty()) {
31 size_t timeFeed = UtilityFunctions::timeLastUs(timeSys) / TIME_STEP;
32 if (!relationCouple.relationR.empty()) {
34 if (timeFeed >= tr->subKey) {
36 relationCouple.relationR.pop();
37 windowSlider.feedTupleR(tr);
40 if (!relationCouple.relationS.empty()) {
42 if (timeFeed >= ts->subKey) {
43 relationCouple.relationS.pop();
44 windowSlider.feedTupleS(ts);
50 usleep(TIME_STEP / 2);
52 cout <<
"end of tuple feeding" << endl;
53 joinResult.joinNumber = 0;
54 windowSlider.terminateJoinProcessors();
55 joinResult.joinNumber = windowSlider.getJoinResult();
56 INTELLI::UtilityFunctions::timerEnd(joinResult);
Definition: AbstractJoinMethod.h:10
std::shared_ptr< class Tuple > TuplePtr
The class to describe a shared pointer to Tuple.
Definition: Types.h:150
Definition: DatasetTool.h:10