X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/0fe1137efda109ff1a402ab5f8317d3ec3a676dc..bca02117715fbb22f82ec815bcd6441bffb7a3b5:/src/surf/network_ib.hpp diff --git a/src/surf/network_ib.hpp b/src/surf/network_ib.hpp index 26a27eaf46..b8357fb559 100644 --- a/src/surf/network_ib.hpp +++ b/src/surf/network_ib.hpp @@ -10,48 +10,55 @@ #include #include "network_smpi.hpp" -class XBT_PRIVATE IBNode; - -class XBT_PRIVATE ActiveComm{ -public : - //IBNode* origin; - IBNode* destination; - NetworkAction *action; - double init_rate; - ActiveComm() : destination(NULL),action(NULL),init_rate(-1){}; - ~ActiveComm(){}; -}; - -class IBNode{ -public : - int id; - //store related links, to ease computation of the penalties - std::vector ActiveCommsUp; - //store the number of comms received from each node - std::map ActiveCommsDown; - //number of comms the node is receiving - int nbActiveCommsDown; - IBNode(int id) : id(id),nbActiveCommsDown(0){}; - ~IBNode(){}; -}; - -class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel { -private: - void updateIBfactors_rec(IBNode *root, bool* updatedlist); - void computeIBfactors(IBNode *root); -public: - NetworkIBModel(); - NetworkIBModel(const char *name); - ~NetworkIBModel(); - void updateIBfactors(NetworkAction *action, IBNode *from, IBNode * to, int remove); - - xbt_dict_t active_nodes; - std::map > active_comms; - - double Bs; - double Be; - double ys; - -}; + +namespace simgrid { + namespace surf { + + class XBT_PRIVATE IBNode; + + class XBT_PRIVATE ActiveComm{ + public : + //IBNode* origin; + IBNode* destination; + NetworkAction *action; + double init_rate; + ActiveComm() : destination(NULL),action(NULL),init_rate(-1){}; + ~ActiveComm(){}; + }; + + class IBNode{ + public : + int id; + //store related links, to ease computation of the penalties + std::vector ActiveCommsUp; + //store the number of comms received from each node + std::map ActiveCommsDown; + //number of comms the node is receiving + int nbActiveCommsDown; + IBNode(int id) : id(id),nbActiveCommsDown(0){}; + ~IBNode(){}; + }; + + class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel { + private: + void updateIBfactors_rec(IBNode *root, bool* updatedlist); + void computeIBfactors(IBNode *root); + public: + NetworkIBModel(); + NetworkIBModel(const char *name); + ~NetworkIBModel(); + void updateIBfactors(NetworkAction *action, IBNode *from, IBNode * to, int remove); + + xbt_dict_t active_nodes; + std::map > active_comms; + + double Bs; + double Be; + double ys; + + }; + + } +} #endif