From 3e2e56a1ff8c65d47e0cf4e458eac56e08a2b528 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 2 Oct 2016 18:03:29 +0200 Subject: [PATCH] rename next_occuring_event() into nextOccuringEvent() --- src/surf/cpu_ti.cpp | 2 +- src/surf/cpu_ti.hpp | 2 +- src/surf/host_clm03.cpp | 8 ++++---- src/surf/host_clm03.hpp | 2 +- src/surf/network_constant.cpp | 2 +- src/surf/network_constant.hpp | 2 +- src/surf/network_interface.cpp | 4 ++-- src/surf/network_interface.hpp | 2 +- src/surf/network_ns3.cpp | 2 +- src/surf/network_ns3.hpp | 2 +- src/surf/ptask_L07.cpp | 4 ++-- src/surf/ptask_L07.hpp | 2 +- src/surf/storage_n11.cpp | 4 ++-- src/surf/storage_n11.hpp | 2 +- src/surf/surf_c_bindings.cpp | 6 +++--- src/surf/surf_interface.cpp | 10 +++++----- src/surf/surf_interface.hpp | 6 +++--- src/surf/virtual_machine.cpp | 4 ++-- src/surf/virtual_machine.hpp | 2 +- 19 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index 8ab9009066..97ee3c2cac 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -360,7 +360,7 @@ Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, std::vector* 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; diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index b99ecd3dea..4636311edb 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -149,7 +149,7 @@ public: CpuTiModel(); ~CpuTiModel() override; Cpu *createCpu(simgrid::s4u::Host *host, std::vector* 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_; diff --git a/src/surf/host_clm03.cpp b/src/surf/host_clm03.cpp index 0c95e43d7c..ffdf58f54e 100644 --- a/src/surf/host_clm03.cpp +++ b/src/surf/host_clm03.cpp @@ -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, diff --git a/src/surf/host_clm03.hpp b/src/surf/host_clm03.hpp index bc7ad09d4b..7e8b5687dd 100644 --- a/src/surf/host_clm03.hpp +++ b/src/surf/host_clm03.hpp @@ -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; }; } diff --git a/src/surf/network_constant.cpp b/src/surf/network_constant.cpp index 4daf86467b..74c1678609 100644 --- a/src/surf/network_constant.cpp +++ b/src/surf/network_constant.cpp @@ -33,7 +33,7 @@ namespace simgrid { return nullptr; } - double NetworkConstantModel::next_occuring_event(double /*now*/) + double NetworkConstantModel::nextOccuringEvent(double /*now*/) { double min = -1.0; diff --git a/src/surf/network_constant.hpp b/src/surf/network_constant.hpp index e66a2241a1..7a8644d0d2 100644 --- a/src/surf/network_constant.hpp +++ b/src/surf/network_constant.hpp @@ -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; diff --git a/src/surf/network_interface.cpp b/src/surf/network_interface.cpp index b983e7c3bb..9100fea993 100644 --- a/src/surf/network_interface.cpp +++ b/src/surf/network_interface.cpp @@ -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(&*it); diff --git a/src/surf/network_interface.hpp b/src/surf/network_interface.hpp index 4c71d84d02..c84b48fc12 100644 --- a/src/surf/network_interface.hpp +++ b/src/surf/network_interface.hpp @@ -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; }; /************ diff --git a/src/surf/network_ns3.cpp b/src/surf/network_ns3.cpp index 14cea53089..a2956c8094 100644 --- a/src/surf/network_ns3.cpp +++ b/src/surf/network_ns3.cpp @@ -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"); diff --git a/src/surf/network_ns3.hpp b/src/surf/network_ns3.hpp index c894aa424f..e4254bea48 100644 --- a/src/surf/network_ns3.hpp +++ b/src/surf/network_ns3.hpp @@ -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; }; diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 7a8c2b9a3a..c2ab8f0ea2 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -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(&*it); if (action->m_latency > 0 && (min < 0 || action->m_latency < min)) { diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index 9d0422345e..585e0a8359 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -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; diff --git a/src/surf/storage_n11.cpp b/src/surf/storage_n11.cpp index d19d438645..7d88c8f976 100644 --- a/src/surf/storage_n11.cpp +++ b/src/surf/storage_n11.cpp @@ -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; diff --git a/src/surf/storage_n11.hpp b/src/surf/storage_n11.hpp index ff0a122ea7..51c43d0e03 100644 --- a/src/surf/storage_n11.hpp +++ b/src/surf/storage_n11.hpp @@ -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; }; diff --git a/src/surf/surf_c_bindings.cpp b/src/surf/surf_c_bindings.cpp index cbbd1a0271..e0c865ba00 100644 --- a/src/surf/surf_c_bindings.cpp +++ b/src/surf/surf_c_bindings.cpp @@ -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) diff --git a/src/surf/surf_interface.cpp b/src/surf/surf_interface.cpp index 78ee9ffb69..66dad3794f 100644 --- a/src/surf/surf_interface.cpp +++ b/src/surf/surf_interface.cpp @@ -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; diff --git a/src/surf/surf_interface.hpp b/src/surf/surf_interface.hpp index 7f91d37cba..228c06d69c 100644 --- a/src/surf/surf_interface.hpp +++ b/src/surf/surf_interface.hpp @@ -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 diff --git a/src/surf/virtual_machine.cpp b/src/surf/virtual_machine.cpp index 7582f2958a..31de254608 100644 --- a/src/surf/virtual_machine.cpp +++ b/src/surf/virtual_machine.cpp @@ -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); } diff --git a/src/surf/virtual_machine.hpp b/src/surf/virtual_machine.hpp index 47ad8c5881..05ecaf32bf 100644 --- a/src/surf/virtual_machine.hpp +++ b/src/surf/virtual_machine.hpp @@ -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 {}; }; -- 2.20.1