Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ContextBoost: move static fields where they belong to.
[simgrid.git] / src / surf / network_ib.hpp
index ac9b8a8..ceab7b9 100644 (file)
@@ -10,7 +10,7 @@
 #include "src/surf/network_smpi.hpp"
 #include "xbt/base.h"
 
-#include <map>
+#include <unordered_map>
 
 namespace simgrid {
   namespace surf {
@@ -24,7 +24,7 @@ namespace simgrid {
       NetworkAction *action;
       double init_rate;
       ActiveComm() : destination(nullptr),action(nullptr),init_rate(-1){};
-      ~ActiveComm(){};
+      virtual ~ActiveComm() = default;
     };
 
     class IBNode{
@@ -37,7 +37,7 @@ namespace simgrid {
       //number of comms the node is receiving
       int nbActiveCommsDown;
       explicit IBNode(int id) : id(id),nbActiveCommsDown(0){};
-      ~IBNode(){};
+      virtual ~IBNode() = default;
     };
 
     class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel {
@@ -50,8 +50,8 @@ namespace simgrid {
       ~NetworkIBModel() override;
       void updateIBfactors(NetworkAction *action, IBNode *from, IBNode * to, int remove);
 
-      xbt_dict_t active_nodes;
-      std::map<NetworkAction *, std::pair<IBNode*,IBNode*> > active_comms;
+      std::unordered_map<std::string, IBNode*> active_nodes;
+      std::unordered_map<NetworkAction*, std::pair<IBNode*, IBNode*>> active_comms;
 
       double Bs;
       double Be;