63 #ifndef vtk_m_worklet_contourtree_augmented_contourtree_mesh_inc_merge_sorted_lists_worklet_h 
   64 #define vtk_m_worklet_contourtree_augmented_contourtree_mesh_inc_merge_sorted_lists_worklet_h 
   73 namespace contourtree_augmented
 
   75 namespace mesh_dem_contourtree_mesh_inc
 
   82   template <
typename InGroupType, 
typename OutGroupType>
 
   84                             const InGroupType& list2,
 
   85                             OutGroupType& combinedList,
 
   88     VTKM_ASSERT(list1.GetNumberOfComponents() + list2.GetNumberOfComponents() <=
 
   89                 combinedList.GetNumberOfComponents());
 
   91     numberOfUniqueElements = 0;
 
   95     while (pos1 < list1.GetNumberOfComponents() && pos2 < list2.GetNumberOfComponents())
 
   97       if (list1[pos1] < list2[pos2])
 
   99         combinedList[numberOfUniqueElements++] = list1[pos1++];
 
  101       else if (list1[pos1] == list2[pos2])
 
  103         combinedList[numberOfUniqueElements++] = list1[pos1++];
 
  109         combinedList[numberOfUniqueElements++] = list2[pos2++];
 
  113     while (pos1 < list1.GetNumberOfComponents())
 
  115       combinedList[numberOfUniqueElements++] = list1[pos1++];
 
  117     while (pos2 < list2.GetNumberOfComponents())
 
  119       combinedList[numberOfUniqueElements++] = list2[pos2++];