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 copyright lines for 2023.
[simgrid.git]
/
src
/
kernel
/
resource
/
profile
/
Profile.hpp
diff --git
a/src/kernel/resource/profile/Profile.hpp
b/src/kernel/resource/profile/Profile.hpp
index
9b9402a
..
1876a95
100644
(file)
--- a/
src/kernel/resource/profile/Profile.hpp
+++ b/
src/kernel/resource/profile/Profile.hpp
@@
-1,4
+1,4
@@
-/* Copyright (c) 2004-202
2
. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-202
3
. 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. */
@@
-15,9
+15,7
@@
#include <vector>
#include <string>
#include <vector>
#include <string>
-namespace simgrid {
-namespace kernel {
-namespace profile {
+namespace simgrid::kernel::profile {
/** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
*
/** @brief A profile is a set of timed values, encoding the value that a variable takes at what time
*
@@
-54,11
+52,16
@@
private:
std::vector<DatedValue> event_list;
FutureEvtSet* fes_ = nullptr;
double repeat_delay;
std::vector<DatedValue> event_list;
FutureEvtSet* fes_ = nullptr;
double repeat_delay;
+
+ bool get_enough_events(size_t index)
+ {
+ if (index >= event_list.size() && cb)
+ cb(event_list);
+ return index < event_list.size();
+ }
};
};
-} // namespace profile
-} // namespace kernel
-} // namespace simgrid
+} // namespace simgrid::kernel::profile
/** Module finalizer: frees all profiles */
XBT_PUBLIC void tmgr_finalize();
/** Module finalizer: frees all profiles */
XBT_PUBLIC void tmgr_finalize();