Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Start to replace old simdag tests of the ptask_L07 model
[simgrid.git] / src / mc / udpor_global.cpp
index 9c84d6e..d4bb519 100644 (file)
@@ -11,6 +11,20 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_udpor_global, mc, "udpor_global");
 namespace simgrid {
 namespace mc {
 
+EventSet EvtSetTools::makeUnion(EventSet s1, EventSet s2)
+{
+  EventSet res = s1;
+  for (auto evt : s2)
+    EvtSetTools::pushBack(res, evt);
+  return res;
+}
+
+void EvtSetTools::pushBack(EventSet& events, UnfoldingEvent* e)
+{
+  if (!EvtSetTools::contains(events, e))
+    events.push_back(e);
+}
+
 bool EvtSetTools::contains(const EventSet events, const UnfoldingEvent* e)
 {
   for (auto evt : events)