53 #ifndef vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_compute_regular_structure_set_arcs_h 
   54 #define vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_compute_regular_structure_set_arcs_h 
   63 namespace contourtree_augmented
 
   65 namespace contourtree_maker_inc
 
   73                                 WholeArrayIn contourTreeSuperparents, 
 
   74                                 WholeArrayIn contourTreeSuperarcs,    
 
   75                                 WholeArrayIn contourTreeSupernodes,   
 
   76                                 WholeArrayOut contourTreeArcs);       
 
   89   template <
typename InFieldPortalType, 
typename OutFieldPortalType>
 
   92                             const InFieldPortalType& contourTreeSuperparentsPortal,
 
   93                             const InFieldPortalType& contourTreeSuperarcsPortal,
 
   94                             const InFieldPortalType& contourTreeSupernodesPortal,
 
   95                             const OutFieldPortalType& contourTreeArcsPortal)
 const 
   99     vtkm::Id nodeID = arcSorterPortal.Get(sortedNode);
 
  100     vtkm::Id superparent = contourTreeSuperparentsPortal.Get(nodeID);
 
  103     bool isLastOnSuperarc = 
false;
 
  106       isLastOnSuperarc = 
true;
 
  112         (superparent != contourTreeSuperparentsPortal.Get(arcSorterPortal.Get(sortedNode + 1)));
 
  116     if (isLastOnSuperarc)
 
  119       vtkm::Id superarcEnd = contourTreeSuperarcsPortal.Get(superparent);
 
  127         contourTreeArcsPortal.Set(nodeID,
 
  128                                   contourTreeSupernodesPortal.Get(
MaskedIndex(superarcEnd)) |
 
  134       vtkm::Id neighbour = arcSorterPortal.Get(sortedNode + 1);
 
  135       contourTreeArcsPortal.Set(nodeID, neighbour | ((neighbour > nodeID) ? 
IS_ASCENDING : 0));
 
  184                                 WholeArrayIn contourTreeSuperparents, 
 
  185                                 WholeArrayIn contourTreeSuperarcs,    
 
  186                                 WholeArrayIn contourTreeSupernodes,   
 
  187                                 WholeArrayIn toCompressed,            
 
  188                                 WholeArrayOut contourTreeArcs);       
 
  201   template <
typename InFieldPortalType, 
typename OutFieldPortalType>
 
  204                             const InFieldPortalType& contourTreeSuperparentsPortal,
 
  205                             const InFieldPortalType& contourTreeSuperarcsPortal,
 
  206                             const InFieldPortalType& contourTreeSupernodesPortal,
 
  207                             const InFieldPortalType& toCompressedPortal,
 
  208                             const OutFieldPortalType& contourTreeArcsPortal)
 const 
  212     vtkm::Id nodeID = arcSorterPortal.Get(sortedNode);
 
  213     vtkm::Id superparent = contourTreeSuperparentsPortal.Get(nodeID);
 
  216     bool isLastOnSuperarc = 
false;
 
  219       isLastOnSuperarc = 
true;
 
  225         (superparent != contourTreeSuperparentsPortal.Get(arcSorterPortal.Get(sortedNode + 1)));
 
  229     if (isLastOnSuperarc)
 
  232       vtkm::Id superarcEnd = contourTreeSuperarcsPortal.Get(superparent);
 
  240         contourTreeArcsPortal.Set(
 
  242           toCompressedPortal.Get(contourTreeSupernodesPortal.Get(
MaskedIndex(superarcEnd))) |
 
  248       vtkm::Id neighbour = arcSorterPortal.Get(sortedNode + 1);
 
  249       contourTreeArcsPortal.Set(nodeID, neighbour | ((neighbour > nodeID) ? 
IS_ASCENDING : 0));