From: Martin Quinson Date: Mon, 21 May 2018 19:23:49 +0000 (+0200) Subject: snake_case k:r:CpuModel and sub-classes X-Git-Tag: v3.20~203 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b99d3a6127ec8f300b95e9bc3a90085814a19539 snake_case k:r:CpuModel and sub-classes --- diff --git a/src/kernel/routing/NetZoneImpl.cpp b/src/kernel/routing/NetZoneImpl.cpp index f70889a367..3dbcfdb259 100644 --- a/src/kernel/routing/NetZoneImpl.cpp +++ b/src/kernel/routing/NetZoneImpl.cpp @@ -53,7 +53,7 @@ simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, std::vectorpimpl_netpoint = new NetPoint(name, NetPoint::Type::Host, this); - surf_cpu_model_pm->createCpu(res, speedPerPstate, coreAmount); + surf_cpu_model_pm->create_cpu(res, speedPerPstate, coreAmount); if (props != nullptr) for (auto const& kv : *props) diff --git a/src/plugins/vm/s4u_VirtualMachine.cpp b/src/plugins/vm/s4u_VirtualMachine.cpp index 0703e8dc7b..5119271516 100644 --- a/src/plugins/vm/s4u_VirtualMachine.cpp +++ b/src/plugins/vm/s4u_VirtualMachine.cpp @@ -39,7 +39,7 @@ VirtualMachine::VirtualMachine(const char* name, s4u::Host* pm, int coreAmount, for (int i = 0; i < pm->getPstatesCount(); i++) speeds.push_back(pm->getPstateSpeed(i)); - surf_cpu_model_vm->createCpu(this, &speeds, pm->getCoreCount()); + surf_cpu_model_vm->create_cpu(this, &speeds, pm->getCoreCount()); if (pm->getPstate() != 0) setPstate(pm->getPstate()); diff --git a/src/surf/cpu_cas01.cpp b/src/surf/cpu_cas01.cpp index 7f5c672df0..e06a155768 100644 --- a/src/surf/cpu_cas01.cpp +++ b/src/surf/cpu_cas01.cpp @@ -76,9 +76,9 @@ CpuCas01Model::~CpuCas01Model() surf_cpu_model_pm = nullptr; } -Cpu *CpuCas01Model::createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core) +Cpu* CpuCas01Model::create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) { - return new CpuCas01(this, host, speedPerPstate, core); + return new CpuCas01(this, host, speed_per_pstate, core); } /************ diff --git a/src/surf/cpu_cas01.hpp b/src/surf/cpu_cas01.hpp index da01315ea7..84f7fb9c1c 100644 --- a/src/surf/cpu_cas01.hpp +++ b/src/surf/cpu_cas01.hpp @@ -26,7 +26,7 @@ public: explicit CpuCas01Model(kernel::resource::Model::UpdateAlgo algo); ~CpuCas01Model() override; - Cpu *createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core) override; + Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; }; /************ diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index f041d8a81c..73f12a1f2c 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -36,7 +36,7 @@ public: * @param speedPerPstate Processor speed (in Flops) of each pstate. This ignores any potential external load coming from a trace. * @param core The number of core of this Cpu */ - virtual Cpu *createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core)=0; + virtual Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speedPerPstate, int core) = 0; void update_actions_state_lazy(double now, double delta) override; void update_actions_state_full(double now, double delta) override; @@ -155,8 +155,6 @@ protected: * @brief A CpuAction represents the execution of code on one or several Cpus */ class XBT_PUBLIC CpuAction : public simgrid::kernel::resource::Action { - friend XBT_PUBLIC Cpu* getActionCpu(CpuAction * action); - public: /** @brief Signal emitted when the action state changes (ready/running/done, etc) * Signature: `void(CpuAction *action, simgrid::kernel::resource::Action::State previous)` diff --git a/src/surf/cpu_ti.cpp b/src/surf/cpu_ti.cpp index befaa7498e..d903ac8bc3 100644 --- a/src/surf/cpu_ti.cpp +++ b/src/surf/cpu_ti.cpp @@ -313,9 +313,9 @@ CpuTiModel::~CpuTiModel() surf_cpu_model_pm = nullptr; } -Cpu *CpuTiModel::createCpu(simgrid::s4u::Host *host, std::vector* speedPerPstate, int core) +Cpu* CpuTiModel::create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) { - return new CpuTi(this, host, speedPerPstate, core); + return new CpuTi(this, host, speed_per_pstate, core); } double CpuTiModel::next_occuring_event(double now) diff --git a/src/surf/cpu_ti.hpp b/src/surf/cpu_ti.hpp index a4f918404a..c371e8e439 100644 --- a/src/surf/cpu_ti.hpp +++ b/src/surf/cpu_ti.hpp @@ -141,7 +141,7 @@ class CpuTiModel : public CpuModel { public: CpuTiModel() : CpuModel(Model::UpdateAlgo::Full){}; ~CpuTiModel() override; - Cpu* createCpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; + Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; double next_occuring_event(double now) override; void update_actions_state(double now, double delta) override; diff --git a/src/surf/ptask_L07.cpp b/src/surf/ptask_L07.cpp index 590dae1fef..84e6aa6093 100644 --- a/src/surf/ptask_L07.cpp +++ b/src/surf/ptask_L07.cpp @@ -223,9 +223,9 @@ kernel::resource::Action* NetworkL07Model::communicate(s4u::Host* src, s4u::Host return hostModel_->execute_parallel(2, host_list, flops_amount, bytes_amount, rate); } -Cpu *CpuL07Model::createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core) +Cpu* CpuL07Model::create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) { - return new CpuL07(this, host, speedPerPstate, core); + return new CpuL07(this, host, speed_per_pstate, core); } kernel::resource::LinkImpl* NetworkL07Model::createLink(const std::string& name, double bandwidth, double latency, @@ -238,8 +238,9 @@ kernel::resource::LinkImpl* NetworkL07Model::createLink(const std::string& name, * Resource * ************/ -CpuL07::CpuL07(CpuL07Model* model, simgrid::s4u::Host* host, std::vector* speedPerPstate, int core) - : Cpu(model, host, model->get_maxmin_system()->constraint_new(this, speedPerPstate->front()), speedPerPstate, core) +CpuL07::CpuL07(CpuL07Model* model, simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) + : Cpu(model, host, model->get_maxmin_system()->constraint_new(this, speed_per_pstate->front()), speed_per_pstate, + core) { } diff --git a/src/surf/ptask_L07.hpp b/src/surf/ptask_L07.hpp index ae232a5223..9cd64429c7 100644 --- a/src/surf/ptask_L07.hpp +++ b/src/surf/ptask_L07.hpp @@ -49,7 +49,7 @@ public: CpuL07Model(HostL07Model* hmodel, kernel::lmm::System* sys); ~CpuL07Model(); - Cpu *createCpu(simgrid::s4u::Host *host, std::vector *speedPerPstate, int core) override; + Cpu* create_cpu(simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core) override; HostL07Model *hostModel_; }; @@ -71,7 +71,7 @@ public: class CpuL07 : public Cpu { public: - CpuL07(CpuL07Model *model, simgrid::s4u::Host *host, std::vector * speedPerPstate, int core); + CpuL07(CpuL07Model* model, simgrid::s4u::Host* host, std::vector* speed_per_pstate, int core); ~CpuL07() override; bool is_used() override; void apply_event(tmgr_trace_event_t event, double value) override;