diff --git a/src/vt/epoch/epoch_manip.cc b/src/vt/epoch/epoch_manip.cc index 779286c6f1..0ddc328d10 100644 --- a/src/vt/epoch/epoch_manip.cc +++ b/src/vt/epoch/epoch_manip.cc @@ -190,6 +190,14 @@ void EpochManip::setCategory(EpochType& epoch, eEpochCategory const cat) { >(*epoch,cat); } +/*static*/ inline eEpochCategory EpochManip::makeCat( + eEpochCategory c1, eEpochCategory c2 +) { + using T = typename std::underlying_type::type; + auto ret = static_cast(c1) | static_cast(c2); + return static_cast(ret); +} + /*static*/ void EpochManip::setNode(EpochType& epoch, NodeType const node) { vtAssert(isRooted(epoch), "Must be rooted to manipulate the node"); diff --git a/src/vt/epoch/epoch_manip.h b/src/vt/epoch/epoch_manip.h index c27649b87d..e6488a26a7 100644 --- a/src/vt/epoch/epoch_manip.h +++ b/src/vt/epoch/epoch_manip.h @@ -152,6 +152,14 @@ struct EpochManip : runtime::component::Component { */ static void setSeq(EpochType& epoch, EpochType::ImplType const seq); + /** + * \brief Combine eEpochCategory elements + * + * \param[in] c1 category 1 + * \param[in] c2 category 2 + */ + static eEpochCategory makeCat(eEpochCategory c1, eEpochCategory c2); + /* * General (stateless) methods for creating a epoch with certain properties * based on a current sequence number