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 20e877c..f3fa297 100644 (file)
@@ -117,6 +117,8 @@ public:
    *  @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; }
 
@@ -193,7 +195,6 @@ private:
   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);
index bac3a43..a0ad4e1 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
-        updateRemainingLazy(surf_get_clock());
+        update_remains_lazy(surf_get_clock());
       }
     }
     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 */
-    updateRemainingLazy(surf_get_clock());
+    update_remains_lazy(surf_get_clock());
   XBT_OUT();
   return remains_;
 }
index 77560d6..a09aeb6 100644 (file)
@@ -65,7 +65,7 @@ double Model::nextOccuringEventLazy(double now)
     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();
index d854732..fe03201 100644 (file)
@@ -173,7 +173,7 @@ void Cpu::setSpeedTrace(tmgr_trace_t trace)
  * 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.");
index c642170..8b66b85 100644 (file)
@@ -163,7 +163,7 @@ public:
 
   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;
index b5af233..c458d31 100644 (file)
@@ -462,7 +462,7 @@ void NetworkCm02Link::setLatency(double value)
  * Action *
  **********/
 
-void NetworkCm02Action::updateRemainingLazy(double now)
+void NetworkCm02Action::update_remains_lazy(double now)
 {
   if (suspended_ != Action::SuspendStates::not_suspended)
     return;
index f9904fd..aa76ddf 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;
-  void updateRemainingLazy(double now) override;
+  void update_remains_lazy(double now) override;
 };
 }
 }
index 9a582d7..9424f59 100644 (file)
@@ -84,7 +84,7 @@ NetworkConstantAction::NetworkConstantAction(NetworkConstantModel* model_, doubl
 
 NetworkConstantAction::~NetworkConstantAction() = default;
 
-void NetworkConstantAction::updateRemainingLazy(double /*now*/)
+void NetworkConstantAction::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
index 198dd8a..0336b1e 100644 (file)
@@ -42,7 +42,7 @@ namespace simgrid {
       NetworkConstantAction(NetworkConstantModel *model_, double size, double latency);
       ~NetworkConstantAction();
       double initialLatency_;
-      void updateRemainingLazy(double now) override;
+      void update_remains_lazy(double now) override;
     };
 
   }
index 3821b8a..b041a13 100644 (file)
@@ -339,7 +339,7 @@ std::list<LinkImpl*> NetworkNS3Action::links()
 {
   THROW_UNIMPLEMENTED;
 }
-void NetworkNS3Action::updateRemainingLazy(double /*now*/)
+void NetworkNS3Action::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
index dbf99ea..15d4f5f 100644 (file)
@@ -51,7 +51,7 @@ public:
   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;
index 47234a0..5fb3125 100644 (file)
@@ -173,7 +173,7 @@ void StorageN11Action::set_priority(double /*priority*/)
 {
   THROW_UNIMPLEMENTED;
 }
-void StorageN11Action::updateRemainingLazy(double /*now*/)
+void StorageN11Action::update_remains_lazy(double /*now*/)
 {
   THROW_IMPOSSIBLE;
 }
index 1e4d342..0570669 100644 (file)
@@ -60,7 +60,7 @@ public:
   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;
 };
 
 }