X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a96adb51dabc0c759af11e60c770355f22a54ef3..8b3a964a05100f371bc65e4bdad591d06cb09165:/src/mc/mc_comm_pattern.hpp diff --git a/src/mc/mc_comm_pattern.hpp b/src/mc/mc_comm_pattern.hpp index feac5b4b47..9d55a88136 100644 --- a/src/mc/mc_comm_pattern.hpp +++ b/src/mc/mc_comm_pattern.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. 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 #include "smpi/smpi.h" -#include "xbt/dynar.h" - #include "src/mc/mc_state.hpp" namespace simgrid { @@ -23,27 +21,18 @@ struct PatternCommunicationList { } } -extern "C" { - -/** - * Type: `xbt_dynar_t` - */ -extern XBT_PRIVATE xbt_dynar_t initial_communications_pattern; - -/** - * Type: `xbt_dynar_t>` - */ -extern XBT_PRIVATE xbt_dynar_t incomplete_communications_pattern; +extern XBT_PRIVATE std::vector initial_communications_pattern; +extern XBT_PRIVATE std::vector> incomplete_communications_pattern; -typedef enum { +enum e_mc_call_type_t { MC_CALL_TYPE_NONE, MC_CALL_TYPE_SEND, MC_CALL_TYPE_RECV, MC_CALL_TYPE_WAIT, MC_CALL_TYPE_WAITANY, -} e_mc_call_type_t; +}; -typedef enum { +enum e_mc_comm_pattern_difference_t { NONE_DIFF, TYPE_DIFF, RDV_DIFF, @@ -52,11 +41,11 @@ typedef enum { DST_PROC_DIFF, DATA_SIZE_DIFF, DATA_DIFF, -} e_mc_comm_pattern_difference_t; +}; static inline e_mc_call_type_t MC_get_call_type(smx_simcall_t req) { - switch (req->call) { + switch (req->call_) { case SIMCALL_COMM_ISEND: return MC_CALL_TYPE_SEND; case SIMCALL_COMM_IRECV: @@ -70,13 +59,11 @@ 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); XBT_PRIVATE void MC_state_copy_incomplete_communications_pattern(simgrid::mc::State* state); XBT_PRIVATE void MC_state_copy_index_communications_pattern(simgrid::mc::State* state); -} #endif