Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename next_occuring_event() into nextOccuringEvent()
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Oct 2016 16:03:29 +0000 (18:03 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 2 Oct 2016 16:03:29 +0000 (18:03 +0200)
19 files changed:
src/surf/cpu_ti.cpp
src/surf/cpu_ti.hpp
src/surf/host_clm03.cpp
src/surf/host_clm03.hpp
src/surf/network_constant.cpp
src/surf/network_constant.hpp
src/surf/network_interface.cpp
src/surf/network_interface.hpp
src/surf/network_ns3.cpp
src/surf/network_ns3.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/storage_n11.cpp
src/surf/storage_n11.hpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp
src/surf/surf_interface.hpp
src/surf/virtual_machine.cpp
src/surf/virtual_machine.hpp

index 8ab9009..97ee3c2 100644 (file)
@@ -360,7 +360,7 @@ Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, std::vector<double>* speedP
   return new CpuTi(this, host, speedPerPstate, core);
 }
 
-double CpuTiModel::next_occuring_event(double now)
+double CpuTiModel::nextOccuringEvent(double now)
 {
   double min_action_duration = -1;
 
index b99ecd3..4636311 100644 (file)
@@ -149,7 +149,7 @@ public:
   CpuTiModel();
   ~CpuTiModel() override;
   Cpu *createCpu(simgrid::s4u::Host *host,  std::vector<double>* speedPerPstate, int core) override;
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   void updateActionsState(double now, double delta) override;
 
   ActionList *runningActionSetThatDoesNotNeedBeingChecked_;
index 0c95e43..ffdf58f 100644 (file)
@@ -48,12 +48,12 @@ namespace surf {
 
 HostCLM03Model::~HostCLM03Model() {}
 
-double HostCLM03Model::next_occuring_event(double now){
+double HostCLM03Model::nextOccuringEvent(double now){
   adjustWeightOfDummyCpuActions();
 
-  double min_by_cpu = surf_cpu_model_pm->next_occuring_event(now);
-  double min_by_net = surf_network_model->next_occuring_event_isIdempotent() ? surf_network_model->next_occuring_event(now) : -1;
-  double min_by_sto = surf_storage_model->next_occuring_event(now);
+  double min_by_cpu = surf_cpu_model_pm->nextOccuringEvent(now);
+  double min_by_net = surf_network_model->next_occuring_event_isIdempotent() ? surf_network_model->nextOccuringEvent(now) : -1;
+  double min_by_sto = surf_storage_model->nextOccuringEvent(now);
 
   XBT_DEBUG("model %p, %s min_by_cpu %f, %s min_by_net %f, %s min_by_sto %f",
       this, typeid(surf_cpu_model_pm).name(), min_by_cpu,
index bc7ad09..7e8b568 100644 (file)
@@ -31,7 +31,7 @@ class HostCLM03Model : public HostModel {
 public:
   HostCLM03Model(): HostModel(){}
   ~HostCLM03Model() override;
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   void updateActionsState(double now, double delta) override;
 };
 }
index 4daf864..74c1678 100644 (file)
@@ -33,7 +33,7 @@ namespace simgrid {
       return nullptr;
     }
 
-    double NetworkConstantModel::next_occuring_event(double /*now*/)
+    double NetworkConstantModel::nextOccuringEvent(double /*now*/)
     {
       double min = -1.0;
 
index e66a224..7a8644d 100644 (file)
@@ -30,7 +30,7 @@ namespace simgrid {
       ~NetworkConstantModel() override;
 
       Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate) override;
-      double next_occuring_event(double now) override;
+      double nextOccuringEvent(double now) override;
       bool next_occuring_event_isIdempotent() override {return true;}
       void updateActionsState(double now, double delta) override;
 
index b983e7c..9100fea 100644 (file)
@@ -129,9 +129,9 @@ namespace simgrid {
       return rate;
     }
 
-    double NetworkModel::next_occuring_event_full(double now)
+    double NetworkModel::nextOccuringEventFull(double now)
     {
-      double minRes = Model::next_occuring_event_full(now);
+      double minRes = Model::nextOccuringEventFull(now);
 
       for(auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; it++) {
         NetworkAction *action = static_cast<NetworkAction*>(&*it);
index 4c71d84..c84b48f 100644 (file)
@@ -119,7 +119,7 @@ namespace simgrid {
        * @return The new bandwidth.
        */
       virtual double bandwidthConstraint(double rate, double bound, double size);
-      double next_occuring_event_full(double now) override;
+      double nextOccuringEventFull(double now) override;
     };
 
     /************
index 14cea53..a2956c8 100644 (file)
@@ -256,7 +256,7 @@ Action *NetworkNS3Model::communicate(simgrid::kernel::routing::NetCard *src,simg
   return new NetworkNS3Action(this, size, src, dst);
 }
 
-double NetworkNS3Model::next_occuring_event(double now)
+double NetworkNS3Model::nextOccuringEvent(double now)
 {
   double time_to_next_flow_completion;
   XBT_DEBUG("ns3_next_occuring_event");
index c894aa4..e4254be 100644 (file)
@@ -22,7 +22,7 @@ public:
   Link* createLink(const char *name, double bandwidth, double latency,
       e_surf_link_sharing_policy_t policy, xbt_dict_t properties) override;
   Action *communicate(kernel::routing::NetCard *src, kernel::routing::NetCard *dst, double size, double rate);
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   bool next_occuring_event_isIdempotent() {return false;}
   void updateActionsState(double now, double delta) override;
 };
index 7a8c2b9..c2ab8f0 100644 (file)
@@ -72,9 +72,9 @@ NetworkL07Model::~NetworkL07Model()
 }
 
 
-double HostL07Model::next_occuring_event(double now)
+double HostL07Model::nextOccuringEvent(double now)
 {
-  double min = HostModel::next_occuring_event_full(now);
+  double min = HostModel::nextOccuringEventFull(now);
   for (auto it(getRunningActionSet()->begin()), itend(getRunningActionSet()->end()); it != itend ; ++it) {
     L07Action *action = static_cast<L07Action*>(&*it);
     if (action->m_latency > 0 && (min < 0 || action->m_latency < min)) {
index 9d04223..585e0a8 100644 (file)
@@ -39,7 +39,7 @@ public:
   HostL07Model();
   ~HostL07Model();
 
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   void updateActionsState(double now, double delta) override;
   Action *executeParallelTask(int host_nb, sg_host_t *host_list,
                               double *flops_amount, double *bytes_amount, double rate) override;
index d19d438..7d88c8f 100644 (file)
@@ -110,9 +110,9 @@ Storage *StorageN11Model::createStorage(const char* id, const char* type_id,
   return storage;
 }
 
-double StorageN11Model::next_occuring_event(double now)
+double StorageN11Model::nextOccuringEvent(double now)
 {
-  double min_completion = StorageModel::next_occuring_event_full(now);
+  double min_completion = StorageModel::nextOccuringEventFull(now);
 
   for(auto storage: p_storageList) {
     double rate = 0;
index ff0a122..51c43d0 100644 (file)
@@ -32,7 +32,7 @@ public:
   ~StorageN11Model();
   Storage *createStorage(const char* id, const char* type_id,
        const char* content_name, const char* content_type, xbt_dict_t properties, const char* attach) override;
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   void updateActionsState(double now, double delta) override;
 };
 
index cbbd1a0..e0c865b 100644 (file)
@@ -68,13 +68,13 @@ double surf_solve(double max_date)
 
   /* Physical models MUST be resolved first */
   XBT_DEBUG("Looking for next event in physical models");
-  double next_event_phy = surf_host_model->next_occuring_event(NOW);
+  double next_event_phy = surf_host_model->nextOccuringEvent(NOW);
   if ((time_delta < 0.0 || next_event_phy < time_delta) && next_event_phy >= 0.0) {
     time_delta = next_event_phy;
   }
   if (surf_vm_model != nullptr) {
     XBT_DEBUG("Looking for next event in virtual models");
-    double next_event_virt = surf_vm_model->next_occuring_event(NOW);
+    double next_event_virt = surf_vm_model->nextOccuringEvent(NOW);
     if ((time_delta < 0.0 || next_event_virt < time_delta) && next_event_virt >= 0.0)
       time_delta = next_event_virt;
   }
@@ -96,7 +96,7 @@ double surf_solve(double max_date)
 
       XBT_DEBUG("Run the NS3 network at most %fs", time_delta);
       // run until min or next flow
-      model_next_action_end = surf_network_model->next_occuring_event(time_delta);
+      model_next_action_end = surf_network_model->nextOccuringEvent(time_delta);
 
       XBT_DEBUG("Min for network : %f", model_next_action_end);
       if(model_next_action_end>=0.0)
index 78ee9ff..66dad37 100644 (file)
@@ -393,18 +393,18 @@ Model::~Model(){
   delete doneActionSet_;
 }
 
-double Model::next_occuring_event(double now)
+double Model::nextOccuringEvent(double now)
 {
   //FIXME: set the good function once and for all
   if (updateMechanism_ == UM_LAZY)
-    return next_occuring_event_lazy(now);
+    return nextOccuringEventLazy(now);
   else if (updateMechanism_ == UM_FULL)
-    return next_occuring_event_full(now);
+    return nextOccuringEventFull(now);
   else
     xbt_die("Invalid cpu update mechanism!");
 }
 
-double Model::next_occuring_event_lazy(double now)
+double Model::nextOccuringEventLazy(double now)
 {
   XBT_DEBUG("Before share resources, the size of modified actions set is %zd", modifiedSet_->size());
   lmm_solve(maxminSystem_);
@@ -471,7 +471,7 @@ double Model::next_occuring_event_lazy(double now)
   }
 }
 
-double Model::next_occuring_event_full(double /*now*/) {
+double Model::nextOccuringEventFull(double /*now*/) {
   maxminSystem_->solve_fun(maxminSystem_);
 
   double min = -1;
index 7f91d37..228c06d 100644 (file)
@@ -323,9 +323,9 @@ public:
    * @param now The current time of the simulation
    * @return The delta of time till the next action will finish
    */
-  virtual double next_occuring_event(double now);
-  virtual double next_occuring_event_lazy(double now);
-  virtual double next_occuring_event_full(double now);
+  virtual double nextOccuringEvent(double now);
+  virtual double nextOccuringEventLazy(double now);
+  virtual double nextOccuringEventFull(double now);
 
   /**
    * @brief Update action to the current time
index 7582f29..31de254 100644 (file)
@@ -50,7 +50,7 @@ s4u::Host *VMModel::createVM(const char *name, sg_host_t host_PM)
 // const double virt_overhead = 0.95;
 const double virt_overhead = 1;
 
-double VMModel::next_occuring_event(double now)
+double VMModel::nextOccuringEvent(double now)
 {
   /* TODO: update action's cost with the total cost of processes on the VM. */
 
@@ -95,7 +95,7 @@ double VMModel::next_occuring_event(double now)
   adjustWeightOfDummyCpuActions();
 
   /* 3. Ready. Get the next occuring event */
-  return surf_cpu_model_vm->next_occuring_event(now);
+  return surf_cpu_model_vm->nextOccuringEvent(now);
 }
 
 
index 47ad8c5..05ecaf3 100644 (file)
@@ -117,7 +117,7 @@ public:
   s4u::Host *createVM(const char *name, sg_host_t host_PM);
   void adjustWeightOfDummyCpuActions() override {};
 
-  double next_occuring_event(double now) override;
+  double nextOccuringEvent(double now) override;
   void updateActionsState(double /*now*/, double /*delta*/) override {};
 
 };