53 #ifndef vtk_m_worklet_contourtree_distributed_tree_grafter_get_hierarchical_ids_worklet_h
54 #define vtk_m_worklet_contourtree_distributed_tree_grafter_get_hierarchical_ids_worklet_h
63 namespace contourtree_distributed
65 namespace tree_grafter
79 WholeArrayIn sortOrder,
80 WholeArrayIn dataValue,
84 WholeArrayIn superparents,
85 WholeArrayIn hyperparents,
86 WholeArrayIn regular2Supernode,
87 WholeArrayIn super2Hypernode,
89 ExecObject findRegularByGlobal,
90 ExecObject findSuperArcForUnknownNode,
104 void(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18);
112 template <
typename InFieldPortalType,
113 typename SortOrderPortalType,
114 typename InFieldDataPortalType,
115 typename FindRegularExecType,
116 typename FindSuperExecType>
121 supernodeGlobalIdVal,
122 const SortOrderPortalType&
124 const InFieldDataPortalType& dataValues,
128 const InFieldPortalType& superparents,
129 const InFieldPortalType& hyperparents,
130 const InFieldPortalType& regular2Supernode,
131 const InFieldPortalType& super2Hypernode,
132 const FindRegularExecType& findRegularByGlobal,
133 const FindSuperExecType& findSuperArcForUnknownNode,
138 vtkm::Id& hierarchicalHyperparent)
const
143 vtkm::Id regularId = findRegularByGlobal.FindRegularByGlobal(supernodeGlobalIdVal);
146 hierarchicalRegularId = regularId;
162 vtkm::Id oldRegularId = sortOrder.Get(oldSortId);
163 auto dataValue = dataValues.Get(oldRegularId);
165 vtkm::Id upHierarchicalId = findRegularByGlobal.FindRegularByGlobal(upGlobalId);
167 vtkm::Id dnHierarchicalId = findRegularByGlobal.FindRegularByGlobal(dnGlobalId);
169 vtkm::Id superparentInHierarchy = findSuperArcForUnknownNode.FindSuperArcForUnknownNode(
170 supernodeGlobalIdVal, dataValue, upHierarchicalId, dnHierarchicalId);
171 hierarchicalSuperparent = superparentInHierarchy;
172 hierarchicalHyperparent = hyperparents.Get(superparentInHierarchy);
177 vtkm::Id supernodeId = regular2Supernode.Get(regularId);
178 vtkm::Id superparent = superparents.Get(regularId);
194 hierarchicalSuperparent = hierSuperparent;
195 hierarchicalHyperparent = hyperparents.Get(hierSuperparent);
200 hierarchicalSuperId = supernodeId;
203 hierarchicalSuperparent = superparent;
204 hierarchicalHyperparent = hyperparents.Get(supernodeId);
207 hierarchicalHyperId = super2Hypernode.Get(supernodeId);