A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add explicit keyword to one-parameter constructors.
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Actor.hpp
diff --git
a/include/simgrid/s4u/Actor.hpp
b/include/simgrid/s4u/Actor.hpp
index
e9cdd87
..
8299eb1
100644
(file)
--- a/
include/simgrid/s4u/Actor.hpp
+++ b/
include/simgrid/s4u/Actor.hpp
@@
-130,6
+130,7
@@
namespace s4u {
/** @brief Simulation Agent */
XBT_PUBLIC_CLASS Actor : public simgrid::xbt::Extendable<Actor>
{
/** @brief Simulation Agent */
XBT_PUBLIC_CLASS Actor : public simgrid::xbt::Extendable<Actor>
{
+ friend Exec;
friend Mailbox;
friend simgrid::simix::ActorImpl;
friend simgrid::kernel::activity::MailboxImpl;
friend Mailbox;
friend simgrid::simix::ActorImpl;
friend simgrid::kernel::activity::MailboxImpl;
@@
-217,7
+218,9
@@
public:
/** Resume a suspended actor by resuming the task on which it was waiting for the completion. */
void resume();
/** Resume a suspended actor by resuming the task on which it was waiting for the completion. */
void resume();
-
+
+ void yield();
+
/** Returns true if the actor is suspended. */
int isSuspended();
/** Returns true if the actor is suspended. */
int isSuspended();
@@
-256,6
+259,7
@@
public:
* This blocks the calling actor until the actor on which we call join() is terminated
*/
void join();
* This blocks the calling actor until the actor on which we call join() is terminated
*/
void join();
+ void join(double timeout);
// Static methods on all actors:
// Static methods on all actors:
@@
-267,9
+271,13
@@
public:
simix::ActorImpl* getImpl();
/** Retrieve the property value (or nullptr if not set) */
simix::ActorImpl* getImpl();
/** Retrieve the property value (or nullptr if not set) */
+ std::map<std::string, std::string>* getProperties();
const char* getProperty(const char* key);
void setProperty(const char* key, const char* value);
Actor* restart();
const char* getProperty(const char* key);
void setProperty(const char* key, const char* value);
Actor* restart();
+
+ ExecPtr exec_init(double flops_amounts);
+ ExecPtr exec_async(double flops_amounts);
};
/** @ingroup s4u_api
};
/** @ingroup s4u_api
@@
-302,10
+310,15
@@
XBT_ATTRIB_DEPRECATED_v320("Use sleep_for(): v3.20 will turn this warning into a
/** Block the actor, computing the given amount of flops */
XBT_PUBLIC(void) execute(double flop);
/** Block the actor, computing the given amount of flops */
XBT_PUBLIC(void) execute(double flop);
+
/** 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. */
XBT_PUBLIC(void) 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. */
XBT_PUBLIC(void) execute(double flop, double priority);
+XBT_PUBLIC(void) parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount);
+XBT_PUBLIC(void)
+parallel_execute(int host_nb, sg_host_t* host_list, double* flops_amount, double* bytes_amount, double timeout);
+
/** Block the actor until it gets a message from the given mailbox.
*
* See \ref Comm for the full communication API (including non blocking communications).
/** Block the actor until it gets a message from the given mailbox.
*
* See \ref Comm for the full communication API (including non blocking communications).
@@
-347,6
+360,9
@@
XBT_PUBLIC(Host*) getHost();
/** @brief Suspend the actor. */
XBT_PUBLIC(void) suspend();
/** @brief Suspend the actor. */
XBT_PUBLIC(void) suspend();
+/** @brief yield the actor. */
+XBT_PUBLIC(void) yield();
+
/** @brief Resume the actor. */
XBT_PUBLIC(void) resume();
/** @brief Resume the actor. */
XBT_PUBLIC(void) resume();