Skip to content

Commit

Permalink
#410: term: use typedef for epoch parent list
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Jun 20, 2019
1 parent f47e269 commit 46b9fd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/vt/termination/term_parent.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
namespace vt { namespace term {

struct EpochRelation {
using ParentBagType = std::unordered_set<EpochType>;

EpochRelation(EpochType in_epoch, bool in_is_ds)
: epoch_(in_epoch), is_ds_(in_is_ds)
Expand All @@ -62,6 +63,7 @@ struct EpochRelation {
void clearParents();
bool hasParent() const;
std::size_t numParents() const;
ParentBagType const& getParents() const { return parents_; }

protected:
// The epoch for the this relation
Expand All @@ -71,7 +73,7 @@ struct EpochRelation {
// Is this a DS-epoch
bool is_ds_ = false;
// The parent epochs for a given epoch
std::unordered_set<EpochType> parents_ = {};
ParentBagType parents_ = {};
};

}} /* end namespace vt::term */
Expand Down
2 changes: 2 additions & 0 deletions src/vt/termination/termination.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include "vt/termination/term_action.h"
#include "vt/termination/term_interface.h"
#include "vt/termination/term_window.h"
#include "vt/termination/term_parent.h"
#include "vt/termination/dijkstra-scholten/ds_headers.h"
#include "vt/epoch/epoch.h"
#include "vt/activefn/activefn.h"
Expand All @@ -78,6 +79,7 @@ struct TerminationDetector :
using TermStateDSType = term::ds::StateDS::TerminatorType;
using WindowType = std::unique_ptr<EpochWindow>;
using ArgType = vt::arguments::ArgConfig;
using ParentBagType = EpochRelation::ParentBagType;

TerminationDetector();

Expand Down

0 comments on commit 46b9fd4

Please sign in to comment.