document why a .ResetCellSetList is necessary

This commit is contained in:
Li-Ta Lo 2022-01-18 08:47:14 -07:00 committed by Kenneth Moreland
parent ced89bb396
commit 61e2a620a9

@ -83,7 +83,10 @@ vtkm::cont::DataSet Threshold::DoExecute(const vtkm::cont::DataSet& input)
vtkm::cont::UnknownCellSet cellOut;
auto ResolveArrayType = [&, this](const auto& concrete) {
// TODO: document the reason a .ResetCellSetList is needed here.
// Note: there are two overloads of .Run, the first one taking an UncertainCellSet, which is
// the desired entry point in the following call. The other is a function template on the input
// CellSet. Without the call to .ResetCellSetList to turn an UnknownCellSet to an UncertainCellSet,
// the compiler will pick the function template (i.e. wrong overload).
cellOut = worklet.Run(cells.ResetCellSetList<VTKM_DEFAULT_CELL_SET_LIST>(),
concrete,
field.GetAssociation(),