Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
More objectification of instr::Type (wip)
[simgrid.git] / src / smpi / colls / smpi_automatic_selector.cpp
index 2530f40..2407223 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <exception>
 
-#include "colls_private.h"
+#include "colls_private.hpp"
 #include "smpi_process.hpp"
 
 
 
 #define TRACE_AUTO_COLL(cat)                                                                                           \
   if (TRACE_is_enabled()) {                                                                                            \
-    Type* type = Type::getOrNull(#cat, PJ_type_get_root());                                                       \
+    simgrid::instr::Type* type = PJ_type_get_root()->getChildOrNull(#cat);                                             \
     if (not type) {                                                                                                    \
-      type = Type::eventNew(#cat, PJ_type_get_root());                                                              \
+      type = PJ_type_get_root()->addEventType(#cat);                                                                   \
     }                                                                                                                  \
     char cont_name[25];                                                                                                \
     snprintf(cont_name, 25, "rank-%d", smpi_process()->index());                                                       \
-    value* val = value::get_or_new(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type);                  \
-    new NewEvent(SIMIX_get_clock(), PJ_container_get(cont_name), type, val);                                           \
+    simgrid::instr::Value* val =                                                                                       \
+        simgrid::instr::Value::byNameOrCreate(Colls::mpi_coll_##cat##_description[i].name, "1.0 1.0 1.0", type);       \
+    new simgrid::instr::NewEvent(SIMIX_get_clock(), simgrid::instr::Container::byName(cont_name), type, val);          \
   }
 
 #define AUTOMATIC_COLL_BENCH(cat, ret, args, args2)                                                                    \