10 #ifndef vtk_m_exec_internal_ReduceByKeyLookup_h
11 #define vtk_m_exec_internal_ReduceByKeyLookup_h
18 #include <type_traits>
29 template <
typename IdPortalType,
typename IdComponentPortalType>
30 struct ReduceByKeyLookupBase
34 (std::is_same<typename IdComponentPortalType::ValueType, vtkm::IdComponent>::value));
36 IdPortalType SortedValuesMap;
40 ReduceByKeyLookupBase(
const IdPortalType& sortedValuesMap,
const IdPortalType& offsets)
41 : SortedValuesMap(sortedValuesMap)
48 ReduceByKeyLookupBase() {}
57 template <
typename KeyPortalType,
typename IdPortalType,
typename IdComponentPortalType>
58 struct ReduceByKeyLookup : ReduceByKeyLookupBase<IdPortalType, IdComponentPortalType>
60 using KeyType =
typename KeyPortalType::ValueType;
62 KeyPortalType UniqueKeys;
65 ReduceByKeyLookup(
const KeyPortalType& uniqueKeys,
66 const IdPortalType& sortedValuesMap,
67 const IdPortalType& offsets)
68 : ReduceByKeyLookupBase<IdPortalType, IdComponentPortalType>(sortedValuesMap, offsets)
69 , UniqueKeys(uniqueKeys)
75 ReduceByKeyLookup() {}
81 #endif //vtk_m_exec_internal_ReduceByKeyLookup_h