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 Exec::get_start_time()
[simgrid.git]
/
include
/
simgrid
/
s4u
/
Exec.hpp
diff --git
a/include/simgrid/s4u/Exec.hpp
b/include/simgrid/s4u/Exec.hpp
index
b15ed1b
..
afc242f
100644
(file)
--- a/
include/simgrid/s4u/Exec.hpp
+++ b/
include/simgrid/s4u/Exec.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2017-202
0
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2017-202
1
. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-37,18
+37,21
@@
class XBT_PUBLIC Exec : public Activity_T<Exec> {
std::vector<double> bytes_amounts_;
std::vector<Host*> hosts_;
bool parallel_ = false;
std::vector<double> bytes_amounts_;
std::vector<Host*> hosts_;
bool parallel_ = false;
+ double start_time_ = -1.0;
+ double finish_time_ = -1.0;
+ Exec();
public:
public:
- Exec();
~Exec() override = default;
#ifndef DOXYGEN
Exec(Exec const&) = delete;
Exec& operator=(Exec const&) = delete;
#endif
~Exec() override = default;
#ifndef DOXYGEN
Exec(Exec const&) = delete;
Exec& operator=(Exec const&) = delete;
#endif
- static xbt::signal<void(
Actor const&,
Exec const&)> on_start;
- static xbt::signal<void(
Actor const&,
Exec const&)> on_completion;
+ static xbt::signal<void(Exec const&)> on_start;
+ static xbt::signal<void(Exec const&)> on_completion;
+ static ExecPtr init();
Exec* start() override;
/** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
* parallel executions. */
Exec* start() override;
/** @brief On sequential executions, returns the amount of flops that remain to be done; This cannot be used on
* parallel executions. */
@@
-76,10
+79,11
@@
public:
Exec* cancel() override;
Host* get_host() const;
unsigned int get_host_number() const;
Exec* cancel() override;
Host* get_host() const;
unsigned int get_host_number() const;
- double get_start_time() const
;
+ double get_start_time() const
{ return start_time_; }
double get_finish_time() const;
double get_cost() const;
bool is_parallel() const { return parallel_; }
double get_finish_time() const;
double get_cost() const;
bool is_parallel() const { return parallel_; }
+ bool is_assigned() const override { return not hosts_.empty(); }
};
} // namespace s4u
};
} // namespace s4u