SimGrid
3.21
Versatile Simulation of Distributed Systems
|
Static methods working on the current actor (see s4u::Actor)
Functions | |
bool | is_maestro () |
void | sleep_for (double duration) |
Block the actor sleeping for that amount of seconds (may throws hostFailure) More... | |
void | sleep_until (double timeout) |
template<class Rep , class Period > | |
void | sleep_for (std::chrono::duration< Rep, Period > duration) |
template<class Duration > | |
void | sleep_until (const SimulationTimePoint< Duration > &timeout_time) |
void | execute (double flop) |
Block the actor, computing the given amount of flops. More... | |
void | execute (double flop, double priority) |
Block the actor, computing the given amount of flops at the given priority. More... | |
void | parallel_execute (int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount) |
void | parallel_execute (int host_nb, sg_host_t *host_list, double *flops_amount, double *bytes_amount, double timeout) |
ExecPtr | exec_init (double flops_amounts) |
ExecPtr | exec_async (double flops_amounts) |
aid_t | get_pid () |
Returns the actor ID of the current actor). More... | |
aid_t | get_ppid () |
Returns the ancestor's actor ID of the current actor. More... | |
std::string | get_name () |
Returns the name of the current actor. More... | |
const char * | get_cname () |
Returns the name of the current actor as a C string. More... | |
Host * | get_host () |
Returns the name of the host on which the actor is running. More... | |
void | suspend () |
Suspend the actor. More... | |
void | yield () |
yield the actor. More... | |
void | resume () |
Resume the actor. More... | |
bool | is_suspended () |
void | exit () |
kill the actor. More... | |
void | on_exit (std::function< void(int, void *)> fun, void *data) |
Add a function to the list of "on_exit" functions. More... | |
void | migrate (Host *new_host) |
Migrate the actor to a new host. More... | |
bool simgrid::s4u::this_actor::is_maestro | ( | ) |
void simgrid::s4u::this_actor::sleep_for | ( | double | duration | ) |
Block the actor sleeping for that amount of seconds (may throws hostFailure)
void simgrid::s4u::this_actor::sleep_until | ( | double | timeout | ) |
|
inline |
|
inline |
void simgrid::s4u::this_actor::execute | ( | double | flop | ) |
Block the actor, computing the given amount of flops.
void simgrid::s4u::this_actor::execute | ( | double | flop, |
double | priority | ||
) |
Block the actor, computing the given amount of flops at the given priority.
An execution of priority 2 computes twice as fast as an execution at priority 1.
void simgrid::s4u::this_actor::parallel_execute | ( | int | host_nb, |
sg_host_t * | host_list, | ||
double * | flops_amount, | ||
double * | bytes_amount | ||
) |
void simgrid::s4u::this_actor::parallel_execute | ( | int | host_nb, |
sg_host_t * | host_list, | ||
double * | flops_amount, | ||
double * | bytes_amount, | ||
double | timeout | ||
) |
ExecPtr simgrid::s4u::this_actor::exec_init | ( | double | flops_amounts | ) |
ExecPtr simgrid::s4u::this_actor::exec_async | ( | double | flops_amounts | ) |
aid_t simgrid::s4u::this_actor::get_pid | ( | ) |
Returns the actor ID of the current actor).
aid_t simgrid::s4u::this_actor::get_ppid | ( | ) |
Returns the ancestor's actor ID of the current actor.
std::string simgrid::s4u::this_actor::get_name | ( | ) |
Returns the name of the current actor.
const char* simgrid::s4u::this_actor::get_cname | ( | ) |
Returns the name of the current actor as a C string.
Host* simgrid::s4u::this_actor::get_host | ( | ) |
Returns the name of the host on which the actor is running.
void simgrid::s4u::this_actor::suspend | ( | ) |
Suspend the actor.
void simgrid::s4u::this_actor::yield | ( | ) |
yield the actor.
void simgrid::s4u::this_actor::resume | ( | ) |
Resume the actor.
bool simgrid::s4u::this_actor::is_suspended | ( | ) |
void simgrid::s4u::this_actor::exit | ( | ) |
kill the actor.
void simgrid::s4u::this_actor::on_exit | ( | std::function< void(int, void *)> | fun, |
void * | data | ||
) |
Add a function to the list of "on_exit" functions.
void simgrid::s4u::this_actor::migrate | ( | Host * | new_host | ) |
Migrate the actor to a new host.