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
Don't use pass-by-value for large parameters.
[simgrid.git]
/
src
/
msg
/
msg_private.hpp
diff --git
a/src/msg/msg_private.hpp
b/src/msg/msg_private.hpp
index
dff4ef7
..
ab76546
100644
(file)
--- a/
src/msg/msg_private.hpp
+++ b/
src/msg/msg_private.hpp
@@
-9,7
+9,6
@@
#include "simgrid/Exception.hpp"
#include "simgrid/msg.h"
#include "src/kernel/activity/CommImpl.hpp"
#include "simgrid/Exception.hpp"
#include "simgrid/msg.h"
#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/activity/ExecImpl.hpp"
#include <simgrid/modelchecker.h>
#include <cmath>
#include <simgrid/modelchecker.h>
#include <cmath>
@@
-30,8
+29,8
@@
class Task {
bool is_used_ = false; /* Indicates whether the task is used in SIMIX currently */
explicit Task(std::string name, double flops_amount, double bytes_amount, void* data);
bool is_used_ = false; /* Indicates whether the task is used in SIMIX currently */
explicit Task(std::string name, double flops_amount, double bytes_amount, void* data);
- explicit Task(std::string name, std::vector<s4u::Host*>
hosts, std::vector<double>
flops_amount,
- std::vector<double> bytes_amount, void* data);
+ explicit Task(std::string name, std::vector<s4u::Host*>
&& hosts, std::vector<double>&&
flops_amount,
+ std::vector<double>
&&
bytes_amount, void* data);
void report_multiple_use() const;
void report_multiple_use() const;
@@
-40,7
+39,9
@@
public:
static Task* create_parallel(std::string name, int host_nb, const msg_host_t* host_list, double* flops_amount,
double* bytes_amount, void* data);
msg_error_t execute();
static Task* create_parallel(std::string name, int host_nb, const msg_host_t* host_list, double* flops_amount,
double* bytes_amount, void* data);
msg_error_t execute();
+ msg_error_t send(std::string alias, double timeout);
s4u::CommPtr send_async(std::string alias, void_f_pvoid_t cleanup, bool detached);
s4u::CommPtr send_async(std::string alias, void_f_pvoid_t cleanup, bool detached);
+
void cancel();
Task(const Task&) = delete;
void cancel();
Task(const Task&) = delete;
@@
-96,6
+97,16
@@
public:
}
};
}
};
+class ActorUserData {
+ void* userdata_ = nullptr;
+
+public:
+ static xbt::Extension<simgrid::s4u::Actor, ActorUserData> EXTENSION_ID;
+
+ void set_user_data(void* data) { userdata_ = data; }
+ void* get_user_data() { return userdata_; }
+};
+
} // namespace msg
} // namespace simgrid
} // namespace msg
} // namespace simgrid