Commit edc4c85f authored by Kenneth Moreland's avatar Kenneth Moreland
Browse files

Move Scatter from Worklet to Dispatcher

Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.

To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
parent 5c5fb020
......@@ -55,13 +55,12 @@ public:
using ScatterType = vtkm::worklet::ScatterPermutation<>;
explicit ParametricToWorldCoordinates(const vtkm::cont::ArrayHandle<vtkm::Id>& cellIds)
: Scatter(cellIds)
VTKM_CONT
static ScatterType MakeScatter(const vtkm::cont::ArrayHandle<vtkm::Id>& cellIds)
{
return ScatterType(cellIds);
}
const ScatterType& GetScatter() const { return this->Scatter; }
template <typename CellShapeTagType, typename PointsVecType>
VTKM_EXEC void operator()(CellShapeTagType cellShape,
PointsVecType points,
......@@ -70,9 +69,6 @@ public:
{
wc = vtkm::exec::CellInterpolate(points, pc, cellShape, *this);
}
private:
ScatterType Scatter;
};
template <vtkm::IdComponent DIMENSIONS, typename DeviceAdapter>
......@@ -185,9 +181,9 @@ void GenerateRandomInput(const vtkm::cont::DataSet& ds,
pcoords.GetPortalControl().Set(i, pc);
}
ParametricToWorldCoordinates pc2wc(cellIds);
vtkm::worklet::DispatcherMapTopology<ParametricToWorldCoordinates>(pc2wc).Invoke(
ds.GetCellSet(), ds.GetCoordinateSystem().GetData(), pcoords, wcoords);
vtkm::worklet::DispatcherMapTopology<ParametricToWorldCoordinates> dispatcher(
ParametricToWorldCoordinates::MakeScatter(cellIds));
dispatcher.Invoke(ds.GetCellSet(), ds.GetCoordinateSystem().GetData(), pcoords, wcoords);
}
template <vtkm::IdComponent DIMENSIONS, typename DeviceAdapter>
......
......@@ -177,13 +177,11 @@ struct EdgesExtracter : public vtkm::worklet::WorkletMapPointToCell
VTKM_CONT
template <typename CountArrayType, typename DeviceTag>
EdgesExtracter(const CountArrayType& counts, DeviceTag device)
: Scatter(counts, device)
static ScatterType MakeScatter(const CountArrayType& counts, DeviceTag device)
{
return ScatterType(counts, device);
}
VTKM_CONT ScatterType GetScatter() const { return this->Scatter; }
template <typename CellShapeTag, typename PointIndexVecType, typename EdgeIndexVecType>
VTKM_EXEC void operator()(CellShapeTag shape,
const PointIndexVecType& pointIndices,
......@@ -209,9 +207,6 @@ struct EdgesExtracter : public vtkm::worklet::WorkletMapPointToCell
edgeIndices[0] = p1 < p2 ? p1 : p2;
edgeIndices[1] = p1 < p2 ? p2 : p1;
}
private:
ScatterType Scatter;
}; // struct EdgesExtracter
#if defined(VTKM_MSVC)
......@@ -236,9 +231,8 @@ struct ExtractUniqueEdges
vtkm::cont::ArrayHandle<vtkm::IdComponent> counts;
vtkm::worklet::DispatcherMapTopology<EdgesCounter, DeviceTag>().Invoke(CellSet, counts);
EdgesExtracter extractWorklet(counts, DeviceTag());
vtkm::worklet::DispatcherMapTopology<EdgesExtracter, DeviceTag> extractDispatcher(
extractWorklet);
EdgesExtracter::MakeScatter(counts, DeviceTag()));
extractDispatcher.Invoke(CellSet, EdgeIndices);
vtkm::cont::DeviceAdapterAlgorithm<DeviceTag>::template Sort<vtkm::Id2>(EdgeIndices);
vtkm::cont::DeviceAdapterAlgorithm<DeviceTag>::template Unique<vtkm::Id2>(EdgeIndices);
......
......@@ -41,11 +41,24 @@ class DispatcherMapField
vtkm::worklet::internal::DispatcherBase<DispatcherMapField<WorkletType, Device>,
WorkletType,
vtkm::worklet::WorkletMapField>;
using ScatterType = typename Superclass::ScatterType;
public:
// If you get a compile error here about there being no appropriate constructor for ScatterType,
// then that probably means that the worklet you are trying to execute has defined a custom
// ScatterType and that you need to create one (because there is no default way to construct
// the scatter). By convention, worklets that define a custom scatter type usually provide a
// static method named MakeScatter that constructs a scatter object.
VTKM_CONT
DispatcherMapField(const WorkletType& worklet = WorkletType())
: Superclass(worklet)
DispatcherMapField(const WorkletType& worklet = WorkletType(),
const ScatterType& scatter = ScatterType())
: Superclass(worklet, scatter)
{
}
VTKM_CONT
DispatcherMapField(const ScatterType& scatter)
: Superclass(WorkletType(), scatter)
{
}
......
......@@ -42,11 +42,24 @@ class DispatcherMapTopology
vtkm::worklet::internal::DispatcherBase<DispatcherMapTopology<WorkletType, Device>,
WorkletType,
vtkm::worklet::detail::WorkletMapTopologyBase>;
using ScatterType = typename Superclass::ScatterType;
public:
// If you get a compile error here about there being no appropriate constructor for ScatterType,
// then that probably means that the worklet you are trying to execute has defined a custom
// ScatterType and that you need to create one (because there is no default way to construct
// the scatter). By convention, worklets that define a custom scatter type usually provide a
// static method named MakeScatter that constructs a scatter object.
VTKM_CONT
DispatcherMapTopology(const WorkletType& worklet = WorkletType())
: Superclass(worklet)
DispatcherMapTopology(const WorkletType& worklet = WorkletType(),
const ScatterType& scatter = ScatterType())
: Superclass(worklet, scatter)
{
}
VTKM_CONT
DispatcherMapTopology(const ScatterType& scatter)
: Superclass(WorkletType(), scatter)
{
}
......
......@@ -43,11 +43,24 @@ class DispatcherPointNeighborhood
vtkm::worklet::internal::DispatcherBase<DispatcherPointNeighborhood<WorkletType, Device>,
WorkletType,
vtkm::worklet::WorkletPointNeighborhoodBase>;
using ScatterType = typename Superclass::ScatterType;
public:
// If you get a compile error here about there being no appropriate constructor for ScatterType,
// then that probably means that the worklet you are trying to execute has defined a custom
// ScatterType and that you need to create one (because there is no default way to construct
// the scatter). By convention, worklets that define a custom scatter type usually provide a
// static method named MakeScatter that constructs a scatter object.
VTKM_CONT
DispatcherPointNeighborhood(const WorkletType& worklet = WorkletType())
: Superclass(worklet)
DispatcherPointNeighborhood(const WorkletType& worklet = WorkletType(),
const ScatterType& scatter = ScatterType())
: Superclass(worklet, scatter)
{
}
VTKM_CONT
DispatcherPointNeighborhood(const ScatterType& scatter)
: Superclass(WorkletType(), scatter)
{
}
......
......@@ -43,11 +43,24 @@ class DispatcherReduceByKey
vtkm::worklet::internal::DispatcherBase<DispatcherReduceByKey<WorkletType, Device>,
WorkletType,
vtkm::worklet::WorkletReduceByKey>;
using ScatterType = typename Superclass::ScatterType;
public:
// If you get a compile error here about there being no appropriate constructor for ScatterType,
// then that probably means that the worklet you are trying to execute has defined a custom
// ScatterType and that you need to create one (because there is no default way to construct
// the scatter). By convention, worklets that define a custom scatter type usually provide a
// static method named MakeScatter that constructs a scatter object.
VTKM_CONT
DispatcherReduceByKey(const WorkletType& worklet = WorkletType())
: Superclass(worklet)
DispatcherReduceByKey(const WorkletType& worklet = WorkletType(),
const ScatterType& scatter = ScatterType())
: Superclass(worklet, scatter)
{
}
VTKM_CONT
DispatcherReduceByKey(const ScatterType& scatter)
: Superclass(WorkletType(), scatter)
{
}
......
......@@ -173,11 +173,25 @@ class DispatcherStreamingMapField
vtkm::worklet::internal::DispatcherBase<DispatcherStreamingMapField<WorkletType, Device>,
WorkletType,
vtkm::worklet::WorkletMapField>;
using ScatterType = typename Superclass::ScatterType;
public:
// If you get a compile error here about there being no appropriate constructor for ScatterType,
// then that probably means that the worklet you are trying to execute has defined a custom
// ScatterType and that you need to create one (because there is no default way to construct
// the scatter). By convention, worklets that define a custom scatter type usually provide a
// static method named MakeScatter that constructs a scatter object.
VTKM_CONT
DispatcherStreamingMapField(const WorkletType& worklet = WorkletType())
: Superclass(worklet)
DispatcherStreamingMapField(const WorkletType& worklet = WorkletType(),
const ScatterType& scatter = ScatterType())
: Superclass(worklet, scatter)
, NumberOfBlocks(1)
{
}
VTKM_CONT
DispatcherStreamingMapField(const ScatterType& scatter)
: Superclass(WorkletType(), scatter)
, NumberOfBlocks(1)
{
}
......@@ -194,7 +208,7 @@ public:
this->InvokeTransportParameters(invocation,
numInstances,
globalIndexOffset,
this->Worklet.GetScatter().GetOutputRange(numInstances),
this->Scatter.GetOutputRange(numInstances),
device);
}
......@@ -275,10 +289,9 @@ private:
TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange));
// Get the arrays used for scattering input to output.
typename WorkletType::ScatterType::OutputToInputMapType outputToInputMap =
this->Worklet.GetScatter().GetOutputToInputMap(inputRange);
typename WorkletType::ScatterType::VisitArrayType visitArray =
this->Worklet.GetScatter().GetVisitArray(inputRange);
typename ScatterType::OutputToInputMapType outputToInputMap =
this->Scatter.GetOutputToInputMap(inputRange);
typename ScatterType::VisitArrayType visitArray = this->Scatter.GetVisitArray(inputRange);
// Replace the parameters in the invocation with the execution object and
// pass to next step of Invoke. Also add the scatter information.
......
......@@ -141,28 +141,18 @@ struct ExternalFaces
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT BuildConnectivityStructured(const vtkm::Vec<vtkm::Float64, 3>& min_point,
const vtkm::Vec<vtkm::Float64, 3>& max_point,
const CountArrayType& countArray,
Device)
: MinPoint(min_point)
, MaxPoint(max_point)
, Scatter(countArray, Device())
VTKM_CONT static ScatterType MakeScatter(const CountArrayType& countArray, Device)
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
return ScatterType(countArray, Device());
}
VTKM_CONT
BuildConnectivityStructured(const vtkm::Vec<vtkm::Float64, 3>& min_point,
const vtkm::Vec<vtkm::Float64, 3>& max_point,
const ScatterType& scatter)
const vtkm::Vec<vtkm::Float64, 3>& max_point)
: MinPoint(min_point)
, MaxPoint(max_point)
, Scatter(scatter)
{
}
......@@ -325,7 +315,6 @@ struct ExternalFaces
private:
vtkm::Vec<vtkm::Float64, 3> MinPoint;
vtkm::Vec<vtkm::Float64, 3> MaxPoint;
ScatterType Scatter;
};
//Worklet that returns the number of faces for each cell/shape
......@@ -356,22 +345,6 @@ struct ExternalFaces
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT FaceHash(const CountArrayType& countArray, Device)
: Scatter(countArray, Device())
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
}
VTKM_CONT
FaceHash(const ScatterType& scatter)
: Scatter(scatter)
{
}
template <typename CellShapeTag, typename CellNodeVecType>
VTKM_EXEC void operator()(vtkm::HashType& faceHash,
vtkm::Id& cellIndex,
......@@ -386,9 +359,6 @@ struct ExternalFaces
cellIndex = inputIndex;
faceIndex = visitIndex;
}
private:
ScatterType Scatter;
};
// Worklet that identifies the number of cells written out per face.
......@@ -525,20 +495,11 @@ public:
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT NumPointsPerFace(const CountArrayType& countArray, Device)
: Scatter(countArray, Device())
VTKM_CONT static ScatterType MakeScatter(const CountArrayType& countArray, Device)
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
}
VTKM_CONT
NumPointsPerFace(const ScatterType& scatter)
: Scatter(scatter)
{
return ScatterType(countArray, Device());
}
template <typename CellSetType, typename OriginCellsType, typename OriginFacesType>
......@@ -553,9 +514,6 @@ public:
return vtkm::exec::CellFaceNumberOfPoints(
originFaces[myIndex], cellSet.GetCellShape(originCells[myIndex]), *this);
}
private:
ScatterType Scatter;
};
// Worklet that returns the shape and connectivity for each external face
......@@ -574,22 +532,6 @@ public:
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT BuildConnectivity(const CountArrayType& countArray, Device)
: Scatter(countArray, Device())
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
}
VTKM_CONT
BuildConnectivity(const ScatterType& scatter)
: Scatter(scatter)
{
}
template <typename CellSetType,
typename OriginCellsType,
typename OriginFacesType,
......@@ -624,9 +566,6 @@ public:
inCellIndices[vtkm::exec::CellFaceLocalIndex(facePointIndex, myFace, shapeIn, *this)];
}
}
private:
ScatterType Scatter;
};
class IsPolyDataCell : public vtkm::worklet::WorkletMapPointToCell
......@@ -648,29 +587,11 @@ public:
public:
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT CountPolyDataCellPoints(const CountArrayType& countArray, Device)
: Scatter(countArray, Device())
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
}
VTKM_CONT
CountPolyDataCellPoints(const ScatterType& scatter)
: Scatter(scatter)
{
}
typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numPoints);
typedef _2 ExecutionSignature(PointCount);
using InputDomain = _1;
VTKM_EXEC vtkm::Id operator()(vtkm::Id count) const { return count; }
private:
ScatterType Scatter;
};
class PassPolyDataCells : public vtkm::worklet::WorkletMapPointToCell
......@@ -678,22 +599,6 @@ public:
public:
using ScatterType = vtkm::worklet::ScatterCounting;
VTKM_CONT
ScatterType GetScatter() const { return this->Scatter; }
template <typename CountArrayType, typename Device>
VTKM_CONT PassPolyDataCells(const CountArrayType& countArray, Device)
: Scatter(countArray, Device())
{
VTKM_IS_ARRAY_HANDLE(CountArrayType);
}
VTKM_CONT
PassPolyDataCells(const ScatterType& scatter)
: Scatter(scatter)
{
}
typedef void ControlSignature(CellSetIn inputTopology,
FieldOut<> shapes,
FieldOut<> pointIndices,
......@@ -718,9 +623,6 @@ public:
outPoints[pointIndex] = inPoints[pointIndex];
}
}
private:
ScatterType Scatter;
};
template <typename T>
......@@ -843,7 +745,8 @@ public:
using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>;
vtkm::Id numberOfExternalFaces = DeviceAlgorithms::Reduce(numExternalFaces, 0, vtkm::Sum());
vtkm::worklet::ScatterCounting scatterCellToExternalFace(numExternalFaces, DeviceAdapter());
auto scatterCellToExternalFace =
BuildConnectivityStructured::MakeScatter(numExternalFaces, DeviceAdapter());
// Maps output cells to input cells. Store this for cell field mapping.
this->CellIdMap = scatterCellToExternalFace.GetOutputToInputMap();
......@@ -859,8 +762,8 @@ public:
faceConnectivity.Allocate(connectivitySize);
vtkm::worklet::DispatcherMapTopology<BuildConnectivityStructured, DeviceAdapter>
buildConnectivityStructuredDispatcher(
(BuildConnectivityStructured(MinPoint, MaxPoint, scatterCellToExternalFace)));
buildConnectivityStructuredDispatcher(BuildConnectivityStructured(MinPoint, MaxPoint),
scatterCellToExternalFace);
buildConnectivityStructuredDispatcher.Invoke(
inCellSet,
......@@ -921,7 +824,7 @@ public:
if (scatterPolyDataCells.GetOutputRange(inCellSet.GetNumberOfCells()) != 0)
{
vtkm::worklet::DispatcherMapTopology<CountPolyDataCellPoints, DeviceAdapter>
countPolyDataCellPointsDispatcher((CountPolyDataCellPoints(scatterPolyDataCells)));
countPolyDataCellPointsDispatcher(scatterPolyDataCells);
countPolyDataCellPointsDispatcher.Invoke(inCellSet, polyDataPointCount);
......@@ -929,7 +832,7 @@ public:
polyDataPointCount, polyDataOffsets, polyDataConnectivitySize);
vtkm::worklet::DispatcherMapTopology<PassPolyDataCells, DeviceAdapter>
passPolyDataCellsDispatcher((PassPolyDataCells(scatterPolyDataCells)));
passPolyDataCellsDispatcher(scatterPolyDataCells);
polyDataConnectivity.Allocate(polyDataConnectivitySize);
......@@ -967,7 +870,7 @@ public:
vtkm::cont::ArrayHandle<vtkm::Id> originCells;
vtkm::cont::ArrayHandle<vtkm::IdComponent> originFaces;
vtkm::worklet::DispatcherMapTopology<FaceHash, DeviceAdapter> faceHashDispatcher(
(FaceHash(scatterCellToFace)));
scatterCellToFace);
faceHashDispatcher.Invoke(inCellSet, faceHashes, originCells, originFaces);
......@@ -978,7 +881,7 @@ public:
faceCountDispatcher.Invoke(faceKeys, inCellSet, originCells, originFaces, faceOutputCount);
vtkm::worklet::ScatterCounting scatterCullInternalFaces(faceOutputCount, DeviceAdapter());
auto scatterCullInternalFaces = NumPointsPerFace::MakeScatter(faceOutputCount, DeviceAdapter());
PointCountArrayType facePointCount;
vtkm::worklet::DispatcherReduceByKey<NumPointsPerFace, DeviceAdapter> pointsPerFaceDispatcher(
......
......@@ -198,8 +198,7 @@ public:
vtkm::cont::ArrayHandle<vtkm::UInt8>& interpContourId,
const vtkm::cont::ArrayHandle<vtkm::IdComponent>& edgeTable,
const vtkm::cont::ArrayHandle<vtkm::IdComponent>& numTriTable,
const vtkm::cont::ArrayHandle<vtkm::IdComponent>& triTable,
const vtkm::worklet::ScatterCounting& scatter)
const vtkm::cont::ArrayHandle<vtkm::IdComponent>& triTable)
: InterpWeightsPortal(interpWeights.PrepareForOutput(3 * size, DeviceAdapter()))
, InterpIdPortal(interpIds.PrepareForOutput(3 * size, DeviceAdapter()))
, InterpCellIdPortal(interpCellIds.PrepareForOutput(3 * size, DeviceAdapter()))
......@@ -207,7 +206,6 @@ public:
, EdgeTable(edgeTable.PrepareForInput(DeviceAdapter()))
, NumTriTable(numTriTable.PrepareForInput(DeviceAdapter()))
, TriTable(triTable.PrepareForInput(DeviceAdapter()))
, Scatter(scatter)
{
// Interp needs to be 3 times longer than size as they are per point of the
// output triangle
......@@ -219,7 +217,6 @@ public:
typename PortalTypes<vtkm::IdComponent>::PortalConst EdgeTable;
typename PortalTypes<vtkm::IdComponent>::PortalConst NumTriTable;
typename PortalTypes<vtkm::IdComponent>::PortalConst TriTable;
vtkm::worklet::ScatterCounting Scatter;
};
/// \brief Compute the weights for each edge that is used to generate
......@@ -235,6 +232,12 @@ public:
using ScatterType = vtkm::worklet::ScatterCounting;
template <typename ArrayHandleType>
VTKM_CONT static ScatterType MakeScatter(const ArrayHandleType& numOutputTrisPerCell)
{
return ScatterType(numOutputTrisPerCell, DeviceAdapter());
}
typedef void ControlSignature(
CellSetIn cellset, // Cell set
WholeArrayIn<ClassifyCellTagType> isoValues,
......@@ -349,9 +352,6 @@ public:
}
}
VTKM_CONT
ScatterType GetScatter() const { return this->MetaData.Scatter; }
private:
EdgeWeightGenerateMetaData<DeviceAdapter> MetaData;
......@@ -512,9 +512,10 @@ public:
using InputDomain = _1;
using ScatterType = vtkm::worklet::ScatterPermutation<typename PointIdsArray::StorageTag>;
NormalsWorkletPass1(const vtkm::cont::ArrayHandle<vtkm::Id2>& edges)
: Scatter(vtkm::cont::make_ArrayHandleTransform(edges, EdgeVertex<0>()))
VTKM_CONT
static ScatterType MakeScatter(const vtkm::cont::ArrayHandle<vtkm::Id2>& edges)
{
return ScatterType(vtkm::cont::make_ArrayHandleTransform(edges, EdgeVertex<0>()));
}
template <typename FromIndexType,
......@@ -563,11 +564,6 @@ public:
vtkm::worklet::gradient::StructuredPointGradient<T> gradient;
gradient(boundary, points, field, normal);
}
ScatterType GetScatter() const { return this->Scatter; }
private:
ScatterType Scatter;
};
class NormalsWorkletPass2 : public vtkm::worklet::WorkletMapCellToPoint
......@@ -590,9 +586,10 @@ public:
using InputDomain = _1;
using ScatterType = vtkm::worklet::ScatterPermutation<typename PointIdsArray::StorageTag>;
NormalsWorkletPass2(const vtkm::cont::ArrayHandle<vtkm::Id2>& edges)
: Scatter(vtkm::cont::make_ArrayHandleTransform(edges, EdgeVertex<1>()))
VTKM_CONT
static ScatterType MakeScatter(const vtkm::cont::ArrayHandle<vtkm::Id2>& edges)
{
return ScatterType(vtkm::cont::make_ArrayHandleTransform(edges, EdgeVertex<1>()));
}
template <typename FromIndexType,
......@@ -656,11 +653,6 @@ public:
auto weight = weights.Get(edgeId);
normal = vtkm::Normal(vtkm::Lerp(grad0, grad1, weight));
}
ScatterType GetScatter() const { return this->Scatter; }
private:
ScatterType Scatter;
};
template <typename NormalCType,
......@@ -685,12 +677,14 @@ struct GenerateNormalsDeduced
// The final normal is interpolated from the two gradient values and stored
// in the normals array.
//
NormalsWorkletPass1 pass1(*edges);
vtkm::worklet::DispatcherMapTopology<NormalsWorkletPass1>(pass1).Invoke(
vtkm::worklet::DispatcherMapTopology<NormalsWorkletPass1> dispatcherNormalsPass1(
NormalsWorkletPass1::MakeScatter(*edges));
dispatcherNormalsPass1.Invoke(
*cellset, *cellset, coordinates, marchingcubes::make_ScalarField(*field), *normals);
NormalsWorkletPass2 pass2(*edges);
vtkm::worklet::DispatcherMapTopology<NormalsWorkletPass2>(pass2).Invoke(
vtkm::worklet::DispatcherMapTopology<NormalsWorkletPass2> dispatcherNormalsPass2(
NormalsWorkletPass2::MakeScatter(*edges));
dispatcherNormalsPass2.Invoke(
*cellset, *cellset, coordinates, marchingcubes::make_ScalarField(*field), *weights, *normals);
}
};
......@@ -969,7 +963,8 @@ private:
vtkm::cont::ArrayHandle<vtkm::UInt8> contourIds;