]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/routing/NetZoneImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
factor get_remaining across acitvities
[simgrid.git] / src / kernel / routing / NetZoneImpl.cpp
index fc33fd29aa4ec4a8e061a7f6471c6447f6f2b664..b87a8dd20ecf37ae282783406cf9c9aa2dbe7687 100644 (file)
@@ -26,8 +26,8 @@ public:
   std::vector<resource::LinkImpl*> links;
 };
 
-NetZoneImpl::NetZoneImpl(NetZoneImpl* father, std::string name, resource::NetworkModel* network_model)
-    : network_model_(network_model), piface_(this), father_(father), name_(std::move(name))
+NetZoneImpl::NetZoneImpl(NetZoneImpl* father, const std::string& name, resource::NetworkModel* network_model)
+    : network_model_(network_model), piface_(this), father_(father), name_(name)
 {
   xbt_assert(nullptr == simgrid::s4u::Engine::get_instance()->netpoint_by_name_or_null(get_name()),
              "Refusing to create a second NetZone called '%s'.", get_cname());
@@ -92,8 +92,8 @@ int NetZoneImpl::get_host_count()
   return count;
 }
 
-simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, std::vector<double>* speedPerPstate, int coreAmount,
-                                             std::map<std::string, std::string>* props)
+simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, const std::vector<double>& speed_per_pstate,
+                                             int coreAmount, std::map<std::string, std::string>* props)
 {
   simgrid::s4u::Host* res = new simgrid::s4u::Host(name);
 
@@ -102,7 +102,7 @@ simgrid::s4u::Host* NetZoneImpl::create_host(const char* name, std::vector<doubl
 
   res->pimpl_netpoint = new NetPoint(name, NetPoint::Type::Host, this);
 
-  surf_cpu_model_pm->create_cpu(res, speedPerPstate, coreAmount);
+  surf_cpu_model_pm->create_cpu(res, speed_per_pstate, coreAmount);
 
   if (props != nullptr)
     for (auto const& kv : *props)