X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e709643ef0c5b61c6c878016c418bffa2b1b20cd..HEAD:/src/surf/network_ib.hpp diff --git a/src/surf/network_ib.hpp b/src/surf/network_ib.hpp deleted file mode 100644 index 72eecd3af8..0000000000 --- a/src/surf/network_ib.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright (c) 2014-2020. 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. */ - -#ifndef SURF_NETWORK_IB_HPP_ -#define SURF_NETWORK_IB_HPP_ - -#include "src/surf/network_smpi.hpp" -#include "xbt/base.h" - -#include -#include - -namespace simgrid { -namespace kernel { -namespace resource { - -class XBT_PRIVATE IBNode; - -struct XBT_PRIVATE ActiveComm { - IBNode* destination = nullptr; - NetworkAction* action = nullptr; - double init_rate = -1; -}; - -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 = 0; - explicit IBNode(int id) : id(id){}; - virtual ~IBNode() = default; -}; - -class XBT_PRIVATE NetworkIBModel : public NetworkSmpiModel { - double Bs; - double Be; - double ys; - void updateIBfactors_rec(IBNode* root, std::vector& updatedlist) const; - void computeIBfactors(IBNode* root) const; - -public: - NetworkIBModel(); - explicit NetworkIBModel(const char* name); - NetworkIBModel(const NetworkIBModel&) = delete; - NetworkIBModel& operator=(const NetworkIBModel&) = delete; - void updateIBfactors(NetworkAction* action, IBNode* from, IBNode* to, int remove) const; - - std::unordered_map active_nodes; - std::unordered_map> active_comms; -}; -} // namespace resource -} // namespace kernel -} // namespace simgrid -#endif