diff --git a/src/vtkh/filters/HistSampling.cpp b/src/vtkh/filters/HistSampling.cpp index d000423..8891ef2 100644 --- a/src/vtkh/filters/HistSampling.cpp +++ b/src/vtkh/filters/HistSampling.cpp @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -341,15 +340,13 @@ void HistSampling::DoExecute() vtkm::cont::ArrayHandle output; vtkm::cont::Algorithm ::Copy(stencilBool , output ); - vtkm::cont:: DataSetFieldAdd dataSetFieldAdd; - if(assoc == vtkm::cont::Field::Association::POINTS) { - dataSetFieldAdd.AddPointField(dom , "valSampled", output ); + dom.AddPointField("valSampled", output); } else { - dataSetFieldAdd.AddCellField(dom , "valSampled", output ); + dom.AddCellField("valSampled", output); } } diff --git a/src/vtkh/utils/vtkm_array_utils.hpp b/src/vtkh/utils/vtkm_array_utils.hpp index 2eb3d23..dae3d62 100644 --- a/src/vtkh/utils/vtkm_array_utils.hpp +++ b/src/vtkh/utils/vtkm_array_utils.hpp @@ -2,7 +2,6 @@ #define VTKH_VTKM_ARRAY_UTILS_HPP #include -#include namespace vtkh { @@ -10,11 +9,7 @@ template T * GetVTKMPointer(vtkm::cont::ArrayHandle &handle) { - typedef typename vtkm::cont::ArrayHandle HandleType; - typedef typename HandleType::template ExecutionTypes::Portal PortalType; - typedef typename vtkm::cont::ArrayPortalToIterators::IteratorType IteratorType; - IteratorType iter = vtkm::cont::ArrayPortalToIterators(handle.WritePortal()).GetBegin(); - return &(*iter); + return handle.WritePortal().GetArray(); } }//namespace vtkh