46 #ifndef vtk_m_worklet_contourtree_distributed_hierarchical_augmenter_set_first_attachment_point_in_round_worklet_h
47 #define vtk_m_worklet_contourtree_distributed_hierarchical_augmenter_set_first_attachment_point_in_round_worklet_h
56 namespace contourtree_distributed
58 namespace hierarchical_augmenter
70 WholeArrayIn superparentRounds,
71 WholeArrayInOut firstAttachmentPointInRound
81 template <
typename InFieldPortalType,
typename InOutFieldPortalType>
83 const InFieldPortalType& attachmentIdsPortal,
84 const InFieldPortalType& superparentRoundsPortal,
85 const InOutFieldPortalType& firstAttachmentPointInRoundPortal)
const
89 vtkm::Id attachmentPointId = attachmentIdsPortal.Get(attachmentPoint);
91 if (attachmentPoint == 0)
93 firstAttachmentPointInRoundPortal.Set(superparentRoundsPortal.Get(attachmentPointId),
100 vtkm::Id previousAttachmentPointId = attachmentIdsPortal.Get(attachmentPoint - 1);
102 vtkm::Id superparentRound = superparentRoundsPortal.Get(attachmentPointId);
103 vtkm::Id previousSuperparentRound = superparentRoundsPortal.Get(previousAttachmentPointId);
105 if (superparentRound != previousSuperparentRound)
107 firstAttachmentPointInRoundPortal.Set(superparentRound, attachmentPoint);