MarchingCubes generate step now requires a ScatterCounting object.

Instead of having the generate step templated on the device adapter and
the counting handle, we take in a fully constructed scatter counting object.
This commit is contained in:
Robert Maynard 2016-01-04 16:38:11 -05:00
parent 4cd2f582f4
commit 8079dc28f0

@ -120,15 +120,12 @@ public:
return this->Scatter; return this->Scatter;
} }
template<typename CountArrayType, typename Device>
VTKM_CONT_EXPORT VTKM_CONT_EXPORT
IsosurfaceGenerate(FieldType isovalue, IsosurfaceGenerate(FieldType isovalue,
const CountArrayType &countArray, const vtkm::worklet::ScatterCounting& scatter,
Device,
IdPortalConstType edgeTable) : EdgeTable(edgeTable), IdPortalConstType edgeTable) : EdgeTable(edgeTable),
Isovalue(isovalue), Isovalue(isovalue),
Scatter(countArray, Scatter(scatter) { }
Device()) { }
template<typename CellShapeTag, template<typename CellShapeTag,
typename FieldInType, // Vec-like, one per input point typename FieldInType, // Vec-like, one per input point
@ -265,9 +262,9 @@ public:
numOutputTrisPerCell, numOutputTrisPerCell,
numTrianglesTable); numTrianglesTable);
vtkm::worklet::ScatterCounting scatter(numOutputTrisPerCell, DeviceAdapter());
IsosurfaceGenerate isosurface(isovalue, IsosurfaceGenerate isosurface(isovalue,
numOutputTrisPerCell, scatter,
DeviceAdapter(),
edgeTable.PrepareForInput(DeviceAdapter())); edgeTable.PrepareForInput(DeviceAdapter()));
vtkm::worklet::DispatcherMapTopology<IsosurfaceGenerate, DeviceAdapter> vtkm::worklet::DispatcherMapTopology<IsosurfaceGenerate, DeviceAdapter>