Commit 459552d7 authored by Robert Maynard's avatar Robert Maynard
Browse files

Update the name of the binary functor for UpperBounds

parent 3cbac038
......@@ -553,19 +553,20 @@ private:
template<class InputPortal, class ValuesPortal, class OutputPortal,
class Compare>
class BinaryCompare>
VTKM_CONT_EXPORT static void UpperBoundsPortal(const InputPortal &input,
const ValuesPortal &values,
const OutputPortal &output,
Compare comp)
BinaryCompare binary_compare)
{
vtkm::exec::cuda::internal::WrappedBinaryOperator<bool,BinaryCompare> bop(binary_compare);
::thrust::upper_bound(thrust::cuda::par,
IteratorBegin(input),
IteratorEnd(input),
IteratorBegin(values),
IteratorEnd(values),
IteratorBegin(output),
comp);
bop);
}
template<class InputPortal, class OutputPortal>
......@@ -1000,18 +1001,18 @@ public:
output.PrepareForOutput(numberOfValues, DeviceAdapterTag()));
}
template<typename T, class SIn, class SVal, class SOut, class Compare>
template<typename T, class SIn, class SVal, class SOut, class BinaryCompare>
VTKM_CONT_EXPORT static void UpperBounds(
const vtkm::cont::ArrayHandle<T,SIn>& input,
const vtkm::cont::ArrayHandle<T,SVal>& values,
vtkm::cont::ArrayHandle<vtkm::Id,SOut>& output,
Compare comp)
BinaryCompare binary_compare)
{
vtkm::Id numberOfValues = values.GetNumberOfValues();
UpperBoundsPortal(input.PrepareForInput(DeviceAdapterTag()),
values.PrepareForInput(DeviceAdapterTag()),
output.PrepareForOutput(numberOfValues, DeviceAdapterTag()),
comp);
binary_compare);
}
template<class SIn, class SOut>
......
......@@ -1375,23 +1375,23 @@ private:
};
template<class InputPortalType,class ValuesPortalType,class OutputPortalType,class Compare>
template<class InputPortalType,class ValuesPortalType,class OutputPortalType,class BinaryCompare>
struct UpperBoundsKernelComparisonKernel
{
InputPortalType InputPortal;
ValuesPortalType ValuesPortal;
OutputPortalType OutputPortal;
Compare CompareFunctor;
BinaryCompare CompareFunctor;
VTKM_CONT_EXPORT
UpperBoundsKernelComparisonKernel(InputPortalType inputPortal,
ValuesPortalType valuesPortal,
OutputPortalType outputPortal,
Compare comp)
BinaryCompare binary_compare)
: InputPortal(inputPortal),
ValuesPortal(valuesPortal),
OutputPortal(outputPortal),
CompareFunctor(comp) { }
CompareFunctor(binary_compare) { }
VTKM_EXEC_EXPORT
void operator()(vtkm::Id index) const
......@@ -1443,12 +1443,12 @@ public:
DerivedAlgorithm::Schedule(kernel, arraySize);
}
template<typename T, class CIn, class CVal, class COut, class Compare>
template<typename T, class CIn, class CVal, class COut, class BinaryCompare>
VTKM_CONT_EXPORT static void UpperBounds(
const vtkm::cont::ArrayHandle<T,CIn> &input,
const vtkm::cont::ArrayHandle<T,CVal> &values,
vtkm::cont::ArrayHandle<vtkm::Id,COut> &output,
Compare comp)
BinaryCompare binary_compare)
{
vtkm::Id arraySize = values.GetNumberOfValues();
......@@ -1456,11 +1456,11 @@ public:
typename vtkm::cont::ArrayHandle<T,CIn>::template ExecutionTypes<DeviceAdapterTag>::PortalConst,
typename vtkm::cont::ArrayHandle<T,CVal>::template ExecutionTypes<DeviceAdapterTag>::PortalConst,
typename vtkm::cont::ArrayHandle<T,COut>::template ExecutionTypes<DeviceAdapterTag>::Portal,
Compare>
BinaryCompare>
kernel(input.PrepareForInput(DeviceAdapterTag()),
values.PrepareForInput(DeviceAdapterTag()),
output.PrepareForOutput(arraySize, DeviceAdapterTag()),
comp);
binary_compare);
DerivedAlgorithm::Schedule(kernel, arraySize);
}
......
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