diff --git a/vtkm/worklet/Threshold.h b/vtkm/worklet/Threshold.h index def884693..14864040c 100644 --- a/vtkm/worklet/Threshold.h +++ b/vtkm/worklet/Threshold.h @@ -33,7 +33,6 @@ namespace vtkm { namespace worklet { -template class Threshold { public: @@ -102,10 +101,12 @@ public: UnaryPredicate Predicate; }; - template + template vtkm::cont::CellSetPermutation, CellSetType> - Run(const CellSetType &cellSet, const vtkm::cont::Field &field, - const UnaryPredicate &predicate) + Run(const CellSetType &cellSet, + const vtkm::cont::Field &field, + const UnaryPredicate &predicate, + DeviceAdapter) { typedef vtkm::cont::CellSetPermutation, CellSetType> OutputType; diff --git a/vtkm/worklet/testing/UnitTestThreshold.cxx b/vtkm/worklet/testing/UnitTestThreshold.cxx index 279c482cf..c40ad1e2d 100644 --- a/vtkm/worklet/testing/UnitTestThreshold.cxx +++ b/vtkm/worklet/testing/UnitTestThreshold.cxx @@ -70,9 +70,11 @@ public: CellSetType cellset = dataset.GetCellSet(0).CastTo(CellSetType()); - vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, dataset.GetField("pointvar"), - HasValue(60.1f)); + vtkm::worklet::Threshold threshold; + OutCellSetType outCellSet = threshold.Run(cellset, + dataset.GetField("pointvar"), + HasValue(60.1f), + DeviceAdapter()); vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar")); @@ -101,9 +103,11 @@ public: CellSetType cellset = dataset.GetCellSet(0).CastTo(CellSetType()); - vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, dataset.GetField("pointvar"), - HasValue(20.1f)); + vtkm::worklet::Threshold threshold; + OutCellSetType outCellSet = threshold.Run(cellset, + dataset.GetField("pointvar"), + HasValue(20.1f), + DeviceAdapter()); vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar")); @@ -133,9 +137,11 @@ public: CellSetType cellset = dataset.GetCellSet(0).CastTo(CellSetType()); - vtkm::worklet::Threshold threshold; - OutCellSetType outCellSet = threshold.Run(cellset, dataset.GetField("cellvar"), - HasValue(100.1f)); + vtkm::worklet::Threshold threshold; + OutCellSetType outCellSet = threshold.Run(cellset, + dataset.GetField("cellvar"), + HasValue(100.1f), + DeviceAdapter()); vtkm::cont::Field cellField = threshold.ProcessCellField(dataset.GetField("cellvar"));