.. autodoxymethod:: simgrid::s4u::Host::get_netpoint() const
.. autodoxymethod:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< Link *> &links, double *latency) const
.. autodoxymethod:: simgrid::s4u::Host::route_to(const Host *dest, std::vector< kernel::resource::LinkImpl *> &links, double *latency) const
- .. autodoxymethod:: simgrid::s4u::Host::send_to(Host *dest, double byte_amount)
+ .. autodoxymethod:: simgrid::s4u::Host::sendto(Host *dest, double byte_amount)
+ .. autodoxymethod:: simgrid::s4u::Host::sendto_async(Host *dest, double byte_amount)
.. group-tab:: C
.. autodoxymethod:: sg_host_route(const_sg_host_t from, const_sg_host_t to, xbt_dynar_t links)
.. autodoxymethod:: sg_host_route_bandwidth(const_sg_host_t from, const_sg_host_t to)
.. autodoxymethod:: sg_host_route_latency(const_sg_host_t from, const_sg_host_t to)
- .. autodoxymethod:: sg_host_send_to(sg_host_t from, sg_host_t to, double byte_amount)
+ .. autodoxymethod:: sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
Signals
-------
XBT_PUBLIC void sg_host_route(const_sg_host_t from, const_sg_host_t to, xbt_dynar_t links);
XBT_PUBLIC double sg_host_route_latency(const_sg_host_t from, const_sg_host_t to);
XBT_PUBLIC double sg_host_route_bandwidth(const_sg_host_t from, const_sg_host_t to);
-void sg_host_send_to(sg_host_t from, sg_host_t to, double byte_amount);
+XBT_PUBLIC void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount);
+
+#ifndef DOXYGEN
+XBT_ATTRIB_DEPRECATED_v330("Please use sg_host_sendto") inline void sg_host_send_to(sg_host_t from, sg_host_t to,
+ double byte_amount)
+{
+ sg_host_sendto(from, to, byte_amount);
+}
+#endif
XBT_PUBLIC void sg_host_dump(const_sg_host_t ws);
void route_to(const Host* dest, std::vector<Link*>& links, double* latency) const;
void route_to(const Host* dest, std::vector<kernel::resource::LinkImpl*>& links, double* latency) const;
- /** Do a communication between two arbitrary hosts.
+ /** Do a blocking communication between two arbitrary hosts.
*
* This starts a blocking communication right away, bypassing the mailbox and actors mechanism.
* The calling actor is blocked until the end of the communication; there is really no limit on the hosts involved.
* In particular, the actor does not have to be on one of the involved hosts. Enjoy the comfort of the simulator :)
*/
- void send_to(Host* dest, double byte_amount);
+ void sendto(Host* dest, double byte_amount);
+
+ /** Do an asynchronous communication between two arbitrary hosts.
+ *
+ * This initializes a communication that completely bypass the mailbox and actors mechanism.
+ * There is really no limit on the hosts involved. In particular, the actor does not have to be on one of the involved
+ * hosts.
+ */
+ ActivityPtr sendto_async(Host* dest, double byte_amount);
+
+#ifndef DOXYGEN
+ XBT_ATTRIB_DEPRECATED_v330("Please use Host::sendto()") void send_to(Host* dest, double byte_amount)
+ {
+ sendto(dest, byte_amount);
+ }
+#endif
NetZone* get_englobing_zone();
/** Block the calling actor on an execution located on the called host
return pimpl_netpoint_->get_englobing_zone()->get_iface();
}
-void Host::send_to(Host* dest, double byte_amount)
+void Host::sendto(Host* dest, double byte_amount)
+{
+ sendto_async(dest, byte_amount)->wait();
+}
+
+ActivityPtr Host::sendto_async(Host* dest, double byte_amount)
{
std::vector<Host*> m_host_list = {this, dest};
std::vector<double> flops_amount = {0, 0};
std::vector<double> bytes_amount = {0, byte_amount, 0, 0};
- this_actor::parallel_execute(m_host_list, flops_amount, bytes_amount);
+ return this_actor::exec_init(m_host_list, flops_amount, bytes_amount)->start();
}
/** Get the properties assigned to a host */
return min_bandwidth;
}
-void sg_host_send_to(sg_host_t from, sg_host_t to, double byte_amount)
+void sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
{
- from->send_to(to, byte_amount);
+ from->sendto(to, byte_amount);
}
/** @brief Displays debugging information about a host */