AllianceDB  0.0.1
AllianceDB is an open-source suite, including benchmarks and libs for evaluating and improving stream operation algorithms on modern hardwares.
AbstractEagerWS.h
Go to the documentation of this file.
1 
11 #ifndef WINDOWSLIDER_ABSTRACTEAGERWS_H_
12 #define WINDOWSLIDER_ABSTRACTEAGERWS_H_
13 
17 using namespace INTELLI;
18 using namespace std;
19 namespace INTELLI {
20 //Note: "Upon every arrival of a tuple, the opposing window is re-partitioned to perform a parallel scan"
51  private:
52  /* data */
53  std::vector<CellJoinJPPtr> jps;
54  protected:
55  void expireS(size_t cond);
56  void expireR(size_t cond);
57  TuplePtrQueue TuplePtrQueueLocalS;
58  TuplePtrQueue TuplePtrQueueLocalR;
59  virtual void inlineMain();
70 
71  public:
72  //generate the partition vector of offset
73  vector<size_t> weightedPartitionSizeFinal(size_t inS); //reserved for AMP
74  vector<size_t> avgPartitionSizeFinal(size_t inS); //for SMP
75 
76  AbstractEagerWS() {
77  reset();
78  nameTag = "CellJoin";
79  }
80 
81  //init with length of queue
87  AbstractEagerWS(size_t sLen, size_t rLen);
88  //feed the tuple S
89 
90  ~AbstractEagerWS();
91 
92  //init the join processors
103  //get the join result
110  size_t getJoinResult();
111 
112  //startTime
113 };
114 }
115 #endif
The base class and abstraction of C++20 thread, and it can be derived into other threads.
Definition: AbstractC20Thread.h:28
An abstraction of eager window slider (i.e., the CellJoin), also inherited by other eager window slid...
Definition: AbstractEagerWS.h:50
void deliverTupleR(TuplePtr tr)
deliver tuple r to join processors
void waitAckFromJoinProcessors()
to wait the response of join processors
void initJoinProcessors()
to init the initJoinProcessors
size_t getJoinResult()
to get the result of join
void deliverTupleS(TuplePtr ts)
deliver tuple s to join processors
AbstractEagerWS(size_t sLen, size_t rLen)
to init the slider with specific length of queue
void terminateJoinProcessors()
to terminate the join processors
virtual void inlineMain()
The inline 'main" function of thread, as an interface.
An abstraction of window slider, also inherited by both eager and lazy.
Definition: AbstractWS.h:41
std::shared_ptr< class Tuple > TuplePtr
The class to describe a shared pointer to Tuple.
Definition: Types.h:150
std::shared_ptr< INTELLI::SPSCQueue< INTELLI::TuplePtr > > TuplePtrQueue
To describe a queue of TuplePtr under SPSCQueue.
Definition: Types.h:228
Definition: DatasetTool.h:10