that marked as permanent receiver, you should call
``mailbox->set_receiver(nullptr)`` by the end of the actors so that their
memory gets properly reclaimed. This call should be at the end of the
-actor's function, not in a on_exit callback.
+actor's function, not in an on_exit callback.
.. _s4u_raii:
Note that Mailboxes, Hosts and Links are not handled thought smart
pointers (yet?). This means that it is currently impossible to destroy a
-mailbox or a link. You can still destroy an host (but probably
+mailbox or a link. You can still destroy a host (but probably
shouldn't), using :cpp:func:`simgrid::s4u::Host::destroy`.
.. THE EXAMPLES
.. autodoxymethod:: sg_actor_get_host(const_sg_actor_t actor)
.. autodoxymethod:: sg_actor_set_host(sg_actor_t actor, sg_host_t host)
- .. autodoxymethod:: sg_actor_data(const_sg_actor_t actor)
- .. autodoxymethod:: sg_actor_data_set(sg_actor_t actor, void *userdata)
+ .. autodoxymethod:: sg_actor_get_data(const_sg_actor_t actor)
+ .. autodoxymethod:: sg_actor_set_data(sg_actor_t actor, void *userdata)
Suspending and resuming actors
------------------------------
.. group-tab:: C
- .. autodoxymethod:: sg_actor_self_data()
- .. autodoxymethod:: sg_actor_self_data_set(void *data)
+ .. autodoxymethod:: sg_actor_self_get_data()
+ .. autodoxymethod:: sg_actor_self_set_data(void *data)
.. autodoxymethod:: sg_actor_self_get_name()
.. autodoxymethod:: sg_actor_self_get_pid()
.. autodoxymethod:: sg_actor_self_get_ppid()
.. autodoxymethod:: simgrid::s4u::this_actor::exec_init(double flops_amounts)
.. autodoxymethod:: simgrid::s4u::this_actor::execute(double flop)
.. autodoxymethod:: simgrid::s4u::this_actor::execute(double flop, double priority)
- .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host *> &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
- .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host *> &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts, double timeout)
+ .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts)
+ .. autodoxymethod:: simgrid::s4u::this_actor::parallel_execute(const std::vector< s4u::Host * > &hosts, const std::vector< double > &flops_amounts, const std::vector< double > &bytes_amounts, double timeout)
.. group-tab:: Python
.. autodoxymethod:: sg_host_core_count(const_sg_host_t host)
.. autodoxymethod:: sg_host_dump(const_sg_host_t ws)
.. autodoxymethod:: sg_host_get_name(const_sg_host_t host)
- .. autodoxymethod:: sg_host_load(const_sg_host_t host)
- .. autodoxymethod:: sg_host_speed(const_sg_host_t host)
+ .. autodoxymethod:: sg_host_get_load(const_sg_host_t host)
+ .. autodoxymethod:: sg_host_get_speed(const_sg_host_t host)
User data and properties
------------------------
.. 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_get_route(const_sg_host_t from, const_sg_host_t to, xbt_dynar_t links)
+ .. autodoxymethod:: sg_host_get_route_bandwidth(const_sg_host_t from, const_sg_host_t to)
+ .. autodoxymethod:: sg_host_get_route_latency(const_sg_host_t from, const_sg_host_t to)
.. autodoxymethod:: sg_host_sendto(sg_host_t from, sg_host_t to, double byte_amount)
Signals
.. group-tab:: C
- .. autodoxymethod:: sg_link_bandwidth(const_sg_link_t link)
+ .. autodoxymethod:: sg_link_get_bandwidth(const_sg_link_t link)
+ .. autodoxymethod:: sg_link_get_latency(const_sg_link_t link)
+ .. autodoxymethod:: sg_link_get_name(const_sg_link_t link)
.. autodoxymethod:: sg_link_is_shared(const_sg_link_t link)
- .. autodoxymethod:: sg_link_latency(const_sg_link_t link)
- .. autodoxymethod:: sg_link_name(const_sg_link_t link)
Modifying characteristics
-------------------------
.. autodoxymethod:: simgrid::s4u::Link::set_bandwidth(double value)
.. autodoxymethod:: simgrid::s4u::Link::set_latency(double value)
+ .. group-tab:: C
+
+ .. autodoxymethod:: sg_link_set_bandwidth(const_sg_link_t link, double value)
+ .. autodoxymethod:: sg_link_set_latency(const_sg_link_t link, double value)
+
User data and properties
------------------------
.. group-tab:: C
- .. autodoxymethod:: sg_link_data(const_sg_link_t link)
- .. autodoxymethod:: sg_link_data_set(sg_link_t link, void *data)
+ .. autodoxymethod:: sg_link_get_data(const_sg_link_t link)
+ .. autodoxymethod:: sg_link_set_data(sg_link_t link, void *data)
On/Off
------