Go to the documentation of this file.
53 #ifndef vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_contour_tree_node_comparator_h
54 #define vtk_m_worklet_contourtree_augmented_contourtree_maker_inc_contour_tree_node_comparator_h
64 namespace contourtree_augmented
66 namespace contourtree_maker_inc
95 vtkm::Id leftSuperparent = this->SuperparentsPortal.Get(leftNode);
96 vtkm::Id rightSuperparent = this->SuperparentsPortal.Get(rightNode);
97 if (leftSuperparent < rightSuperparent)
99 else if (leftSuperparent > rightSuperparent)
104 bool isAscendingSuperarc =
IsAscending(this->SuperarcsPortal.Get(leftSuperparent));
105 if (leftNode < rightNode)
106 return isAscendingSuperarc;
107 else if (leftNode > rightNode)
108 return !isAscendingSuperarc;
VTKM_EXEC_CONT bool IsAscending(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:121
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
VTKM_CONT ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token) const
Prepares this array to be used as an input to an operation in the execution environment.
Definition: ArrayHandle.h:574
IdArrayType Superparents
Definition: ContourTreeNodeComparator.h:132
VTKM_CONT ContourTreeNodeComparatorImpl PrepareForExecution(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: ContourTreeNodeComparator.h:125
VTKM_CONT ContourTreeNodeComparator(const IdArrayType &superparents, const IdArrayType &superarcs)
Definition: ContourTreeNodeComparator.h:119
IdPortalType SuperparentsPortal
Definition: ContourTreeNodeComparator.h:76
typename StorageType::ReadPortalType ReadPortalType
Definition: ArrayHandle.h:294
Definition: ContourTreeNodeComparator.h:114
IdArrayType Superarcs
Definition: ContourTreeNodeComparator.h:133
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
A token to hold the scope of an ArrayHandle or other object.
Definition: Token.h:35
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::cont::ArrayHandle< vtkm::Id >::ReadPortalType IdPortalType
Definition: ContourTreeNodeComparator.h:74
VTKM_CONT ContourTreeNodeComparatorImpl(const IdArrayType &superparents, const IdArrayType &superarcs, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token &token)
Definition: ContourTreeNodeComparator.h:81
Base ExecutionObjectBase for execution objects to inherit from so that you can use an arbitrary objec...
Definition: ExecutionObjectBase.h:31
Definition: DeviceAdapterTag.h:52
IdPortalType SuperarcsPortal
Definition: ContourTreeNodeComparator.h:77
VTKM_EXEC bool operator()(const vtkm::Id &leftNode, const vtkm::Id &rightNode) const
Definition: ContourTreeNodeComparator.h:92
Definition: ContourTreeNodeComparator.h:71