Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
unify the naming of that property
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 10 Oct 2016 12:47:33 +0000 (14:47 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 10 Oct 2016 12:47:33 +0000 (14:47 +0200)
include/simgrid/s4u/host.hpp
src/msg/msg_host.cpp
src/s4u/s4u_host.cpp
src/surf/cpu_interface.cpp
src/surf/cpu_interface.hpp
src/surf/plugins/energy.cpp
teshsuite/simdag/flatifier/flatifier.cpp

index a54cf12..698e64f 100644 (file)
@@ -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);
index 1d369c0..92358c2 100644 (file)
@@ -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
index 5db68c5..66a13a9 100644 (file)
@@ -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 */
index 08cd7c4..428f1a9 100644 (file)
@@ -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_;
 }
index 7fbfbe4..bedb0f8 100644 (file)
@@ -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);
index 9a8879c..c3b623d 100644 (file)
@@ -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;
index db4dede..96b7ded 100644 (file)
@@ -106,8 +106,8 @@ int main(int argc, char **argv)
     for (i = 0; i < totalHosts; i++) {
       std::printf("  <host id=\"%s\" speed=\"%.0f\"", sg_host_get_name(hosts[i]), sg_host_speed(hosts[i]));
       props = sg_host_get_properties(hosts[i]);
-      if (hosts[i]->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");