Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge pull request #215 from Takishipp/s_type_cleanup
[simgrid.git] / src / smpi / internals / instr_smpi.cpp
index 579f03e..38e3158 100644 (file)
@@ -208,8 +208,8 @@ void TRACE_smpi_init(int rank)
      * Check whether this variable already exists or not. Otherwise, it will be created
      * multiple times but only the last one would be used...
      */
-    if (PJ_type_get_or_null(it.first.c_str(), container->type) == nullptr) {
-      PJ_type_variable_new(it.first.c_str(), nullptr, container->type);
+    if (s_type::getOrNull(it.first.c_str(), container->type) == nullptr) {
+      Type::variableNew(it.first.c_str(), nullptr, container->type);
     }
   }
 #endif
@@ -236,7 +236,7 @@ void TRACE_smpi_collective_in(int rank, const char *operation, instr_extra_data
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   value* val            = value::get_or_new(operation, color, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
@@ -250,7 +250,7 @@ void TRACE_smpi_collective_out(int rank, const char *operation)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
 
   new PopStateEvent (SIMIX_get_clock(), container, type);
 }
@@ -264,7 +264,7 @@ void TRACE_smpi_computing_init(int rank)
  char str[INSTR_DEFAULT_STR_SIZE];
  smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
  container_t container = PJ_container_get(str);
type_t type           = PJ_type_get("MPI_STATE", container->type);
Type* type           = PJ_type_get("MPI_STATE", container->type);
  const char* color     = instr_find_color("computing");
  new PushStateEvent(SIMIX_get_clock(), container, type, value::get_or_new("computing", color, type));
 }
@@ -280,7 +280,7 @@ void TRACE_smpi_computing_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   value* val            = value::get_or_new("computing", nullptr, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -292,7 +292,7 @@ void TRACE_smpi_computing_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
@@ -305,7 +305,7 @@ void TRACE_smpi_sleeping_init(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color ("sleeping");
   value* val            = value::get_or_new("sleeping", color, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val);
@@ -322,7 +322,7 @@ void TRACE_smpi_sleeping_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   value* val            = value::get_or_new("sleeping", nullptr, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -334,7 +334,7 @@ void TRACE_smpi_sleeping_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
@@ -349,7 +349,7 @@ void TRACE_smpi_testing_in(int rank, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   value* val            = value::get_or_new("test", nullptr, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
 }
@@ -361,7 +361,7 @@ void TRACE_smpi_testing_out(int rank)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   new PopStateEvent (SIMIX_get_clock(), container, type);
 }
 
@@ -375,7 +375,7 @@ void TRACE_smpi_ptp_in(int rank, const char *operation, instr_extra_data extra)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
   const char *color = instr_find_color (operation);
   value* val            = value::get_or_new(operation, color, type);
   new PushStateEvent(SIMIX_get_clock(), container, type, val, static_cast<void*>(extra));
@@ -389,7 +389,7 @@ void TRACE_smpi_ptp_out(int rank, int dst, const char *operation)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(rank, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_STATE", container->type);
+  Type* type = PJ_type_get ("MPI_STATE", container->type);
 
   new PopStateEvent (SIMIX_get_clock(), container, type);
 }
@@ -405,7 +405,7 @@ void TRACE_smpi_send(int rank, int src, int dst, int tag, int size)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(src, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
+  Type* type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Send tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
   new StartLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key, size);
 }
@@ -421,7 +421,7 @@ void TRACE_smpi_recv(int src, int dst, int tag)
   char str[INSTR_DEFAULT_STR_SIZE];
   smpi_container(dst, str, INSTR_DEFAULT_STR_SIZE);
   container_t container = PJ_container_get (str);
-  type_t type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
+  Type* type = PJ_type_get ("MPI_LINK", PJ_type_get_root());
   XBT_DEBUG("Recv tracing from %d to %d, tag %d, with key %s", src, dst, tag, key);
   new EndLinkEvent (SIMIX_get_clock(), PJ_container_get_root(), type, container, "PTP", key);
 }