mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-05 01:49:02 +00:00
Add TransferToSuperarc in contourtree types
This commit is contained in:
parent
22d394d846
commit
3f15b0f5be
@ -86,6 +86,13 @@ constexpr vtkm::Id IS_REGULAR = static_cast<vtkm::Id>(2);
|
||||
constexpr vtkm::Id IS_SADDLE = static_cast<vtkm::Id>(3);
|
||||
constexpr vtkm::Id IS_ATTACHMENT = static_cast<vtkm::Id>(4);
|
||||
|
||||
// TERMINAL_ELEMENT is primarily used for optimisation of memory access during pointer doubling operations
|
||||
// We now need to distinguish between a supernode and superarc when sorting by superarc(node) IDs
|
||||
// This only (at present) comes up when processing attachment points, which have null superarcs, so it
|
||||
// is reasonable to reuse TERMINAL_ELEMENT for this purpose. However, we give it a separate macro name with
|
||||
// the same value to aid comprehension
|
||||
constexpr vtkm::Id TRANSFER_TO_SUPERARC = TERMINAL_ELEMENT;
|
||||
|
||||
// clang-format on
|
||||
using IdArrayType = vtkm::cont::ArrayHandle<vtkm::Id>;
|
||||
|
||||
@ -144,6 +151,12 @@ inline bool NoFlagsSet(vtkm::Id flaggedIndex)
|
||||
return (flaggedIndex & ~INDEX_MASK) == 0;
|
||||
} // NoFlagsSet
|
||||
|
||||
// Helper function: to check that the TRANSFER_TO_SUPERARC flag is set
|
||||
VTKM_EXEC_CONT
|
||||
inline bool transferToSuperarc(vtkm::Id flaggedIndex)
|
||||
{ // transferToSuperarc()
|
||||
return ((flaggedIndex & TRANSFER_TO_SUPERARC) != 0);
|
||||
} // transferToSuperarc()
|
||||
|
||||
// Debug helper function: Assert that an index array has no element with any flags set
|
||||
template <typename S>
|
||||
|
Loading…
Reference in New Issue
Block a user