From: Martin Quinson Date: Mon, 10 Oct 2016 12:47:33 +0000 (+0200) Subject: unify the naming of that property X-Git-Tag: v3_14~351 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/bd7708d5f81722d60f78bcf7dd0481d6a8e58a92 unify the naming of that property --- diff --git a/include/simgrid/s4u/host.hpp b/include/simgrid/s4u/host.hpp index a54cf12440..698e64fc14 100644 --- a/include/simgrid/s4u/host.hpp +++ b/include/simgrid/s4u/host.hpp @@ -71,7 +71,7 @@ public: // TODO, make me private bool isOff() { return !isOn(); } double speed(); - int coresCount(); + int coreCount(); xbt_dict_t properties(); const char*property(const char*key); void setProperty(const char*key, const char *value); diff --git a/src/msg/msg_host.cpp b/src/msg/msg_host.cpp index 1d369c0313..92358c2dbb 100644 --- a/src/msg/msg_host.cpp +++ b/src/msg/msg_host.cpp @@ -163,7 +163,7 @@ double MSG_get_host_speed(msg_host_t host) { * \return the number of cores */ int MSG_host_get_core_number(msg_host_t host) { - return host->coresCount(); + return host->coreCount(); } /** \ingroup m_host_management diff --git a/src/s4u/s4u_host.cpp b/src/s4u/s4u_host.cpp index 5db68c5809..66a13a97a0 100644 --- a/src/s4u/s4u_host.cpp +++ b/src/s4u/s4u_host.cpp @@ -172,8 +172,8 @@ double Host::speed() { return pimpl_cpu->getSpeed(1.0); } /** @brief Returns the number of core of the processor. */ -int Host::coresCount() { - return pimpl_cpu->getCoreCount(); +int Host::coreCount() { + return pimpl_cpu->coreCount(); } /** @brief Set the pstate at which the host should run */ diff --git a/src/surf/cpu_interface.cpp b/src/surf/cpu_interface.cpp index 08cd7c4f01..428f1a94db 100644 --- a/src/surf/cpu_interface.cpp +++ b/src/surf/cpu_interface.cpp @@ -188,7 +188,7 @@ void Cpu::onSpeedChange() { TRACE_surf_host_set_speed(surf_get_clock(), getName(), coresAmount_ * speed_.scale * speed_.peak); } -int Cpu::getCoreCount() +int Cpu::coreCount() { return coresAmount_; } diff --git a/src/surf/cpu_interface.hpp b/src/surf/cpu_interface.hpp index 7fbfbe4e88..bedb0f85b1 100644 --- a/src/surf/cpu_interface.hpp +++ b/src/surf/cpu_interface.hpp @@ -104,7 +104,7 @@ public: virtual simgrid::surf::Action *sleep(double duration)=0; /** @brief Get the amount of cores */ - virtual int getCoreCount(); + virtual int coreCount(); /** @brief Get the speed, accounting for the trace load and provided process load instead of the real current one */ virtual double getSpeed(double load); diff --git a/src/surf/plugins/energy.cpp b/src/surf/plugins/energy.cpp index 9a8879cd81..c3b623d929 100644 --- a/src/surf/plugins/energy.cpp +++ b/src/surf/plugins/energy.cpp @@ -77,7 +77,7 @@ void HostEnergy::update() cpu_load = lmm_constraint_get_usage(surf_host->cpu_->getConstraint()) / surf_host->cpu_->getPstateSpeedCurrent(); /** Divide by the number of cores here **/ - cpu_load /= surf_host->cpu_->getCoreCount(); + cpu_load /= surf_host->cpu_->coreCount(); if (cpu_load > 1) // A machine with a load > 1 consumes as much as a fully loaded machine, not more cpu_load = 1; diff --git a/teshsuite/simdag/flatifier/flatifier.cpp b/teshsuite/simdag/flatifier/flatifier.cpp index db4dede420..96b7ded9d7 100644 --- a/teshsuite/simdag/flatifier/flatifier.cpp +++ b/teshsuite/simdag/flatifier/flatifier.cpp @@ -106,8 +106,8 @@ int main(int argc, char **argv) for (i = 0; i < totalHosts; i++) { std::printf(" coresCount()>1) { - std::printf(" core=\"%d\"", hosts[i]->coresCount()); + if (hosts[i]->coreCount()>1) { + std::printf(" core=\"%d\"", hosts[i]->coreCount()); } if (props && !xbt_dict_is_empty(props)) { std::printf(">\n");