Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
snake_case another method
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Mar 2018 06:57:28 +0000 (08:57 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 26 Mar 2018 06:57:28 +0000 (08:57 +0200)
13 files changed:
include/simgrid/kernel/resource/Action.hpp
src/kernel/resource/Action.cpp
src/kernel/resource/Model.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp
src/surf/network_cm02.cpp
src/surf/network_cm02.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/storage_n11.cpp
src/surf/storage_n11.hpp

index 20e877ca766b53b07eee2220e71e52d39a0975a4..f3fa29799d9bc338eb4248a08fdaa633795f4a39 100644 (file)
@@ -117,6 +117,8 @@ public:
    *  @param delta Amount to remove from the remaining time */
   void update_remains(double delta);
 
    *  @param delta Amount to remove from the remaining time */
   void update_remains(double delta);
 
+  virtual void update_remains_lazy(double now) = 0;
+
   /** @brief Set the remaining time of the current action */
   void set_remains(double value) { remains_ = value; }
 
   /** @brief Set the remaining time of the current action */
   void set_remains(double value) { remains_ = value; }
 
@@ -193,7 +195,6 @@ private:
   boost::optional<heap_type::handle_type> heap_handle_ = boost::none;
 
 public:
   boost::optional<heap_type::handle_type> heap_handle_ = boost::none;
 
 public:
-  virtual void updateRemainingLazy(double now) = 0;
   void heapInsert(heap_type& heap, double key, Action::Type hat);
   void heapRemove(heap_type& heap);
   void heapUpdate(heap_type& heap, double key, Action::Type hat);
   void heapInsert(heap_type& heap, double key, Action::Type hat);
   void heapRemove(heap_type& heap);
   void heapUpdate(heap_type& heap, double key, Action::Type hat);
index bac3a436610351e9210aedbfb9f17a78dd46ac98..a0ad4e1dc1898ff409d64ac67fbfd46756b92882 100644 (file)
@@ -164,7 +164,7 @@ void Action::suspend()
       if (get_model()->getUpdateMechanism() == UM_LAZY && state_set_ == get_model()->getRunningActionSet() &&
           sharing_priority_ > 0) {
         // If we have a lazy model, we need to update the remaining value accordingly
       if (get_model()->getUpdateMechanism() == UM_LAZY && state_set_ == get_model()->getRunningActionSet() &&
           sharing_priority_ > 0) {
         // If we have a lazy model, we need to update the remaining value accordingly
-        updateRemainingLazy(surf_get_clock());
+        update_remains_lazy(surf_get_clock());
       }
     }
     suspended_ = SuspendStates::suspended;
       }
     }
     suspended_ = SuspendStates::suspended;
@@ -225,7 +225,7 @@ double Action::get_remains()
   XBT_IN("(%p)", this);
   /* update remains before return it */
   if (get_model()->getUpdateMechanism() == UM_LAZY) /* update remains before return it */
   XBT_IN("(%p)", this);
   /* update remains before return it */
   if (get_model()->getUpdateMechanism() == UM_LAZY) /* update remains before return it */
-    updateRemainingLazy(surf_get_clock());
+    update_remains_lazy(surf_get_clock());
   XBT_OUT();
   return remains_;
 }
   XBT_OUT();
   return remains_;
 }
index 77560d6f00598ce7d0827dc3968f0e676818bc1a..a09aeb6ef004285e01c03c7f12fec5306049d392 100644 (file)
@@ -65,7 +65,7 @@ double Model::nextOccuringEventLazy(double now)
     if (action->get_priority() <= 0 || action->getType() == Action::Type::LATENCY)
       continue;
 
     if (action->get_priority() <= 0 || action->getType() == Action::Type::LATENCY)
       continue;
 
-    action->updateRemainingLazy(now);
+    action->update_remains_lazy(now);
 
     double min   = -1;
     double share = action->getVariable()->get_value();
 
     double min   = -1;
     double share = action->getVariable()->get_value();
index d854732c1b7455f567afd2199659a5fea776a065..fe032014efe9be325773aa4e15deb5e66f2ff24c 100644 (file)
@@ -173,7 +173,7 @@ void Cpu::setSpeedTrace(tmgr_trace_t trace)
  * Action *
  **********/
 
  * Action *
  **********/
 
-void CpuAction::updateRemainingLazy(double now)
+void CpuAction::update_remains_lazy(double now)
 {
   xbt_assert(get_state_set() == get_model()->getRunningActionSet(), "You're updating an action that is not running.");
   xbt_assert(get_priority() > 0, "You're updating an action that seems suspended.");
 {
   xbt_assert(get_state_set() == get_model()->getRunningActionSet(), "You're updating an action that is not running.");
   xbt_assert(get_priority() > 0, "You're updating an action that seems suspended.");
index c642170664920ff621e29829c94a317a0297ab30..8b66b85f68535d39c1f9c80cfab1f6fbce9398d1 100644 (file)
@@ -163,7 +163,7 @@ public:
 
   void set_state(simgrid::kernel::resource::Action::State state) override;
 
 
   void set_state(simgrid::kernel::resource::Action::State state) override;
 
-  void updateRemainingLazy(double now) override;
+  void update_remains_lazy(double now) override;
   std::list<Cpu*> cpus();
   
   void suspend() override;
   std::list<Cpu*> cpus();
   
   void suspend() override;
index b5af233fa6582f2c7a6a649343d89c2d75f0de25..c458d31777e442c3de9b6801ca84147da46f94eb 100644 (file)
@@ -462,7 +462,7 @@ void NetworkCm02Link::setLatency(double value)
  * Action *
  **********/
 
  * Action *
  **********/
 
-void NetworkCm02Action::updateRemainingLazy(double now)
+void NetworkCm02Action::update_remains_lazy(double now)
 {
   if (suspended_ != Action::SuspendStates::not_suspended)
     return;
 {
   if (suspended_ != Action::SuspendStates::not_suspended)
     return;
index f9904fd58d61c8a260b08fe9ab31033ed534b40b..aa76ddf94b847067a8bedc51149861ff5fe6eda1 100644 (file)
@@ -69,7 +69,7 @@ class NetworkCm02Action : public NetworkAction {
 public:
   NetworkCm02Action(kernel::resource::Model* model, double cost, bool failed) : NetworkAction(model, cost, failed){};
   virtual ~NetworkCm02Action() = default;
 public:
   NetworkCm02Action(kernel::resource::Model* model, double cost, bool failed) : NetworkAction(model, cost, failed){};
   virtual ~NetworkCm02Action() = default;
-  void updateRemainingLazy(double now) override;
+  void update_remains_lazy(double now) override;
 };
 }
 }
 };
 }
 }
index 9a582d7a6f4c093aeea3ac3dd00379a3073409e2..9424f5956ef77c4bd2aa8c008db4bbf8439dadfa 100644 (file)
@@ -84,7 +84,7 @@ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, doubl
 
 NetworkConstantAction::~NetworkConstantAction() = default;
 
 
 NetworkConstantAction::~NetworkConstantAction() = default;
 
-void NetworkConstantAction::updateRemainingLazy(double /*now*/)
+void NetworkConstantAction::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
 {
   THROW_IMPOSSIBLE;
 }
index 198dd8ac4e815757dbdf1d8dbed36395b865239b..0336b1e6f98572565f1ba9c8373320e25ff8ece5 100644 (file)
@@ -42,7 +42,7 @@ namespace simgrid {
       NetworkConstantAction(NetworkConstantModel *model_, double size, double latency);
       ~NetworkConstantAction();
       double initialLatency_;
       NetworkConstantAction(NetworkConstantModel *model_, double size, double latency);
       ~NetworkConstantAction();
       double initialLatency_;
-      void updateRemainingLazy(double now) override;
+      void update_remains_lazy(double now) override;
     };
 
   }
     };
 
   }
index 3821b8a361300636ac61c0e87a0618ce5961ea1f..b041a1387b254818a747a6b9b43669d7c6ff9a2e 100644 (file)
@@ -339,7 +339,7 @@ std::list<LinkImpl*> NetworkNS3Action::links()
 {
   THROW_UNIMPLEMENTED;
 }
 {
   THROW_UNIMPLEMENTED;
 }
-void NetworkNS3Action::updateRemainingLazy(double /*now*/)
+void NetworkNS3Action::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
 {
   THROW_IMPOSSIBLE;
 }
index dbf99ea794228e9f7d9a9a4d9f7e0802642fe429..15d4f5fccdb0b58da5f2b7dbf1fa4a9d5d3de5d0 100644 (file)
@@ -51,7 +51,7 @@ public:
   void suspend() override;
   void resume() override;
   std::list<LinkImpl*> links() override;
   void suspend() override;
   void resume() override;
   std::list<LinkImpl*> links() override;
-  void updateRemainingLazy(double now) override;
+  void update_remains_lazy(double now) override;
 
   // private:
   double lastSent_ = 0;
 
   // private:
   double lastSent_ = 0;
index 47234a01f83170163326bed1c85618a8946590e5..5fb3125cfedf61d400d5857590f14d11d1e55edc 100644 (file)
@@ -173,7 +173,7 @@ void StorageN11Action::set_priority(double /*priority*/)
 {
   THROW_UNIMPLEMENTED;
 }
 {
   THROW_UNIMPLEMENTED;
 }
-void StorageN11Action::updateRemainingLazy(double /*now*/)
+void StorageN11Action::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
 {
   THROW_IMPOSSIBLE;
 }
index 1e4d3426ab4752cbca582b1fd6a1a33f7caf8a8c..0570669fd6088c1815b851ee5ec62c8c2c06a0fa 100644 (file)
@@ -60,7 +60,7 @@ public:
   bool isSuspended() override;
   void set_max_duration(double duration) override;
   void set_priority(double priority) override;
   bool isSuspended() override;
   void set_max_duration(double duration) override;
   void set_priority(double priority) override;
-  void updateRemainingLazy(double now) override;
+  void update_remains_lazy(double now) override;
 };
 
 }
 };
 
 }