]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/colls/smpi_automatic_selector.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rework way of creating Type hierarchy.
[simgrid.git] / src / smpi / colls / smpi_automatic_selector.cpp
index c69f495127dcdde4906ffd308727fc7f04c65e88..12ef8f3c8b412dd0d951ca074c63643f3dbf4020 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_t type = s_type::s_type_get_or_null(#cat, PJ_type_get_root());                                                       \
-    if (not type) {                                                                                                    \
-      type = s_type::s_type_event_new(#cat, PJ_type_get_root());                                                              \
-    }                                                                                                                  \
+    simgrid::instr::Type* type = simgrid::instr::Type::getRootType()->getOrCreateEventType(#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)                                                                    \