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