Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
simplify the prototype of LinkCM02 constructor
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 1 Apr 2016 17:06:55 +0000 (19:06 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 1 Apr 2016 17:06:58 +0000 (19:06 +0200)
admitely, cosmetic is a bit subjective

src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/surf_interface.hpp

index 432189d..839cea3 100644 (file)
@@ -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*/)
 }
 
 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,
  * 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;
 {
   m_bandwidth.scale = 1.0;
   m_bandwidth.peak = bandwidth;
index 54cf61f..cf97be4 100644 (file)
@@ -58,9 +58,8 @@ namespace simgrid {
     class NetworkCm02Link : public Link {
     public:
       NetworkCm02Link(NetworkCm02Model *model, const char *name, xbt_dict_t props,
     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;
 
       void apply_event(tmgr_trace_iterator_t event, double value) override;
       void updateBandwidth(double value) override;
index b5ada0e..7fe3e71 100644 (file)
@@ -406,7 +406,7 @@ public:
   bool operator==(const Resource &other) const;
 
   /**
   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]
    *
    * @param event What happened
    * @param value [TODO]