Commit 0901e715 authored by Robert Maynard's avatar Robert Maynard
Browse files

Update the name of the binary comparison for LowerBounds.

parent 9597620a
......@@ -276,20 +276,21 @@ private:
}
template<class InputPortal, class ValuesPortal, class OutputPortal,
class Compare>
class BinaryCompare>
VTKM_CONT_EXPORT static void LowerBoundsPortal(const InputPortal &input,
const ValuesPortal &values,
const OutputPortal &output,
Compare comp)
BinaryCompare binary_compare)
{
vtkm::exec::cuda::internal::WrappedBinaryOperator<bool, Compare> bop(comp);
vtkm::exec::cuda::internal::WrappedBinaryOperator<bool,
BinaryCompare> bop(binary_compare);
::thrust::lower_bound(thrust::cuda::par,
IteratorBegin(input),
IteratorEnd(input),
IteratorBegin(values),
IteratorEnd(values),
IteratorBegin(output),
comp);
bop);
}
template<class InputPortal>
......@@ -610,18 +611,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 LowerBounds(
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();
LowerBoundsPortal(input.PrepareForInput(DeviceAdapterTag()),
values.PrepareForInput(DeviceAdapterTag()),
output.PrepareForOutput(numberOfValues, DeviceAdapterTag()),
comp);
binary_compare);
}
template<class SIn, class SOut>
......
......@@ -270,23 +270,24 @@ private:
{ }
};
template<class InputPortalType,class ValuesPortalType,class OutputPortalType,class Compare>
template<class InputPortalType, class ValuesPortalType,
class OutputPortalType, class BinaryCompare>
struct LowerBoundsComparisonKernel
{
InputPortalType InputPortal;
ValuesPortalType ValuesPortal;
OutputPortalType OutputPortal;
Compare CompareFunctor;
BinaryCompare CompareFunctor;
VTKM_CONT_EXPORT
LowerBoundsComparisonKernel(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
......@@ -339,12 +340,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 LowerBounds(
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();
......@@ -352,11 +353,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<vtkm::Id,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