Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics: snake_case some random local variables, fields and non-s4u methods
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 11 May 2018 23:12:37 +0000 (01:12 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 11 May 2018 23:20:28 +0000 (01:20 +0200)
src/kernel/activity/ExecImpl.cpp
src/surf/cpu_cas01.cpp
src/surf/cpu_cas01.hpp

index 20c9968..6cecccf 100644 (file)
@@ -126,19 +126,19 @@ simgrid::kernel::activity::ExecImpl::migrate(simgrid::s4u::Host* to)
 {
 
   if (not MC_is_active() && not MC_record_replay_is_active()) {
-    simgrid::kernel::resource::Action* oldAction = this->surf_action_;
-    simgrid::kernel::resource::Action* newAction = to->pimpl_cpu->execution_start(oldAction->get_cost());
-    newAction->set_remains(oldAction->get_remains());
-    newAction->set_data(this);
-    newAction->set_priority(oldAction->get_priority());
+    simgrid::kernel::resource::Action* old_action = this->surf_action_;
+    simgrid::kernel::resource::Action* new_action = to->pimpl_cpu->execution_start(old_action->get_cost());
+    new_action->set_remains(old_action->get_remains());
+    new_action->set_data(this);
+    new_action->set_priority(old_action->get_priority());
 
     // FIXME: the user-defined bound seem to not be kept by LMM, that seem to overwrite it for the multi-core modeling.
     // I hope that the user did not provide any.
 
-    oldAction->set_data(nullptr);
-    oldAction->cancel();
-    oldAction->unref();
-    this->surf_action_ = newAction;
+    old_action->set_data(nullptr);
+    old_action->cancel();
+    old_action->unref();
+    this->surf_action_ = new_action;
   }
 
   onMigration(this, to);
index cc47188..940e88b 100644 (file)
@@ -116,7 +116,7 @@ void CpuCas01::onSpeedChange() {
     CpuCas01Action* action = static_cast<CpuCas01Action*>(var->get_id());
 
     get_model()->get_maxmin_system()->update_variable_bound(action->get_variable(),
-                                                            action->requestedCore() * speed_.scale * speed_.peak);
+                                                            action->requested_core() * speed_.scale * speed_.peak);
   }
 
   Cpu::onSpeedChange();
@@ -172,9 +172,9 @@ CpuAction* CpuCas01::execution_start(double size)
   return new CpuCas01Action(get_model(), size, is_off(), speed_.scale * speed_.peak, get_constraint());
 }
 
-CpuAction* CpuCas01::execution_start(double size, int requestedCores)
+CpuAction* CpuCas01::execution_start(double size, int requested_cores)
 {
-  return new CpuCas01Action(get_model(), size, is_off(), speed_.scale * speed_.peak, get_constraint(), requestedCores);
+  return new CpuCas01Action(get_model(), size, is_off(), speed_.scale * speed_.peak, get_constraint(), requested_cores);
 }
 
 CpuAction *CpuCas01::sleep(double duration)
@@ -211,10 +211,10 @@ CpuAction *CpuCas01::sleep(double duration)
  * Action *
  **********/
 CpuCas01Action::CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
-                               kernel::lmm::Constraint* constraint, int requestedCore)
+                               kernel::lmm::Constraint* constraint, int requested_core)
     : CpuAction(model, cost, failed,
-                model->get_maxmin_system()->variable_new(this, 1.0 / requestedCore, requestedCore * speed, 1))
-    , requestedCore_(requestedCore)
+                model->get_maxmin_system()->variable_new(this, 1.0 / requested_core, requested_core * speed, 1))
+    , requested_core_(requested_core)
 {
   if (model->get_update_algorithm() == kernel::resource::Model::UpdateAlgo::Lazy) {
     set_last_update();
@@ -225,13 +225,13 @@ CpuCas01Action::CpuCas01Action(kernel::resource::Model* model, double cost, bool
 
 CpuCas01Action::CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
                                kernel::lmm::Constraint* constraint)
-    : CpuCas01Action(model, cost, failed, speed, constraint, 1)
+    : CpuCas01Action(model, cost, failed, speed, constraint, /* requested_core */ 1)
 {
 }
 
-int CpuCas01Action::requestedCore()
+int CpuCas01Action::requested_core()
 {
-  return requestedCore_;
+  return requested_core_;
 }
 
 CpuCas01Action::~CpuCas01Action()=default;
index 38a8195..99cbea6 100644 (file)
@@ -63,10 +63,10 @@ public:
   CpuCas01Action(kernel::resource::Model* model, double cost, bool failed, double speed,
                  kernel::lmm::Constraint* constraint);
   ~CpuCas01Action() override;
-  int requestedCore();
+  int requested_core();
 
 private:
-  int requestedCore_ = 1;
+  int requested_core_ = 1;
 };
 
 }