74 #ifndef vtk_m_worklet_contourtree_active_edge_transferrer_h
75 #define vtk_m_worklet_contourtree_active_edge_transferrer_h
93 WholeArrayIn activeEdges,
94 WholeArrayIn prunesTo,
95 WholeArrayInOut firstEdge,
96 WholeArrayInOut outdegree,
97 WholeArrayInOut chainExtremum,
98 WholeArrayInOut edgeFar,
99 WholeArrayOut newActiveEdges);
112 template <
typename InFieldPortalType,
typename InOutFieldPortalType,
typename OutFieldPortalType>
116 const InFieldPortalType& activeEdges,
117 const InFieldPortalType& prunesTo,
118 const InOutFieldPortalType& firstEdge,
119 const InOutFieldPortalType& outdegree,
120 const InOutFieldPortalType& chainExtremum,
121 const InOutFieldPortalType& edgeFar,
122 const OutFieldPortalType& newActiveEdges)
const
125 vtkm::Id edgeFirst = firstEdge.Get(vertexID);
131 for (
vtkm::Id edge = 0; edge < outdegree.Get(vertexID); edge++)
134 vtkm::Id edgeIndex = edgeFirst + edge;
135 vtkm::Id edgeID = activeEdges.Get(edgeIndex);
138 vtkm::Id highEnd = prunesTo.Get(chainExtremum.Get(edgeFar.Get(edgeID)));
141 if (highEnd != vertexID)
144 edgeFar.Set(edgeID, highEnd);
147 newActiveEdges.Set(whichEdge++, edgeID);
150 chainExtremum.Set(vertexID, highEnd);
155 outdegree.Set(vertexID, newOutdegree);
156 firstEdge.Set(vertexID, newPosition);