Skip to content

Commit

Permalink
#410: term: broaden window archetype lookup criteria
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 20, 2019
1 parent f7651af commit 69856bc
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/vt/termination/termination.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,15 @@ EpochType TerminationDetector::getArchetype(EpochType const& epoch) const {
}

EpochWindow* TerminationDetector::getWindow(EpochType const& epoch) {
auto const is_rooted = epoch::EpochManip::isRooted(epoch);
if (is_rooted) {
auto const& arch_epoch = getArchetype(epoch);
auto const arch_epoch = getArchetype(epoch);

debug_print_verbose(
term, node,
"getWindow: epoch={:x}, rooted={}, isDep={}, arch_epoch={:x}\n",
epoch, isRooted(epoch), isDep(epoch), arch_epoch
);

if (arch_epoch != 0) {
auto iter = epoch_arch_.find(arch_epoch);
if (iter == epoch_arch_.end()) {
epoch_arch_.emplace(
Expand Down Expand Up @@ -932,6 +938,11 @@ bool TerminationDetector::epochReleased(EpochType epoch) {
return true;
}

debug_print(
term, node,
"epochReleased: epoch={:x}, is_dep={}\n", epoch, is_dep
);

// Terminated epochs are always released
bool const is_term = getWindow(epoch)->isTerminated(epoch);
if (is_term) {
Expand Down

0 comments on commit 69856bc

Please sign in to comment.