Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Dead code elimination.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 31 Mar 2022 09:43:58 +0000 (11:43 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Thu, 31 Mar 2022 18:53:10 +0000 (20:53 +0200)
src/kernel/lmm/System.cpp
src/kernel/lmm/System.hpp
src/mc/explo/CommunicationDeterminismChecker.cpp
src/surf/network_cm02.cpp

index 1df04f4..fcf84f3 100644 (file)
@@ -758,12 +758,6 @@ double Constraint::get_usage() const
   return result;
 }
 
-int Constraint::get_variable_amount() const
-{
-  return static_cast<int>(std::count_if(std::begin(enabled_element_set_), std::end(enabled_element_set_),
-                                        [](const Element& elem) { return elem.consumption_weight > 0; }));
-}
-
 void Constraint::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearResourceCb& cb)
 {
   xbt_assert(policy == SharingPolicy::NONLINEAR || not cb,
@@ -774,4 +768,4 @@ void Constraint::set_sharing_policy(SharingPolicy policy, const s4u::NonLinearRe
 
 } // namespace lmm
 } // namespace kernel
-} // namespace simgrid
\ No newline at end of file
+} // namespace simgrid
index 9610b79..7293825 100644 (file)
@@ -221,7 +221,6 @@ public:
 
   /** @brief Get the usage of the constraint after the last lmm solve */
   double get_usage() const;
-  int get_variable_amount() const;
 
   /** @brief Sets the concurrency limit for this constraint */
   void set_concurrency_limit(int limit)
index 6e1bcba..bd4fa6e 100644 (file)
@@ -287,8 +287,6 @@ void CommDetExtension::handle_comm_pattern(const Transition* transition)
 
   switch (transition->type_) {
     case Transition::Type::COMM_SEND:
-      get_comm_pattern(transition);
-      break;
     case Transition::Type::COMM_RECV:
       get_comm_pattern(transition);
       break;
index 8d1b395..010b39c 100644 (file)
@@ -182,13 +182,10 @@ void NetworkCm02Model::update_actions_state_full(double /*now*/, double delta)
     auto& action = static_cast<NetworkCm02Action&>(*it);
     ++it; // increment iterator here since the following calls to action.finish() may invalidate it
     XBT_DEBUG("Something happened to action %p", &action);
-    double deltap = delta;
     if (action.latency_ > 0) {
-      if (action.latency_ > deltap) {
-        double_update(&action.latency_, deltap, sg_surf_precision);
-        deltap = 0.0;
+      if (action.latency_ > delta) {
+        double_update(&action.latency_, delta, sg_surf_precision);
       } else {
-        double_update(&deltap, action.latency_, sg_surf_precision);
         action.latency_ = 0.0;
       }
       if (action.latency_ <= 0.0 && not action.is_suspended())