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
fix S4U chord example \o/
[simgrid.git]
/
src
/
s4u
/
s4u_actor.cpp
diff --git
a/src/s4u/s4u_actor.cpp
b/src/s4u/s4u_actor.cpp
index
4841225
..
37d935f
100644
(file)
--- a/
src/s4u/s4u_actor.cpp
+++ b/
src/s4u/s4u_actor.cpp
@@
-29,7
+29,7
@@
ActorPtr Actor::self()
ActorPtr Actor::createActor(const char* name, s4u::Host* host, std::function<void()> code)
{
ActorPtr Actor::createActor(const char* name, s4u::Host* host, std::function<void()> code)
{
- s
mx_actor_t
actor = simcall_process_create(name, std::move(code), nullptr, host, nullptr);
+ s
imgrid::simix::ActorImpl*
actor = simcall_process_create(name, std::move(code), nullptr, host, nullptr);
return actor->iface();
}
return actor->iface();
}
@@
-37,7
+37,7
@@
ActorPtr Actor::createActor(const char* name, s4u::Host* host, const char* funct
{
simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function);
simgrid::simix::ActorCode code = factory(std::move(args));
{
simgrid::simix::ActorCodeFactory& factory = SIMIX_get_actor_code_factory(function);
simgrid::simix::ActorCode code = factory(std::move(args));
- s
mx_actor_t actor
= simcall_process_create(name, std::move(code), nullptr, host, nullptr);
+ s
imgrid::simix::ActorImpl* actor
= simcall_process_create(name, std::move(code), nullptr, host, nullptr);
return actor->iface();
}
return actor->iface();
}
@@
-187,36
+187,41
@@
e_smx_state_t execute(double flops) {
void* recv(MailboxPtr chan) {
void *res = nullptr;
void* recv(MailboxPtr chan) {
void *res = nullptr;
- Comm
&
c = Comm::recv_init(chan);
- c
.setDstData(&res,
sizeof(res));
- c
.
wait();
+ Comm
Ptr
c = Comm::recv_init(chan);
+ c
->setDstData(&res,
sizeof(res));
+ c
->
wait();
return res;
}
void send(MailboxPtr chan, void* payload, double simulatedSize)
{
return res;
}
void send(MailboxPtr chan, void* payload, double simulatedSize)
{
- Comm
&
c = Comm::send_init(chan);
- c
.
setRemains(simulatedSize);
- c
.
setSrcData(payload);
- // c
.
start() is optional.
- c
.
wait();
+ Comm
Ptr
c = Comm::send_init(chan);
+ c
->
setRemains(simulatedSize);
+ c
->
setSrcData(payload);
+ // c
->
start() is optional.
+ c
->
wait();
}
void send(MailboxPtr chan, void* payload, double simulatedSize, double timeout)
{
}
void send(MailboxPtr chan, void* payload, double simulatedSize, double timeout)
{
- Comm
&
c = Comm::send_init(chan);
- c
.
setRemains(simulatedSize);
- c
.
setSrcData(payload);
- // c
.
start() is optional.
- c
.
wait(timeout);
+ Comm
Ptr
c = Comm::send_init(chan);
+ c
->
setRemains(simulatedSize);
+ c
->
setSrcData(payload);
+ // c
->
start() is optional.
+ c
->
wait(timeout);
}
}
-Comm
&
isend(MailboxPtr chan, void* payload, double simulatedSize)
+Comm
Ptr
isend(MailboxPtr chan, void* payload, double simulatedSize)
{
return Comm::send_async(chan, payload, simulatedSize);
}
{
return Comm::send_async(chan, payload, simulatedSize);
}
-Comm& irecv(MailboxPtr chan, void** data)
+void dsend(MailboxPtr chan, void* payload, double simulatedSize)
+{
+ Comm::send_detached(chan, payload, simulatedSize);
+}
+
+CommPtr irecv(MailboxPtr chan, void** data)
{
return Comm::recv_async(chan, data);
}
{
return Comm::recv_async(chan, data);
}