53 #ifndef vtk_m_worklet_contourtree_distributed_tree_grafter_copy_new_supernodes_set_superchildren_worklet_h
54 #define vtk_m_worklet_contourtree_distributed_tree_grafter_copy_new_supernodes_set_superchildren_worklet_h
64 namespace contourtree_distributed
66 namespace tree_grafter
76 WholeArrayIn hierarchicalTreeSuperarcs,
77 WholeArrayIn hierarchicalTreeHyperparents,
78 WholeArrayIn hierarchicalTreeHypernodes,
79 WholeArrayOut hierarchicalTreeSuperchildren
93 template <
typename InFieldPortalType,
typename OutFieldPortalType>
95 const InFieldPortalType& hierarchicalTreeSuperarcsPortal,
96 const InFieldPortalType& hierarchicalTreeHyperparentsPortal,
97 const InFieldPortalType& hierarchicalTreeHypernodesPortal,
98 const OutFieldPortalType hierarchicalTreeSuperchildrenPortal
108 hierarchicalTreeSuperarcsPortal.Get(newSupernode)))
113 vtkm::Id hyperparent = hierarchicalTreeHyperparentsPortal.Get(newSupernode);
119 hierarchicalTreeSuperchildrenPortal.Set(hyperparent,
121 hierarchicalTreeHypernodesPortal.Get(hyperparent));
123 else if (hyperparent != hierarchicalTreeHyperparentsPortal.Get(newSupernode + 1))
125 hierarchicalTreeSuperchildrenPortal.Set(
126 hyperparent, newSupernode + 1 - hierarchicalTreeHypernodesPortal.Get(hyperparent));