]> AND Private Git Repository - blast.git/blobdiff - GroupBlock.cpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
added patterns and started OP computation
[blast.git] / GroupBlock.cpp
index 7995e62afef12393e3b99ed0676b7e9448e46808..716cea644ec148c3ced17883a9d132c2e7785199 100644 (file)
@@ -103,3 +103,20 @@ void GroupBlock::removeGenericParameter(QString name) {
   BlockParameter* p = getParameterFromName(name);
   if (p != NULL) params.removeAll(p);
 }
+
+void GroupBlock::initInputPattern() {
+  foreach(AbstractInterface* iface, getControlInputs()) {
+    iface->setOutputPattern(iface->getConnectedFrom()->getOutputPattern());    
+  }  
+}
+
+void GroupBlock::computeOutputPattern(int nbExec) {
+  
+  // get the input pattern on each inputs
+  initInputPattern();
+  // find blocks that are connected to that inputs
+  
+  foreach(AbstractInterface* iface, getControlOutputs()) {
+    iface->setOutputPattern(iface->getConnectedFrom()->getOutputPattern());    
+  }
+}