X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/30aca4d4af004d1ec899d12f0a9fe3997e9be15e..d4836dbfe1376399c84e1522fc2c2a0f8e410c5c:/src/surf/network_ib.hpp diff --git a/src/surf/network_ib.hpp b/src/surf/network_ib.hpp index ac9b8a8da5..df41a8873a 100644 --- a/src/surf/network_ib.hpp +++ b/src/surf/network_ib.hpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2014-2015. The SimGrid Team. +/* Copyright (c) 2014-2017. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -10,7 +10,8 @@ #include "src/surf/network_smpi.hpp" #include "xbt/base.h" -#include +#include +#include namespace simgrid { namespace surf { @@ -24,7 +25,7 @@ namespace simgrid { NetworkAction *action; double init_rate; ActiveComm() : destination(nullptr),action(nullptr),init_rate(-1){}; - ~ActiveComm(){}; + virtual ~ActiveComm() = default; }; class IBNode{ @@ -37,12 +38,12 @@ 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 { private: - void updateIBfactors_rec(IBNode *root, bool* updatedlist); + void updateIBfactors_rec(IBNode* root, std::vector& updatedlist); void computeIBfactors(IBNode *root); public: NetworkIBModel(); @@ -50,8 +51,8 @@ namespace simgrid { ~NetworkIBModel() override; void updateIBfactors(NetworkAction *action, IBNode *from, IBNode * to, int remove); - xbt_dict_t active_nodes; - std::map > active_comms; + std::unordered_map active_nodes; + std::unordered_map> active_comms; double Bs; double Be;