00001 #include "completion.h" 00002 00003 CompletionDetector::CompletionDetector() 00004 { 00005 init(); 00006 } 00007 00008 void CompletionDetector::init() { 00009 producers_total = 0; 00010 producers_done_local = producers_done_global = 0; 00011 produced = 0; 00012 consumed = 0; 00013 running = false; 00014 unconsumed = 1; // Nonsense value, for loop below 00015 } 00016 00017 void CompletionDetector::produce(int events_produced) { 00018 produced += events_produced; 00019 } 00020 00021 void CompletionDetector::consume(int events_consumed) { 00022 consumed += events_consumed; 00023 } 00024 00025 void CompletionDetector::done(int producers_done) { 00026 producers_done_local += producers_done; 00027 } 00028 00029 #include "completion.def.h"