SimGrid  3.21
Versatile Simulation of Distributed Systems
simgrid::s4u::this_actor Namespace Reference

Detailed Description

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...
 
Hostget_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...
 

Function Documentation

◆ is_maestro()

bool simgrid::s4u::this_actor::is_maestro ( )

◆ sleep_for() [1/2]

void simgrid::s4u::this_actor::sleep_for ( double  duration)

Block the actor sleeping for that amount of seconds (may throws hostFailure)

◆ sleep_until() [1/2]

void simgrid::s4u::this_actor::sleep_until ( double  timeout)

◆ sleep_for() [2/2]

template<class Rep , class Period >
void simgrid::s4u::this_actor::sleep_for ( std::chrono::duration< Rep, Period >  duration)
inline

◆ sleep_until() [2/2]

template<class Duration >
void simgrid::s4u::this_actor::sleep_until ( const SimulationTimePoint< Duration > &  timeout_time)
inline

◆ execute() [1/2]

void simgrid::s4u::this_actor::execute ( double  flop)

Block the actor, computing the given amount of flops.

◆ execute() [2/2]

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.

◆ parallel_execute() [1/2]

void simgrid::s4u::this_actor::parallel_execute ( int  host_nb,
sg_host_t *  host_list,
double *  flops_amount,
double *  bytes_amount 
)

◆ parallel_execute() [2/2]

void simgrid::s4u::this_actor::parallel_execute ( int  host_nb,
sg_host_t *  host_list,
double *  flops_amount,
double *  bytes_amount,
double  timeout 
)

◆ exec_init()

ExecPtr simgrid::s4u::this_actor::exec_init ( double  flops_amounts)

◆ exec_async()

ExecPtr simgrid::s4u::this_actor::exec_async ( double  flops_amounts)

◆ get_pid()

aid_t simgrid::s4u::this_actor::get_pid ( )

Returns the actor ID of the current actor).

◆ get_ppid()

aid_t simgrid::s4u::this_actor::get_ppid ( )

Returns the ancestor's actor ID of the current actor.

◆ get_name()

std::string simgrid::s4u::this_actor::get_name ( )

Returns the name of the current actor.

◆ get_cname()

const char* simgrid::s4u::this_actor::get_cname ( )

Returns the name of the current actor as a C string.

◆ get_host()

Host* simgrid::s4u::this_actor::get_host ( )

Returns the name of the host on which the actor is running.

◆ suspend()

void simgrid::s4u::this_actor::suspend ( )

Suspend the actor.

◆ yield()

void simgrid::s4u::this_actor::yield ( )

yield the actor.

◆ resume()

void simgrid::s4u::this_actor::resume ( )

Resume the actor.

◆ is_suspended()

bool simgrid::s4u::this_actor::is_suspended ( )

◆ exit()

void simgrid::s4u::this_actor::exit ( )

kill the actor.

◆ on_exit()

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.

◆ migrate()

void simgrid::s4u::this_actor::migrate ( Host new_host)

Migrate the actor to a new host.