]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/resource/NetworkModel.hpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge network/bandwidth-factor and smpi/bw-factor (and same for latency)
[simgrid.git] / src / kernel / resource / NetworkModel.hpp
index bfe6aa3201b0cadf7612baf4314b319d0fba0cd8..515c0efdbe466a1383039c12dcb062a6dafc2460 100644 (file)
@@ -12,9 +12,7 @@
 
 #include <list>
 
-namespace simgrid {
-namespace kernel {
-namespace resource {
+namespace simgrid::kernel::resource {
 
 /*********
  * Model *
@@ -28,6 +26,7 @@ class NetworkModel : public Model, public NetworkModelIntf {
 public:
   static config::Flag<double> cfg_tcp_gamma;
   static config::Flag<bool> cfg_crosstraffic;
+  static config::Flag<double> cfg_weight_S_parameter;
 
   using Model::Model;
   NetworkModel(const NetworkModel&) = delete;
@@ -65,7 +64,7 @@ public:
    * @param size The size of the message.
    * @return The latency factor.
    */
-  virtual double get_latency_factor(double /* size */) { return sg_latency_factor; }
+  virtual double get_latency_factor(double size = 0);
 
   /**
    * @brief Get the right multiplicative factor for the bandwidth.
@@ -76,7 +75,7 @@ public:
    * @param size The size of the message.
    * @return The bandwidth factor.
    */
-  virtual double get_bandwidth_factor(double /* size*/) { return sg_bandwidth_factor; }
+  virtual double get_bandwidth_factor(double size = 0);
 
   double next_occurring_event_full(double now) override;
 
@@ -140,8 +139,6 @@ void add_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<
 void insert_link_latency(std::vector<StandardLinkImpl*>& result, const std::vector<StandardLinkImpl*>& links,
                          double* latency);
 
-} // namespace resource
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::resource
 
 #endif /* SIMGRID_KERNEL_RESOURCE_NETWORKMODEL_HPP */