53 #ifndef vtk_m_worklet_contourtree_augmented_active_graph_compact_active_edges_transfer_active_edges_h
54 #define vtk_m_worklet_contourtree_augmented_active_graph_compact_active_edges_transfer_active_edges_h
64 namespace contourtree_augmented
66 namespace active_graph_inc
74 WholeArrayIn newPosition,
75 WholeArrayIn newOutdegree,
76 WholeArrayIn activeEdges,
77 WholeArrayOut newActiveEdges,
78 WholeArrayInOut edgeFar,
79 WholeArrayInOut firstEdge,
80 WholeArrayInOut outdegree,
81 WholeArrayInOut hyperarcs);
89 template <
typename InFieldPortalType,
typename OutFieldPortalType,
typename InOutFieldPortalType>
92 const InFieldPortalType& newPositionPortal,
93 const InFieldPortalType& newOutdegreePortal,
94 const InFieldPortalType& activeEdgesPortal,
95 const OutFieldPortalType& newActiveEdgesPortal,
96 const InOutFieldPortalType& edgeFarPortal,
97 const InOutFieldPortalType& firstEdgePortal,
98 const InOutFieldPortalType& outdegreePortal,
99 const InOutFieldPortalType& hyperarcsPortal)
const
101 vtkm::Id edgeFirst = firstEdgePortal.Get(vertexId);
107 vtkm::Id whichEdge = newPositionPortal.Get(activeVertex);
110 firstEdgePortal.Set(vertexId, whichEdge);
113 vtkm::Id edgeLast = edgeFirst + outdegreePortal.Get(vertexId);
116 for (
vtkm::Id edge = edgeFirst; edge < edgeLast; edge++)
119 vtkm::Id edgeId = activeEdgesPortal.Get(edge);
122 vtkm::Id farEnd = edgeFarPortal.Get(edgeId);
125 vtkm::Id hyperFar = hyperarcsPortal.Get(farEnd);
131 if (farEnd != vertexId)
134 edgeFarPortal.Set(edgeId, farEnd);
137 newActiveEdgesPortal.Set(whichEdge++, edgeId);
141 hyperarcsPortal.Set(vertexId, farEnd | supernodeFlag);
146 outdegreePortal.Set(vertexId, newOutdegreePortal.Get(activeVertex));