Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implem? I meant Impl, as in pimpl. Sorry for the noise
authorMartin Quinson <martin.quinson@loria.fr>
Thu, 25 Feb 2016 12:15:24 +0000 (13:15 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Thu, 25 Feb 2016 12:15:24 +0000 (13:15 +0100)
23 files changed:
src/include/surf/surf.h
src/s4u/s4u_host.cpp
src/simdag/sd_task.cpp
src/simdag/sd_workstation.cpp
src/simgrid/host.cpp
src/simix/smx_host.cpp
src/simix/smx_vm.cpp
src/surf/HostImpl.cpp [moved from src/surf/HostImplem.cpp with 87% similarity]
src/surf/HostImpl.hpp [moved from src/surf/HostImplem.hpp with 93% similarity]
src/surf/host_clm03.hpp
src/surf/network_ib.cpp
src/surf/network_ns3.cpp
src/surf/plugins/energy.cpp
src/surf/plugins/energy.hpp
src/surf/ptask_L07.cpp
src/surf/ptask_L07.hpp
src/surf/sg_platf.cpp
src/surf/surf_c_bindings.cpp
src/surf/surf_interface.cpp
src/surf/virtual_machine.cpp
src/surf/virtual_machine.hpp
src/surf/vm_hl13.cpp
tools/cmake/DefinePackages.cmake

index 4aaeaff..4605e69 100644 (file)
@@ -52,7 +52,7 @@ class NetworkModel;
 class StorageModel;
 class Resource;
 class ResourceLmm;
-class HostImplem;
+class HostImpl;
 class HostCLM03;
 class NetworkCm02Link;
 class Action;
@@ -72,7 +72,7 @@ typedef simgrid::surf::NetworkModel surf_NetworkModel;
 typedef simgrid::surf::StorageModel surf_StorageModel;
 typedef simgrid::surf::Resource surf_Resource;
 typedef simgrid::surf::ResourceLmm surf_ResourceLmm;
-typedef simgrid::surf::HostImplem surf_Host;
+typedef simgrid::surf::HostImpl surf_Host;
 typedef simgrid::surf::HostCLM03 surf_HostCLM03;
 typedef simgrid::surf::NetworkCm02Link surf_NetworkCm02Link;
 typedef simgrid::surf::Action surf_Action;
index 5540298..e1c5097 100644 (file)
@@ -11,7 +11,7 @@
 #include <unordered_map>
 
 #include "simgrid/simix.hpp"
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "xbt/log.h"
 #include "src/msg/msg_private.h"
 #include "src/simix/smx_process_private.h"
@@ -112,7 +112,7 @@ boost::unordered_map<std::string, Storage*> const& Host::mountedStorages() {
 /** Get the properties assigned to a host */
 xbt_dict_t Host::properties() {
   return simgrid::simix::kernel([&] {
-    simgrid::surf::HostImplem* surf_host = this->extension<simgrid::surf::HostImplem>();
+    simgrid::surf::HostImpl* surf_host = this->extension<simgrid::surf::HostImpl>();
     return surf_host->getProperties();
   });
 }
@@ -166,14 +166,14 @@ int Host::pstate()
 void Host::parameters(vm_params_t params)
 {
   simgrid::simix::kernel([&]() {
-    this->extension<simgrid::surf::HostImplem>()->getParams(params);
+    this->extension<simgrid::surf::HostImpl>()->getParams(params);
   });
 }
 
 void Host::setParameters(vm_params_t params)
 {
   simgrid::simix::kernel([&]() {
-    this->extension<simgrid::surf::HostImplem>()->setParams(params);
+    this->extension<simgrid::surf::HostImpl>()->setParams(params);
   });
 }
 
@@ -185,7 +185,7 @@ void Host::setParameters(vm_params_t params)
 xbt_dict_t Host::mountedStoragesAsDict()
 {
   return simgrid::simix::kernel([&] {
-    return this->extension<simgrid::surf::HostImplem>()->getMountedStorageList();
+    return this->extension<simgrid::surf::HostImpl>()->getMountedStorageList();
   });
 }
 
@@ -197,7 +197,7 @@ xbt_dict_t Host::mountedStoragesAsDict()
 xbt_dynar_t Host::attachedStorages()
 {
   return simgrid::simix::kernel([&] {
-    return this->extension<simgrid::surf::HostImplem>()->getAttachedStorageList();
+    return this->extension<simgrid::surf::HostImpl>()->getAttachedStorageList();
   });
 }
 
index abd82f6..93c5ba2 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "src/surf/surf_interface.hpp"
 #include "src/simdag/simdag_private.h"
 #include "simgrid/simdag.h"
index 918b769..e77d274 100644 (file)
@@ -5,8 +5,8 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/simdag/simdag_private.h"
-#include <simgrid/s4u/host.hpp>
-#include "src/surf/HostImplem.hpp"
+#include "simgrid/s4u/host.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "surf/surf.h"
 
 /** @brief Returns the route between two workstations
index 3a02cca..da0f26d 100644 (file)
@@ -9,7 +9,7 @@
 #include <xbt/Extendable.hpp>
 #include <simgrid/s4u/host.hpp>
 
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "surf/surf.h" // routing_get_network_element_type FIXME:killme
 
 #include "src/simix/smx_private.hpp"
@@ -126,11 +126,11 @@ void sg_host_simix_destroy(sg_host_t host) {
 
 // ========= storage related functions ============
 xbt_dict_t sg_host_get_mounted_storage_list(sg_host_t host){
-  return host->extension<simgrid::surf::HostImplem>()->getMountedStorageList();
+  return host->extension<simgrid::surf::HostImpl>()->getMountedStorageList();
 }
 
 xbt_dynar_t sg_host_get_attached_storage_list(sg_host_t host){
-  return host->extension<simgrid::surf::HostImplem>()->getAttachedStorageList();
+  return host->extension<simgrid::surf::HostImpl>()->getAttachedStorageList();
 }
 
 
index 3a2bd46..91cb6c8 100644 (file)
@@ -9,7 +9,7 @@
 #include "mc/mc.h"
 #include "src/mc/mc_replay.h"
 #include "src/surf/virtual_machine.hpp"
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_host, simix,
                                 "SIMIX hosts");
@@ -43,7 +43,7 @@ void SIMIX_host_on(sg_host_t h)
   xbt_assert((host != NULL), "Invalid parameters");
 
   if (h->isOff()) {
-    simgrid::surf::HostImplem* surf_host = h->extension<simgrid::surf::HostImplem>();
+    simgrid::surf::HostImpl* surf_host = h->extension<simgrid::surf::HostImpl>();
     surf_host->turnOn();
 
     unsigned int cpt;
@@ -92,7 +92,7 @@ void SIMIX_host_off(sg_host_t h, smx_process_t issuer)
   xbt_assert((host != NULL), "Invalid parameters");
 
   if (h->isOn()) {
-    simgrid::surf::HostImplem* surf_host = h->extension<simgrid::surf::HostImplem>();
+    simgrid::surf::HostImpl* surf_host = h->extension<simgrid::surf::HostImpl>();
     surf_host->turnOff();
 
     /* Clean Simulator data */
@@ -322,10 +322,10 @@ smx_synchro_t SIMIX_execution_parallel_start(const char *name,
     host_list_cpy[i] = host_list[i];
 
   /* Check that we are not mixing VMs and PMs in the parallel task */
-  simgrid::surf::HostImplem *host = host_list[0]->extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl *host = host_list[0]->extension<simgrid::surf::HostImpl>();
   bool is_a_vm = (nullptr != dynamic_cast<simgrid::surf::VirtualMachine*>(host));
   for (i = 1; i < host_nb; i++) {
-    bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::surf::VirtualMachine*>(host_list[i]->extension<simgrid::surf::HostImplem>()));
+    bool tmp_is_a_vm = (nullptr != dynamic_cast<simgrid::surf::VirtualMachine*>(host_list[i]->extension<simgrid::surf::HostImpl>()));
     xbt_assert(is_a_vm == tmp_is_a_vm, "parallel_execute: mixing VMs and PMs is not supported (yet).");
   }
 
index 93e4697..1bf7c7a 100644 (file)
@@ -7,7 +7,7 @@
 #include "smx_private.h"
 #include "mc/mc.h"
 #include "src/surf/virtual_machine.hpp"
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 
 //If you need to log some stuffs, just uncomment these two lines and uses XBT_DEBUG for instance
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_vm, simix, "Logging specific to SIMIX (vms)");
@@ -37,7 +37,7 @@ sg_host_t SIMIX_vm_create(const char *name, sg_host_t ind_phys_host)
 static long host_get_ramsize(sg_host_t vm, int *overcommit)
 {
   s_vm_params_t params;
-  vm->extension<simgrid::surf::HostImplem>()->getParams(&params);
+  vm->extension<simgrid::surf::HostImpl>()->getParams(&params);
 
   if (overcommit)
     *overcommit = params.overcommit;
@@ -65,7 +65,7 @@ static int __can_be_started(sg_host_t vm)
   }
 
   long total_ramsize_of_vms = 0;
-  xbt_dynar_t dyn_vms = pm->extension<simgrid::surf::HostImplem>()->getVms();
+  xbt_dynar_t dyn_vms = pm->extension<simgrid::surf::HostImpl>()->getVms();
   {
     unsigned int cursor = 0;
     sg_host_t another_vm;
@@ -90,7 +90,7 @@ void SIMIX_vm_start(sg_host_t ind_vm)
 {
   if (__can_be_started(ind_vm))
     static_cast<simgrid::surf::VirtualMachine*>(
-      ind_vm->extension<simgrid::surf::HostImplem>()
+      ind_vm->extension<simgrid::surf::HostImpl>()
     )->setState(SURF_VM_STATE_RUNNING);
   else
     THROWF(vm_error, 0, "The VM %s cannot be started", sg_host_get_name(ind_vm));
@@ -100,7 +100,7 @@ void SIMIX_vm_start(sg_host_t ind_vm)
 e_surf_vm_state_t SIMIX_vm_get_state(sg_host_t ind_vm)
 {
   return static_cast<simgrid::surf::VirtualMachine*>(
-    ind_vm->extension<simgrid::surf::HostImplem>()
+    ind_vm->extension<simgrid::surf::HostImpl>()
   )->getState();
 }
 
@@ -345,7 +345,7 @@ void SIMIX_vm_shutdown(sg_host_t ind_vm, smx_process_t issuer)
 
   /* FIXME: we may have to do something at the surf layer, e.g., vcpu action */
   static_cast<simgrid::surf::VirtualMachine*>(
-    ind_vm->extension<simgrid::surf::HostImplem>()
+    ind_vm->extension<simgrid::surf::HostImpl>()
   )->setState(SURF_VM_STATE_CREATED);
 }
 
similarity index 87%
rename from src/surf/HostImplem.cpp
rename to src/surf/HostImpl.cpp
index f549c9b..df99dc0 100644 (file)
@@ -4,12 +4,11 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "HostImplem.hpp"
-
 #include <simgrid/s4u/host.hpp>
 
 #include "src/simix/smx_private.h"
 #include "cpu_cas01.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "simgrid/sg_config.h"
 
 #include "network_interface.hpp"
@@ -27,15 +26,15 @@ simgrid::surf::HostModel *surf_host_model = NULL;
 namespace simgrid {
 namespace surf {
 
-simgrid::xbt::Extension<simgrid::s4u::Host, HostImplem> HostImplem::EXTENSION_ID;
+simgrid::xbt::Extension<simgrid::s4u::Host, HostImpl> HostImpl::EXTENSION_ID;
 
 /*********
  * Model *
  *********/
-HostImplem *HostModel::createHost(const char *name,NetCard *netElm, Cpu *cpu, xbt_dict_t props){
+HostImpl *HostModel::createHost(const char *name,NetCard *netElm, Cpu *cpu, xbt_dict_t props){
   xbt_dynar_t storageList = (xbt_dynar_t)xbt_lib_get_or_null(storage_lib, name, ROUTING_STORAGE_HOST_LEVEL);
 
-  HostImplem *host = new simgrid::surf::HostImplem(surf_host_model, name, props, storageList, cpu);
+  HostImpl *host = new simgrid::surf::HostImpl(surf_host_model, name, props, storageList, cpu);
   XBT_DEBUG("Create host %s with %ld mounted disks", name, xbt_dynar_length(host->p_storage));
   return host;
 }
@@ -117,14 +116,14 @@ Action *HostModel::executeParallelTask(int host_nb,
  ************/
 
 
-void HostImplem::classInit()
+void HostImpl::classInit()
 {
   if (!EXTENSION_ID.valid()) {
-    EXTENSION_ID = simgrid::s4u::Host::extension_create<simgrid::surf::HostImplem>();
+    EXTENSION_ID = simgrid::s4u::Host::extension_create<simgrid::surf::HostImpl>();
   }
 }
 
-HostImplem::HostImplem(simgrid::surf::HostModel *model, const char *name, xbt_dict_t props,
+HostImpl::HostImpl(simgrid::surf::HostModel *model, const char *name, xbt_dict_t props,
                      xbt_dynar_t storage, Cpu *cpu)
  : Resource(model, name)
  , PropertyHolder(props)
@@ -133,7 +132,7 @@ HostImplem::HostImplem(simgrid::surf::HostModel *model, const char *name, xbt_di
   p_params.ramsize = 0;
 }
 
-HostImplem::HostImplem(simgrid::surf::HostModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
+HostImpl::HostImpl(simgrid::surf::HostModel *model, const char *name, xbt_dict_t props, lmm_constraint_t constraint,
                  xbt_dynar_t storage, Cpu *cpu)
  : Resource(model, name, constraint)
  , PropertyHolder(props)
@@ -143,11 +142,11 @@ HostImplem::HostImplem(simgrid::surf::HostModel *model, const char *name, xbt_di
 }
 
 /** @brief use destroy() instead of this destructor */
-HostImplem::~HostImplem()
+HostImpl::~HostImpl()
 {
 }
 
-void HostImplem::attach(simgrid::s4u::Host* host)
+void HostImpl::attach(simgrid::s4u::Host* host)
 {
   if (p_host != nullptr)
     xbt_die("Already attached to host %s", host->name().c_str());
@@ -155,26 +154,26 @@ void HostImplem::attach(simgrid::s4u::Host* host)
   p_host = host;
 }
 
-bool HostImplem::isOn() {
+bool HostImpl::isOn() {
   return p_cpu->isOn();
 }
-bool HostImplem::isOff() {
+bool HostImpl::isOff() {
   return p_cpu->isOff();
 }
-void HostImplem::turnOn(){
+void HostImpl::turnOn(){
   if (isOff()) {
     p_cpu->turnOn();
     simgrid::s4u::Host::onStateChange(*this->p_host);
   }
 }
-void HostImplem::turnOff(){
+void HostImpl::turnOff(){
   if (isOn()) {
     p_cpu->turnOff();
     simgrid::s4u::Host::onStateChange(*this->p_host);
   }
 }
 
-simgrid::surf::Storage *HostImplem::findStorageOnMountList(const char* mount)
+simgrid::surf::Storage *HostImpl::findStorageOnMountList(const char* mount)
 {
   simgrid::surf::Storage *st = NULL;
   s_mount_t mnt;
@@ -193,7 +192,7 @@ simgrid::surf::Storage *HostImplem::findStorageOnMountList(const char* mount)
   return st;
 }
 
-xbt_dict_t HostImplem::getMountedStorageList()
+xbt_dict_t HostImpl::getMountedStorageList()
 {
   s_mount_t mnt;
   unsigned int i;
@@ -207,7 +206,7 @@ xbt_dict_t HostImplem::getMountedStorageList()
   return storage_list;
 }
 
-xbt_dynar_t HostImplem::getAttachedStorageList()
+xbt_dynar_t HostImpl::getAttachedStorageList()
 {
   xbt_lib_cursor_t cursor;
   char *key;
@@ -224,7 +223,7 @@ xbt_dynar_t HostImplem::getAttachedStorageList()
   return result;
 }
 
-Action *HostImplem::open(const char* fullpath) {
+Action *HostImpl::open(const char* fullpath) {
 
   simgrid::surf::Storage *st = NULL;
   s_mount_t mnt;
@@ -268,25 +267,25 @@ Action *HostImplem::open(const char* fullpath) {
   return action;
 }
 
-Action *HostImplem::close(surf_file_t fd) {
+Action *HostImpl::close(surf_file_t fd) {
   simgrid::surf::Storage *st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("CLOSE %s on disk '%s'",fd->name, st->getName());
   return st->close(fd);
 }
 
-Action *HostImplem::read(surf_file_t fd, sg_size_t size) {
+Action *HostImpl::read(surf_file_t fd, sg_size_t size) {
   simgrid::surf::Storage *st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("READ %s on disk '%s'",fd->name, st->getName());
   return st->read(fd, size);
 }
 
-Action *HostImplem::write(surf_file_t fd, sg_size_t size) {
+Action *HostImpl::write(surf_file_t fd, sg_size_t size) {
   simgrid::surf::Storage *st = findStorageOnMountList(fd->mount);
   XBT_DEBUG("WRITE %s on disk '%s'",fd->name, st->getName());
   return st->write(fd, size);
 }
 
-int HostImplem::unlink(surf_file_t fd) {
+int HostImpl::unlink(surf_file_t fd) {
   if (!fd){
     XBT_WARN("No such file descriptor. Impossible to unlink");
     return -1;
@@ -313,11 +312,11 @@ int HostImplem::unlink(surf_file_t fd) {
   }
 }
 
-sg_size_t HostImplem::getSize(surf_file_t fd){
+sg_size_t HostImpl::getSize(surf_file_t fd){
   return fd->size;
 }
 
-xbt_dynar_t HostImplem::getInfo( surf_file_t fd)
+xbt_dynar_t HostImpl::getInfo( surf_file_t fd)
 {
   simgrid::surf::Storage *st = findStorageOnMountList(fd->mount);
   sg_size_t *psize = xbt_new(sg_size_t, 1);
@@ -332,11 +331,11 @@ xbt_dynar_t HostImplem::getInfo( surf_file_t fd)
   return info;
 }
 
-sg_size_t HostImplem::fileTell(surf_file_t fd){
+sg_size_t HostImpl::fileTell(surf_file_t fd){
   return fd->current_position;
 }
 
-int HostImplem::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
+int HostImpl::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
 
   switch (origin) {
   case SEEK_SET:
@@ -353,7 +352,7 @@ int HostImplem::fileSeek(surf_file_t fd, sg_offset_t offset, int origin){
   }
 }
 
-int HostImplem::fileMove(surf_file_t fd, const char* fullpath){
+int HostImpl::fileMove(surf_file_t fd, const char* fullpath){
   /* Check if the new full path is on the same mount point */
   if(!strncmp((const char*)fd->mount, fullpath, strlen(fd->mount))) {
     sg_size_t *psize, *new_psize;
@@ -383,7 +382,7 @@ int HostImplem::fileMove(surf_file_t fd, const char* fullpath){
   }
 }
 
-xbt_dynar_t HostImplem::getVms()
+xbt_dynar_t HostImpl::getVms()
 {
   xbt_dynar_t dyn = xbt_dynar_new(sizeof(simgrid::surf::VirtualMachine*), NULL);
 
@@ -393,19 +392,19 @@ xbt_dynar_t HostImplem::getVms()
        iter !=  simgrid::surf::VMModel::ws_vms.end(); ++iter) {
 
     simgrid::surf::VirtualMachine *ws_vm = &*iter;
-    if (this == ws_vm->p_hostPM->extension(simgrid::surf::HostImplem::EXTENSION_ID))
+    if (this == ws_vm->p_hostPM->extension(simgrid::surf::HostImpl::EXTENSION_ID))
       xbt_dynar_push(dyn, &ws_vm);
   }
 
   return dyn;
 }
 
-void HostImplem::getParams(vm_params_t params)
+void HostImpl::getParams(vm_params_t params)
 {
   *params = p_params;
 }
 
-void HostImplem::setParams(vm_params_t params)
+void HostImpl::setParams(vm_params_t params)
 {
   /* may check something here. */
   p_params = *params;
similarity index 93%
rename from src/surf/HostImplem.hpp
rename to src/surf/HostImpl.hpp
index d89f3cf..69d0ce6 100644 (file)
@@ -23,7 +23,7 @@ namespace simgrid {
 namespace surf {
 
 class XBT_PRIVATE HostModel;
-class XBT_PRIVATE HostImplem;
+class XBT_PRIVATE HostImpl;
 class XBT_PRIVATE HostAction;
 
 
@@ -52,7 +52,7 @@ public:
   HostModel() : Model() {}
   ~HostModel() override {}
 
-  HostImplem *createHost(const char *name, NetCard *net, Cpu *cpu, xbt_dict_t props);
+  HostImpl *createHost(const char *name, NetCard *net, Cpu *cpu, xbt_dict_t props);
 
   virtual void adjustWeightOfDummyCpuActions();
   virtual Action *executeParallelTask(int host_nb,
@@ -71,11 +71,11 @@ public:
  * @brief SURF Host interface class
  * @details An host represents a machine with a aggregation of a Cpu, a RoutingEdge and a Storage
  */
-class HostImplem :
-    public simgrid::surf::Resource,
-   public simgrid::surf::PropertyHolder {
+class HostImpl
+: public simgrid::surf::Resource,
+  public simgrid::surf::PropertyHolder {
 public:
-  static simgrid::xbt::Extension<simgrid::s4u::Host, HostImplem> EXTENSION_ID;
+  static simgrid::xbt::Extension<simgrid::s4u::Host, HostImpl> EXTENSION_ID;
 
 public:
   static void classInit(); // must be called before the first use of that class
@@ -88,7 +88,7 @@ public:
    * @param storage The Storage associated to this Host
    * @param cpu The Cpu associated to this Host
    */
-  HostImplem(HostModel *model, const char *name, xbt_dict_t props,
+  HostImpl(HostModel *model, const char *name, xbt_dict_t props,
           xbt_dynar_t storage, Cpu *cpu);
 
   /**
@@ -101,12 +101,12 @@ public:
    * @param storage The Storage associated to this Host
    * @param cpu The Cpu associated to this Host
    */
-  HostImplem(HostModel *model, const char *name, xbt_dict_t props,
+  HostImpl(HostModel *model, const char *name, xbt_dict_t props,
       lmm_constraint_t constraint, xbt_dynar_t storage, Cpu *cpu);
 
   /* Host destruction logic */
   /**************************/
-  ~HostImplem();
+  ~HostImpl();
 
 public:
   HostModel *getModel()
index e225fb4..ac9b57d 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "storage_interface.hpp"
 #include "cpu_interface.hpp"
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "network_interface.hpp"
 
 #ifndef SURF_HOST_CLM03_HPP_
index 566e8f2..ecc9e63 100644 (file)
@@ -9,7 +9,7 @@
 
 #include "network_ib.hpp"
 
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "simgrid/sg_config.h"
 #include "maxmin_private.hpp"
 
index 853d6c1..491fa43 100644 (file)
@@ -6,7 +6,7 @@
 
 #include "src/surf/network_ns3.hpp"
 
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "src/surf/surf_private.h"
 #include "simgrid/sg_config.h"
 #include "src/instr/instr_private.h" // TRACE_is_enabled(). FIXME: remove by subscribing tracing to the surf signals
index 16100e8..c5c9f3a 100644 (file)
@@ -65,7 +65,7 @@ simgrid::xbt::Extension<simgrid::s4u::Host, HostEnergy> HostEnergy::EXTENSION_ID
 /* Computes the consumption so far.  Called lazily on need. */
 void HostEnergy::update()
 {
-  simgrid::surf::HostImplem* surf_host = host->extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl* surf_host = host->extension<simgrid::surf::HostImpl>();
   double start_time = this->last_updated;
   double finish_time = surf_get_clock();
   double cpu_load;
@@ -199,7 +199,7 @@ void HostEnergy::initWattsRangeList()
 
 /* **************************** events  callback *************************** */
 static void onCreation(simgrid::s4u::Host& host) {
-  simgrid::surf::HostImplem* surf_host = host.extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl* surf_host = host.extension<simgrid::surf::HostImpl>();
   if (dynamic_cast<simgrid::surf::VirtualMachine*>(surf_host)) // Ignore virtual machines
     return;
   host.extension_set(new HostEnergy(&host));
@@ -207,10 +207,10 @@ static void onCreation(simgrid::s4u::Host& host) {
 
 static void onActionStateChange(simgrid::surf::CpuAction *action, e_surf_action_state_t previous) {
   const char *name = getActionCpu(action)->getName();
-  simgrid::surf::HostImplem *host = sg_host_by_name(name)->extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl *host = sg_host_by_name(name)->extension<simgrid::surf::HostImpl>();
   simgrid::surf::VirtualMachine *vm = dynamic_cast<simgrid::surf::VirtualMachine*>(host);
   if (vm) // If it's a VM, take the corresponding PM
-    host = vm->getPm()->extension<simgrid::surf::HostImplem>();
+    host = vm->getPm()->extension<simgrid::surf::HostImpl>();
 
   HostEnergy *host_energy = host->p_host->extension<HostEnergy>();
 
@@ -219,7 +219,7 @@ static void onActionStateChange(simgrid::surf::CpuAction *action, e_surf_action_
 }
 
 static void onHostStateChange(simgrid::s4u::Host &host) {
-  simgrid::surf::HostImplem* surf_host = host.extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl* surf_host = host.extension<simgrid::surf::HostImpl>();
   if (dynamic_cast<simgrid::surf::VirtualMachine*>(surf_host)) // Ignore virtual machines
     return;
 
@@ -231,7 +231,7 @@ static void onHostStateChange(simgrid::s4u::Host &host) {
 
 static void onHostDestruction(simgrid::s4u::Host& host) {
   // Ignore virtual machines
-  simgrid::surf::HostImplem* surf_host = host.extension<simgrid::surf::HostImplem>();
+  simgrid::surf::HostImpl* surf_host = host.extension<simgrid::surf::HostImpl>();
   if (dynamic_cast<simgrid::surf::VirtualMachine*>(surf_host))
     return;
   HostEnergy *host_energy = host.extension<HostEnergy>();
index d1ec557..b854921 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <map>
 
-#include "src/surf/HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 
 #ifndef ENERGY_CALLBACK_HPP_
 #define ENERGY_CALLBACK_HPP_
index 44d6b0c..5d5e099 100644 (file)
@@ -167,7 +167,7 @@ void HostL07Model::updateActionsState(double /*now*/, double delta) {
       while ((cnst = lmm_get_cnst_from_var(p_maxminSystem, action->getVariable(), i++))) {
         void *constraint_id = lmm_constraint_id(cnst);
 
-        if (static_cast<HostImplem*>(constraint_id)->isOff()) {
+        if (static_cast<HostImpl*>(constraint_id)->isOff()) {
           XBT_DEBUG("Action (%p) Failed!!", action);
           action->finish();
           action->setState(SURF_ACTION_FAILED);
index c53a2dd..74209df 100644 (file)
@@ -10,7 +10,7 @@
 
 #include <xbt/base.h>
 
-#include "HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 
 #ifndef HOST_L07_HPP_
 #define HOST_L07_HPP_
index 4a7b09a..e3f704f 100644 (file)
@@ -10,7 +10,7 @@
 #include "xbt/dict.h"
 #include "xbt/RngStream.h"
 #include <xbt/signal.hpp>
-#include "HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "surf/surf.h"
 
 #include "src/simix/smx_private.h"
index 66effb9..803c934 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "surf_interface.hpp"
 #include "network_interface.hpp"
 #include "surf_routing_cluster.hpp"
@@ -18,12 +18,12 @@ XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_kernel);
  * TOOLS *
  *********/
 
-static simgrid::surf::HostImplem *get_casted_host(sg_host_t host){ //FIXME: killme
-  return host->extension<simgrid::surf::HostImplem>();
+static simgrid::surf::HostImpl *get_casted_host(sg_host_t host){ //FIXME: killme
+  return host->extension<simgrid::surf::HostImpl>();
 }
 
 static simgrid::surf::VirtualMachine *get_casted_vm(sg_host_t host){
-  return static_cast<simgrid::surf::VirtualMachine*>(host->extension<simgrid::surf::HostImplem>());
+  return static_cast<simgrid::surf::VirtualMachine*>(host->extension<simgrid::surf::HostImpl>());
 }
 
 extern double NOW;
index 4b8196b..4537df7 100644 (file)
@@ -8,7 +8,7 @@
 #include "surf_interface.hpp"
 #include "network_interface.hpp"
 #include "cpu_interface.hpp"
-#include "HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 #include "src/simix/smx_host_private.h"
 #include "surf_routing.hpp"
 #include "simgrid/sg_config.h"
@@ -321,7 +321,7 @@ void surf_init(int *argc, char **argv)
   ROUTING_PROP_ASR_LEVEL = xbt_lib_add_level(as_router_lib,routing_asr_prop_free);
 
   XBT_DEBUG("Add SURF levels");
-  simgrid::surf::HostImplem::classInit();
+  simgrid::surf::HostImpl::classInit();
   SURF_STORAGE_LEVEL = xbt_lib_add_level(storage_lib,surf_storage_free);
 
   xbt_init(argc, argv);
index de4df13..2bf24a3 100644 (file)
@@ -34,11 +34,11 @@ VMModel::vm_list_t VMModel::ws_vms;
  ************/
 
 VirtualMachine::VirtualMachine(HostModel *model, const char *name, xbt_dict_t props, simgrid::s4u::Host *hostPM)
-: HostImplem(model, name, props, NULL, NULL, NULL)
+: HostImpl(model, name, props, NULL, NULL, NULL)
 , p_hostPM(hostPM)
 {
   VMModel::ws_vms.push_back(*this);
-  simgrid::s4u::Host::by_name_or_create(name)->extension_set<simgrid::surf::HostImplem>(this);
+  simgrid::s4u::Host::by_name_or_create(name)->extension_set<simgrid::surf::HostImpl>(this);
 }
 
 /*
index 0ec2101..40395ab 100644 (file)
@@ -6,7 +6,7 @@
 
 #include <xbt/base.h>
 
-#include "HostImplem.hpp"
+#include "src/surf/HostImpl.hpp"
 
 #ifndef VM_INTERFACE_HPP_
 #define VM_INTERFACE_HPP_
@@ -51,7 +51,7 @@ extern XBT_PRIVATE simgrid::xbt::signal<void(simgrid::surf::VirtualMachine*)> VM
  * @brief SURF VM interface class
  * @details A VM represent a virtual machine
  */
-class VirtualMachine : public HostImplem {
+class VirtualMachine : public HostImpl {
 public:
   /**
    * @brief Constructor
index 1b534b4..e453e8a 100644 (file)
@@ -181,7 +181,7 @@ void VMHL13::restore()
  */
 void VMHL13::migrate(sg_host_t host_dest)
 {
-   HostImplem *surfHost_dst = host_dest->extension<HostImplem>();
+   HostImpl *surfHost_dst = host_dest->extension<HostImpl>();
    const char *vm_name = getName();
    const char *pm_name_src = p_hostPM->name().c_str();
    const char *pm_name_dst = surfHost_dst->getName();
index 3b714de..5f512d4 100644 (file)
@@ -81,7 +81,7 @@ set(EXTRA_DIST
   src/surf/PropertyHolder.hpp
   src/surf/virtual_machine.hpp
   src/surf/host_clm03.hpp
-  src/surf/HostImplem.hpp
+  src/surf/HostImpl.hpp
   src/surf/ptask_L07.hpp
   src/xbt/automaton/automaton_lexer.yy.c
   src/xbt/automaton/parserPromela.lex
@@ -337,7 +337,7 @@ set(SURF_SRC
   src/surf/vm_hl13.cpp
   src/surf/virtual_machine.cpp
   src/surf/host_clm03.cpp
-  src/surf/HostImplem.cpp
+  src/surf/HostImpl.cpp
   src/surf/ptask_L07.cpp
   src/xbt/xbt_sg_stubs.c
   )