Skip to content

Commit

Permalink
#1395: lb: add hash for new enum
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander committed Aug 23, 2021
1 parent c1ad7c7 commit 79efa85
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/vt/vrt/collection/balance/greedylb/greedylb.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,18 @@ struct GreedyLB : BaseLB {

}}}} /* end namespace vt::vrt::collection::lb */

namespace std {

template <>
struct hash<::vt::vrt::collection::lb::DataDistStrategy> {
size_t operator()(::vt::vrt::collection::lb::DataDistStrategy const& in) const {
using under = std::underlying_type<
::vt::vrt::collection::lb::DataDistStrategy
>::type;
return std::hash<under>()(static_cast<under>(in));
}
};

} /* end namespace std */

#endif /*INCLUDED_VT_VRT_COLLECTION_BALANCE_GREEDYLB_GREEDYLB_H*/

0 comments on commit 79efa85

Please sign in to comment.