Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cosmetics
[simgrid.git] / src / s4u / s4u_Host.cpp
index 8350971740b4369f96f51474e9d548004fb1e0b7..47feede354cd5e7ddfae566f4f6286cefbc8cd9b 100644 (file)
@@ -176,16 +176,21 @@ NetZone* Host::get_englobing_zone()
   return pimpl_netpoint_->get_englobing_zone()->get_iface();
 }
 
-void Host::sendto(Host* dest, double byte_amount)
+void Host::sendto(Host* dest, double byte_amount) // deprecated 331
 {
-  sendto_async(dest, byte_amount)->wait();
+  Comm::sendto_async(this, dest, byte_amount)->wait();
 }
 
-CommPtr Host::sendto_async(Host* dest, double byte_amount)
+CommPtr Host::sendto_async(Host* dest, double byte_amount) // deprecated 331
 {
   return Comm::sendto_async(this, dest, byte_amount);
 }
 
+void Host::send_to(Host* dest, double byte_amount) // deprecated 330
+{
+  Comm::sendto(this, dest, byte_amount);
+}
+
 /** Get the properties assigned to a host */
 const std::unordered_map<std::string, std::string>* Host::get_properties() const
 {
@@ -275,7 +280,9 @@ std::vector<Disk*> Host::get_disks() const
 
 Disk* Host::create_disk(const std::string& name, double read_bandwidth, double write_bandwidth)
 {
-  return surf_disk_model->create_disk(name, read_bandwidth, write_bandwidth)->set_host(this)->get_iface();
+  auto disk =
+      this->get_netpoint()->get_englobing_zone()->get_disk_model()->create_disk(name, read_bandwidth, write_bandwidth);
+  return disk->set_host(this)->get_iface();
 }
 
 void Host::add_disk(const Disk* disk)
@@ -605,7 +612,7 @@ double sg_host_route_bandwidth(const_sg_host_t from, const_sg_host_t to) // XBT_
 
 void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
 {
-  from->sendto(to, byte_amount);
+  simgrid::s4u::Comm::sendto(from, to, byte_amount);
 }
 
 /** @brief Displays debugging information about a host */