00001 #ifndef COMPLETION_H 00002 #define COMPLETION_H 00003 00004 #include "completion.decl.h" 00005 00006 class CompletionDetector : public CBase_CompletionDetector { 00007 public: 00008 CompletionDetector(); 00009 00010 // Local methods 00011 void produce(int events_produced = 1); 00012 void consume(int events_consumed = 1); 00013 void done(int producers_done = 1); 00014 00015 CompletionDetector_SDAG_CODE 00016 00017 private: 00018 int produced, consumed, unconsumed; 00019 int producers_total, producers_done_local, producers_done_global; 00020 int prio; 00021 bool running; 00022 00023 void init(); 00024 }; 00025 00026 #endif