DispatcherReduceByKey uses the scheduling_range like all other dispatchers

This commit is contained in:
Robert Maynard 2019-05-15 11:42:02 -04:00
parent bd626dac79
commit 63fe0f0965
2 changed files with 18 additions and 2 deletions

@ -59,8 +59,8 @@ public:
const InputDomainType& inputDomain = invocation.GetInputDomain();
// Now that we have the input domain, we can extract the range of the
// scheduling and call BadicInvoke.
this->BasicInvoke(invocation, inputDomain.GetInputRange());
// scheduling and call BasicInvoke.
this->BasicInvoke(invocation, internal::scheduling_range(inputDomain));
}
};
}

@ -48,6 +48,8 @@ namespace vtkm
{
namespace worklet
{
template <typename T>
class VTKM_ALWAYS_EXPORT Keys;
namespace internal
{
@ -57,6 +59,13 @@ inline auto scheduling_range(const Domain& inputDomain) -> decltype(inputDomain.
return inputDomain.GetNumberOfValues();
}
template <typename KeyType>
inline auto scheduling_range(const vtkm::worklet::Keys<KeyType>& inputDomain)
-> decltype(inputDomain.GetInputRange())
{
return inputDomain.GetInputRange();
}
template <typename Domain>
inline auto scheduling_range(const Domain* const inputDomain)
-> decltype(inputDomain->GetNumberOfValues())
@ -64,6 +73,13 @@ inline auto scheduling_range(const Domain* const inputDomain)
return inputDomain->GetNumberOfValues();
}
template <typename KeyType>
inline auto scheduling_range(const vtkm::worklet::Keys<KeyType>* const inputDomain)
-> decltype(inputDomain->GetInputRange())
{
return inputDomain->GetInputRange();
}
template <typename Domain, typename SchedulingRangeType>
inline auto scheduling_range(const Domain& inputDomain, SchedulingRangeType type)
-> decltype(inputDomain.GetSchedulingRange(type))