]> AND Public Git Repository - simgrid.git/blobdiff - src/mc/mc_pattern.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Declare local variables inside the if statement.
[simgrid.git] / src / mc / mc_pattern.hpp
index bb26c9da9b1135e692bbb0504796af96bb0c6764..a901c14b2df9fa2fb1c47c2b5ef160be2b4df608 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2022. 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. */
@@ -7,48 +7,11 @@
 #define SIMGRID_MC_PATTERN_H
 
 #include "src/kernel/activity/CommImpl.hpp"
+#include "src/mc/remote/RemotePtr.hpp"
 
 namespace simgrid {
 namespace mc {
 
-enum class PatternCommunicationType {
-  none    = 0,
-  send    = 1,
-  receive = 2,
-};
-
-class PatternCommunication {
-public:
-  int num = 0;
-  RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr{nullptr};
-  PatternCommunicationType type = PatternCommunicationType::send;
-  unsigned long src_proc        = 0;
-  unsigned long dst_proc        = 0;
-  const xbt::string* src_host   = nullptr;
-  const xbt::string* dst_host   = nullptr;
-  std::string rdv;
-  std::vector<char> data;
-  int tag   = 0;
-  int index = 0;
-
-  PatternCommunication dup() const
-  {
-    simgrid::mc::PatternCommunication res;
-    // num?
-    res.comm_addr = this->comm_addr;
-    res.type      = this->type;
-    // src_proc?
-    // dst_proc?
-    res.dst_proc = this->dst_proc;
-    res.dst_host = this->dst_host;
-    res.rdv      = this->rdv;
-    res.data     = this->data;
-    // tag?
-    res.index = this->index;
-    return res;
-  }
-};
-
 /* On every state, each actor has an entry of the following type.
  * This represents both the actor and its transition because
  *   an actor cannot have more than one enabled transition at a given time.