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
update things
[simgrid.git]
/
src
/
s4u
/
s4u_Exec.cpp
diff --git
a/src/s4u/s4u_Exec.cpp
b/src/s4u/s4u_Exec.cpp
index
698c1b1
..
0bee8d4
100644
(file)
--- a/
src/s4u/s4u_Exec.cpp
+++ b/
src/s4u/s4u_Exec.cpp
@@
-98,13
+98,9
@@
ExecPtr Exec::set_timeout(double timeout)
return this;
}
return this;
}
-ExecPtr Exec::set_name(const std::string& name)
-{
- xbt_assert(state_ == State::INITED, "Cannot change the name of an exec after its start");
- name_ = name;
- return this;
-}
-
+/** @brief Retrieve the host on which this activity takes place.
+ * If it runs on more than one host, only the first host is returned.
+ */
Host* Exec::get_host() const
{
return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_host();
Host* Exec::get_host() const
{
return static_cast<kernel::activity::ExecImpl*>(pimpl_.get())->get_host();
@@
-139,13
+135,6
@@
ExecPtr Exec::set_priority(double priority)
return this;
}
return this;
}
-ExecPtr Exec::set_tracing_category(const std::string& category)
-{
- xbt_assert(state_ == State::INITED, "Cannot change the tracing category of an exec after its start");
- tracing_category_ = category;
- return this;
-}
-
///////////// SEQUENTIAL EXECUTIONS ////////
ExecSeq::ExecSeq(sg_host_t host, double flops_amount) : Exec(), flops_amount_(flops_amount)
{
///////////// SEQUENTIAL EXECUTIONS ////////
ExecSeq::ExecSeq(sg_host_t host, double flops_amount) : Exec(), flops_amount_(flops_amount)
{
@@
-157,8
+146,8
@@
Exec* ExecSeq::start()
{
kernel::actor::simcall([this] {
(*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
{
kernel::actor::simcall([this] {
(*boost::static_pointer_cast<kernel::activity::ExecImpl>(pimpl_))
- .set_name(
name_
)
- .set_tracing_category(
tracing_category_
)
+ .set_name(
get_name()
)
+ .set_tracing_category(
get_tracing_category()
)
.set_sharing_penalty(1. / priority_)
.set_bound(bound_)
.set_flops_amount(flops_amount_)
.set_sharing_penalty(1. / priority_)
.set_bound(bound_)
.set_flops_amount(flops_amount_)
@@
-179,18
+168,10
@@
ExecPtr ExecSeq::set_host(Host* host)
"Cannot change the host of an exec once it's done (state: %d)", (int)state_);
if (state_ == State::STARTED)
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->migrate(host);
"Cannot change the host of an exec once it's done (state: %d)", (int)state_);
if (state_ == State::STARTED)
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->migrate(host);
- host_ = host;
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->set_host(host);
return this;
}
boost::static_pointer_cast<simgrid::kernel::activity::ExecImpl>(pimpl_)->set_host(host);
return this;
}
-
-/** @brief Retrieve the host on which this activity takes place. */
-Host* ExecSeq::get_host()
-{
- return host_;
-}
-
/** @brief Returns the amount of flops that remain to be done */
double ExecSeq::get_remaining()
{
/** @brief Returns the amount of flops that remain to be done */
double ExecSeq::get_remaining()
{