Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill dead code
authorMartin Quinson <martin.quinson@loria.fr>
Tue, 14 Feb 2017 15:54:00 +0000 (16:54 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 15 Feb 2017 14:51:48 +0000 (15:51 +0100)
src/surf/network_interface.hpp
src/surf/network_smpi.cpp
src/surf/network_smpi.hpp

index 507de16..e0462e6 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (c) 2004-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2004-2017. 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. */
 
 /* 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. */
@@ -7,15 +6,11 @@
 #ifndef SURF_NETWORK_INTERFACE_HPP_
 #define SURF_NETWORK_INTERFACE_HPP_
 
 #ifndef SURF_NETWORK_INTERFACE_HPP_
 #define SURF_NETWORK_INTERFACE_HPP_
 
-#include <xbt/base.h>
-
-#include <unordered_map>
-
+#include "simgrid/s4u/Link.hpp"
 #include "src/surf/PropertyHolder.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/surf/PropertyHolder.hpp"
 #include "src/surf/surf_interface.hpp"
-#include "xbt/fifo.h"
-
-#include "simgrid/s4u/Link.hpp"
+#include "xbt/base.h"
+#include <unordered_map>
 
 /***********
  * Classes *
 
 /***********
  * Classes *
@@ -216,9 +211,6 @@ namespace simgrid {
       double latCurrent_;
       double weight_;
       double rate_;
       double latCurrent_;
       double weight_;
       double rate_;
-      const char* senderLinkName_;
-      double senderSize_;
-      xbt_fifo_item_t senderFifoItem_;
     };
   }
 }
     };
   }
 }
index 6d0e8ff..411a467 100644 (file)
@@ -59,61 +59,6 @@ namespace simgrid {
       xbt_dict_free(&gap_lookup);
     }
 
       xbt_dict_free(&gap_lookup);
     }
 
-    void NetworkSmpiModel::gapAppend(double size, LinkImpl* link, NetworkAction* act)
-    {
-      const char* src = link->cname();
-      xbt_fifo_t fifo;
-      NetworkCm02Action *action= static_cast<NetworkCm02Action*>(act);
-
-      if (sg_sender_gap > 0.0) {
-        if (!gap_lookup) {
-          gap_lookup = xbt_dict_new_homogeneous(nullptr);
-        }
-        fifo = (xbt_fifo_t) xbt_dict_get_or_null(gap_lookup, src);
-        action->senderGap_ = 0.0;
-        if (fifo && xbt_fifo_size(fifo) > 0) {
-          /* Compute gap from last send */
-          /*last_action =
-          (surf_action_network_CM02_t)
-          xbt_fifo_get_item_content(xbt_fifo_get_last_item(fifo));*/
-          // bw = net_get_link_bandwidth(link);
-          action->senderGap_ = sg_sender_gap;
-          /*  max(sg_sender_gap,last_action->sender.size / bw);*/
-          action->latency_ += action->senderGap_;
-        }
-        /* Append action as last send */
-        /*action->sender.link_name = link->lmm_resource.generic_resource.name;
-    fifo =
-        (xbt_fifo_t) xbt_dict_get_or_null(gap_lookup,
-                                          action->sender.link_name);
-    if (!fifo) {
-      fifo = xbt_fifo_new();
-      xbt_dict_set(gap_lookup, action->sender.link_name, fifo, nullptr);
-    }
-    action->sender.fifo_item = xbt_fifo_push(fifo, action);*/
-        action->senderSize_ = size;
-      }
-    }
-
-    void NetworkSmpiModel::gapRemove(Action *lmm_action)
-    {
-      NetworkCm02Action *action = static_cast<NetworkCm02Action*>(lmm_action);
-
-      if (sg_sender_gap > 0.0 && action->senderLinkName_ && action->senderFifoItem_) {
-        xbt_fifo_t fifo = (xbt_fifo_t)xbt_dict_get_or_null(gap_lookup, action->senderLinkName_);
-        xbt_fifo_remove_item(fifo, action->senderFifoItem_);
-        size_t size = xbt_fifo_size(fifo);
-        if (size == 0) {
-          xbt_fifo_free(fifo);
-          xbt_dict_remove(gap_lookup, action->senderLinkName_);
-          size = xbt_dict_length(gap_lookup);
-          if (size == 0) {
-            xbt_dict_free(&gap_lookup);
-          }
-        }
-      }
-    }
-
     double NetworkSmpiModel::bandwidthFactor(double size)
     {
       if (smpi_bw_factor.empty())
     double NetworkSmpiModel::bandwidthFactor(double size)
     {
       if (smpi_bw_factor.empty())
index 447ab48..7a2f4db 100644 (file)
@@ -17,8 +17,6 @@ namespace simgrid {
       ~NetworkSmpiModel();
 
       using NetworkCm02Model::gapAppend; // Explicit about overloaded method (silence Woverloaded-virtual from clang)
       ~NetworkSmpiModel();
 
       using NetworkCm02Model::gapAppend; // Explicit about overloaded method (silence Woverloaded-virtual from clang)
-      void gapAppend(double size, LinkImpl* link, NetworkAction* action);
-      void gapRemove(Action *action);
       double latencyFactor(double size);
       double bandwidthFactor(double size);
       double bandwidthConstraint(double rate, double bound, double size);
       double latencyFactor(double size);
       double bandwidthFactor(double size);
       double bandwidthConstraint(double rate, double bound, double size);