From: Martin Quinson Date: Fri, 1 Apr 2016 17:06:55 +0000 (+0200) Subject: simplify the prototype of LinkCM02 constructor X-Git-Tag: v3_13~180^2~19 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/2d70b641ae218aba41b9cd70914419abcfa63b94 simplify the prototype of LinkCM02 constructor admitely, cosmetic is a bit subjective --- diff --git a/src/surf/network_cm02.cpp b/src/surf/network_cm02.cpp index 432189ddf6..839cea3413 100644 --- a/src/surf/network_cm02.cpp +++ b/src/surf/network_cm02.cpp @@ -166,9 +166,10 @@ NetworkCm02Model::NetworkCm02Model() } } -Link* NetworkCm02Model::createLink(const char *name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy, xbt_dict_t properties) +Link* NetworkCm02Model::createLink(const char *name, double bandwidth, double latency, e_surf_link_sharing_policy_t policy, + xbt_dict_t properties) { - return new NetworkCm02Link(this, name, properties, maxminSystem_, sg_bandwidth_factor * bandwidth, bandwidth, latency, policy); + return new NetworkCm02Link(this, name, properties, bandwidth, latency, policy, maxminSystem_); } void NetworkCm02Model::updateActionsStateLazy(double now, double /*delta*/) @@ -389,11 +390,9 @@ Action *NetworkCm02Model::communicate(NetCard *src, NetCard *dst, double size, d * Resource * ************/ NetworkCm02Link::NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props, - lmm_system_t system, - double constraint_value, - double bandwidth, double latency, - e_surf_link_sharing_policy_t policy) -: Link(model, name, props, lmm_constraint_new(system, this, constraint_value)) + double bandwidth, double latency, e_surf_link_sharing_policy_t policy, + lmm_system_t system) +: Link(model, name, props, lmm_constraint_new(system, this, sg_bandwidth_factor * bandwidth)) { m_bandwidth.scale = 1.0; m_bandwidth.peak = bandwidth; diff --git a/src/surf/network_cm02.hpp b/src/surf/network_cm02.hpp index 54cf61fe09..cf97be463f 100644 --- a/src/surf/network_cm02.hpp +++ b/src/surf/network_cm02.hpp @@ -58,9 +58,8 @@ namespace simgrid { class NetworkCm02Link : public Link { public: NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props, - lmm_system_t system, - double constraint_value, double bandwidth, double latency, - e_surf_link_sharing_policy_t policy); + double bandwidth, double latency, e_surf_link_sharing_policy_t policy, + lmm_system_t system); void apply_event(tmgr_trace_iterator_t event, double value) override; void updateBandwidth(double value) override; diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index b5ada0e884..7fe3e71f64 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -406,7 +406,7 @@ public: bool operator==(const Resource &other) const; /** - * @brief Apply an event of external load event to that storage + * @brief Apply an event of external load event to that resource * * @param event What happened * @param value [TODO]