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
MC: move the reversible_race logic to the Transition class
[simgrid.git]
/
src
/
mc
/
transition
/
TransitionRandom.cpp
diff --git
a/src/mc/transition/TransitionRandom.cpp
b/src/mc/transition/TransitionRandom.cpp
index
d117a57
..
81eab72
100644
(file)
--- a/
src/mc/transition/TransitionRandom.cpp
+++ b/
src/mc/transition/TransitionRandom.cpp
@@
-23,4
+23,14
@@
RandomTransition::RandomTransition(aid_t issuer, int times_considered, std::stri
xbt_assert(stream >> min_ >> max_);
}
xbt_assert(stream >> min_ >> max_);
}
+bool RandomTransition::reversible_race(const Transition* other) const
+{
+ switch (type_) {
+ case Type::RANDOM:
+ return true; // Random is always enabled
+ default:
+ xbt_die("Unexpected transition type %s", to_c_str(type_));
+ }
+}
+
} // namespace simgrid::mc
} // namespace simgrid::mc