Clean-up. Move functor class outside template.

This commit is contained in:
Gunther H. Weber 2021-06-23 19:39:37 -07:00
parent 51f737041b
commit dffb7afbcd

@ -592,9 +592,10 @@ contourtree_mesh_inc_ns::MeshStructureContourTreeMesh inline ContourTreeMesh<
token);
}
struct NotNoSuchElement
// Helper functor, basically negates criterion for CopyIf
struct IsUnique
{
VTKM_EXEC_CONT bool operator()(vtkm::Id x) const { return x != NO_SUCH_ELEMENT; }
VTKM_EXEC_CONT bool operator()(vtkm::IdComponent isInOther) const { return isInOther == 0; }
};
/*
@ -762,12 +763,6 @@ inline void ContourTreeMesh<FieldType>::MergeWith(ContourTreeMesh<FieldType>& ot
vtkm::cont::ArrayHandleIndex indicesThis(thisToCombinedSortOrder.GetNumberOfValues());
vtkm::cont::ArrayHandleIndex indicesOther(otherToCombinedSortOrder.GetNumberOfValues());
// ... helper function, basically negates criterion for CopyIf
struct IsUnique
{
VTKM_EXEC_CONT bool operator()(vtkm::IdComponent isInOther) const { return isInOther == 0; }
};
IdArrayType indicesThisUnique, indicesThisDuplicate;
vtkm::cont::Algorithm::CopyIf(
indicesThis, thisToCombinedSortOrderIsDuplicate, indicesThisUnique, IsUnique{});