18 #ifndef viskores_exec_internal_ReduceByKeyLookup_h
19 #define viskores_exec_internal_ReduceByKeyLookup_h
26 #include <type_traits>
37 template <
typename IdPortalType,
typename IdComponentPortalType>
38 struct ReduceByKeyLookupBase
42 (std::is_same<typename IdComponentPortalType::ValueType, viskores::IdComponent>::value));
44 IdPortalType SortedValuesMap;
48 ReduceByKeyLookupBase(
const IdPortalType& sortedValuesMap,
const IdPortalType& offsets)
49 : SortedValuesMap(sortedValuesMap)
56 ReduceByKeyLookupBase() {}
65 template <
typename KeyPortalType,
typename IdPortalType,
typename IdComponentPortalType>
66 struct ReduceByKeyLookup : ReduceByKeyLookupBase<IdPortalType, IdComponentPortalType>
68 using KeyType =
typename KeyPortalType::ValueType;
70 KeyPortalType UniqueKeys;
73 ReduceByKeyLookup(
const KeyPortalType& uniqueKeys,
74 const IdPortalType& sortedValuesMap,
75 const IdPortalType& offsets)
76 : ReduceByKeyLookupBase<IdPortalType, IdComponentPortalType>(sortedValuesMap, offsets)
77 , UniqueKeys(uniqueKeys)
83 ReduceByKeyLookup() {}
89 #endif //viskores_exec_internal_ReduceByKeyLookup_h