Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / src / mc / mc_comm_pattern.hpp
index 7a9b45f..68a42e5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -9,8 +9,6 @@
 #include <vector>
 
 #include "smpi/smpi.h"
-#include "xbt/dynar.h"
-
 #include "src/mc/mc_state.hpp"
 
 namespace simgrid {
@@ -23,15 +21,8 @@ struct PatternCommunicationList {
 }
 }
 
-/**
- *  Type: `xbt_dynar_t<mc_list_comm_pattern_t>`
- */
-extern XBT_PRIVATE xbt_dynar_t initial_communications_pattern;
-
-/**
- *  Type: `xbt_dynar_t<xbt_dynar_t<simgrid::mc::PatternCommunication*>>`
- */
-extern XBT_PRIVATE xbt_dynar_t incomplete_communications_pattern;
+extern XBT_PRIVATE std::vector<simgrid::mc::PatternCommunicationList> initial_communications_pattern;
+extern XBT_PRIVATE std::vector<std::vector<simgrid::mc::PatternCommunication*>> incomplete_communications_pattern;
 
 enum e_mc_call_type_t {
   MC_CALL_TYPE_NONE,
@@ -52,9 +43,9 @@ enum e_mc_comm_pattern_difference_t {
   DATA_DIFF,
 };
 
-static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req)
+static inline e_mc_call_type_t MC_get_call_type(const s_smx_simcall* req)
 {
-  switch (req->call) {
+  switch (req->call_) {
     case SIMCALL_COMM_ISEND:
       return MC_CALL_TYPE_SEND;
     case SIMCALL_COMM_IRECV:
@@ -68,8 +59,7 @@ static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req)
   }
 }
 
-XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value,
-                                        xbt_dynar_t current_pattern, int backtracking);
+XBT_PRIVATE void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t request, int value, int backtracking);
 
 XBT_PRIVATE void MC_restore_communications_pattern(simgrid::mc::State* state);