Salome HOME
[EDF12520] : Optimization of placements of Kernel containers in ForEachLoop/HP Contai...
[modules/yacs.git] / src / engine / Switch.cxx
index a65e8425f49ca0d0b1c540a90491ee80a84888ca..5c0b7a2d85cff08f0ad5489a6b2c4ddc82deea6a 100644 (file)
@@ -408,6 +408,20 @@ int Switch::getMaxLevelOfParallelism() const
   return ret;
 }
 
+double Switch::getWeightRegardingDPL() const
+{
+  double ret(0);
+  for(std::map< int , Node * >::const_iterator it=_mapOfNode.begin();it!=_mapOfNode.end();it++)
+    ret=std::max(ret,((*it).second)->getWeightRegardingDPL());
+  return ret;
+}
+
+void Switch::partitionRegardingDPL(const PartDefinition *pd, std::map<ComposedNode *, YACS::BASES::AutoRefCnt<PartDefinition> >& zeMap)
+{
+  for(std::map< int , Node * >::const_iterator it=_mapOfNode.begin();it!=_mapOfNode.end();it++)
+    (*it).second->partitionRegardingDPL(pd,zeMap);
+}
+
 void Switch::edRemoveChild(Node *node) throw(YACS::Exception)
 {
   map< int , Node * >::iterator iter=_mapOfNode.begin();