Commit 7f487b1e authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot

Merge topic 'dispatcher_reduce-by-key_use_scheduling_range'

63fe0f09 DispatcherReduceByKey uses the scheduling_range like all other dispatchers
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !1674
parents 27714977 63fe0f09
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment