VTK-m  2.0
filter/scalar_topology/worklet/contourtree_augmented/Types.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //============================================================================
10 // Copyright (c) 2018, The Regents of the University of California, through
11 // Lawrence Berkeley National Laboratory (subject to receipt of any required approvals
12 // from the U.S. Dept. of Energy). All rights reserved.
13 //
14 // Redistribution and use in source and binary forms, with or without modification,
15 // are permitted provided that the following conditions are met:
16 //
17 // (1) Redistributions of source code must retain the above copyright notice, this
18 // list of conditions and the following disclaimer.
19 //
20 // (2) Redistributions in binary form must reproduce the above copyright notice,
21 // this list of conditions and the following disclaimer in the documentation
22 // and/or other materials provided with the distribution.
23 //
24 // (3) Neither the name of the University of California, Lawrence Berkeley National
25 // Laboratory, U.S. Dept. of Energy nor the names of its contributors may be
26 // used to endorse or promote products derived from this software without
27 // specific prior written permission.
28 //
29 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
30 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
31 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 // IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
33 // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
35 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
36 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
37 // OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
38 // OF THE POSSIBILITY OF SUCH DAMAGE.
39 //
40 //=============================================================================
41 //
42 // This code is an extension of the algorithm presented in the paper:
43 // Parallel Peak Pruning for Scalable SMP Contour Tree Computation.
44 // Hamish Carr, Gunther Weber, Christopher Sewell, and James Ahrens.
45 // Proceedings of the IEEE Symposium on Large Data Analysis and Visualization
46 // (LDAV), October 2016, Baltimore, Maryland.
47 //
48 // The PPP2 algorithm and software were jointly developed by
49 // Hamish Carr (University of Leeds), Gunther H. Weber (LBNL), and
50 // Oliver Ruebel (LBNL)
51 //==============================================================================
52 
53 
54 #ifndef vtk_m_worklet_contourtree_augmented_types_h
55 #define vtk_m_worklet_contourtree_augmented_types_h
56 
57 #include <vtkm/Assert.h>
58 #include <vtkm/Types.h>
59 #include <vtkm/cont/Algorithm.h>
60 #include <vtkm/cont/ArrayHandle.h>
63 
64 namespace vtkm
65 {
66 namespace worklet
67 {
68 namespace contourtree_augmented
69 {
70 
71 // constexpr for bit flags
72 // clang-format off
73 constexpr vtkm::Id NO_SUCH_ELEMENT = std::numeric_limits<vtkm::Id>::min();
74 constexpr vtkm::Id TERMINAL_ELEMENT = std::numeric_limits<vtkm::Id>::max() / 2 + 1; //0x40000000 || 0x4000000000000000
75 constexpr vtkm::Id IS_SUPERNODE = std::numeric_limits<vtkm::Id>::max() / 4 + 1; //0x20000000 || 0x2000000000000000
76 constexpr vtkm::Id IS_HYPERNODE = std::numeric_limits<vtkm::Id>::max() / 8 + 1; //0x10000000 || 0x1000000000000000
77 constexpr vtkm::Id IS_ASCENDING = std::numeric_limits<vtkm::Id>::max() / 16 + 1; //0x08000000 || 0x0800000000000000
78 constexpr vtkm::Id INDEX_MASK = std::numeric_limits<vtkm::Id>::max() / 16; //0x07FFFFFF || 0x07FFFFFFFFFFFFFF
79 constexpr vtkm::Id CV_OTHER_FLAG = std::numeric_limits<vtkm::Id>::max() / 8 + 1; //0x10000000 || 0x1000000000000000
80 constexpr vtkm::Id ELEMENT_EXISTS = std::numeric_limits<vtkm::Id>::max() / 4 + 1; //0x20000000 || 0x2000000000000000 , same as IS_SUPERNODE
81 
82 // flags for testing regular vertices
83 constexpr vtkm::Id IS_LOWER_LEAF = static_cast<vtkm::Id>(0);
84 constexpr vtkm::Id IS_UPPER_LEAF = static_cast<vtkm::Id>(1);
85 constexpr vtkm::Id IS_REGULAR = static_cast<vtkm::Id>(2);
86 constexpr vtkm::Id IS_SADDLE = static_cast<vtkm::Id>(3);
87 constexpr vtkm::Id IS_ATTACHMENT = static_cast<vtkm::Id>(4);
88 
89 // clang-format on
91 
92 using EdgePair = vtkm::Pair<vtkm::Id, vtkm::Id>; // here EdgePair.first=low and EdgePair.second=high
93 using EdgePairArray = vtkm::cont::ArrayHandle<EdgePair>; // Array of edge pairs
94 
95 // inline functions for retrieving flags or index
97 inline bool NoSuchElement(vtkm::Id flaggedIndex)
98 { // NoSuchElement()
99  return ((flaggedIndex & (vtkm::Id)NO_SUCH_ELEMENT) != 0);
100 } // NoSuchElement()
101 
103 inline bool IsTerminalElement(vtkm::Id flaggedIndex)
104 { // IsTerminalElement()
105  return ((flaggedIndex & TERMINAL_ELEMENT) != 0);
106 } // IsTerminalElement()
107 
109 inline bool IsSupernode(vtkm::Id flaggedIndex)
110 { // IsSupernode()
111  return ((flaggedIndex & IS_SUPERNODE) != 0);
112 } // IsSupernode()
113 
115 inline bool IsHypernode(vtkm::Id flaggedIndex)
116 { // IsHypernode()
117  return ((flaggedIndex & IS_HYPERNODE) != 0);
118 } // IsHypernode()
119 
121 inline bool IsAscending(vtkm::Id flaggedIndex)
122 { // IsAscending()
123  return ((flaggedIndex & IS_ASCENDING) != 0);
124 } // IsAscending()
125 
127 inline vtkm::Id MaskedIndex(vtkm::Id flaggedIndex)
128 { // MaskedIndex()
129  return (flaggedIndex & INDEX_MASK);
130 } // MaskedIndex()
131 
134 inline bool IsThis(vtkm::Id flaggedIndex)
135 { // IsThis
136  return ((flaggedIndex & CV_OTHER_FLAG) == 0);
137 } // IsThis
138 
139 // Helper function: Ensure no flags are set
141 inline bool NoFlagsSet(vtkm::Id flaggedIndex)
142 { // NoFlagsSet
143  return (flaggedIndex & ~INDEX_MASK) == 0;
144 } // NoFlagsSet
145 
146 
147 // Debug helper function: Assert that an index array has no element with any flags set
148 template <typename S>
150 {
151 #ifndef VTKM_NO_ASSERT
152  auto rp = ah.ReadPortal();
153  for (vtkm::Id i = 0; i < ah.GetNumberOfValues(); ++i)
154  {
155  VTKM_ASSERT(NoFlagsSet(rp.Get(i)));
156  }
157 #else
158  (void)ah;
159 #endif
160 }
161 
162 
164 VTKM_CONT
165 inline void IdArraySetValue(vtkm::Id index, vtkm::Id value, IdArrayType& arr)
166 { // IdArraySetValue
168  vtkm::cont::ArrayHandleConstant<vtkm::Id>(value, 1), 0, 1, arr, index);
169 } // IdArraySetValues
170 
171 
179 template <typename ValueType>
181  vtkm::Id newSize,
182  ValueType fillValue)
183 {
184  vtkm::Id oldSize = thearray.GetNumberOfValues();
185  // Simply return if the size of the array does not change
186  if (oldSize == newSize)
187  {
188  return;
189  }
190 
191  // Resize the array but keep the original values
192  thearray.Allocate(newSize, vtkm::CopyFlag::On);
193 
194  // Add the fill values to the array if we increased the size of the array
195  if (oldSize < newSize)
196  {
198  vtkm::cont::ArrayHandleConstant<ValueType>(fillValue, newSize - oldSize), // copy
199  0, // start copying from first index
200  newSize - oldSize, // num values to copy
201  thearray, // target array to copy to
202  oldSize // start copy to after oldSize
203  );
204  }
205 }
206 
207 template <typename T>
209 {
212 
214  vtkm::Id operator()(T x) const { return MaskedIndex(x); }
215 };
216 
217 inline std::string FlagString(vtkm::Id flaggedIndex)
218 { // FlagString()
219  std::string fString("");
220  fString += (NoSuchElement(flaggedIndex) ? "n" : ".");
221  fString += (IsTerminalElement(flaggedIndex) ? "t" : ".");
222  fString += (IsSupernode(flaggedIndex) ? "s" : ".");
223  fString += (IsHypernode(flaggedIndex) ? "h" : ".");
224  fString += (IsAscending(flaggedIndex) ? "a" : ".");
225  return fString;
226 } // FlagString()
227 
229 {
230 public:
231  // RegularNodeID (or sortIndex)
232  Id I;
233  // RegularNodeID (or sortIndex)
234  Id J;
235  // RegularNodeID (or sortIndex)
237  // RegularNodeID (or sortIndex)
239  bool UpEdge;
241 
242  VTKM_EXEC
243  bool operator<(const EdgeDataHeight& b) const
244  {
245  if (this->I == b.I)
246  {
247  if (this->UpEdge == b.UpEdge)
248  {
249  if (this->SubtreeHeight == b.SubtreeHeight)
250  {
251  if (this->SubtreeMin == b.SubtreeMin)
252  {
253  return this->SubtreeMax > b.SubtreeMax;
254  }
255  else
256  {
257  return this->SubtreeMin < b.SubtreeMin;
258  }
259  }
260  else
261  {
262  return this->SubtreeHeight > b.SubtreeHeight;
263  }
264  }
265  else
266  {
267  return this->UpEdge < b.UpEdge;
268  }
269  }
270  else
271  {
272  return this->I < b.I;
273  }
274  }
275 };
276 
278 {
279 public:
280  // RegularNodeID (or sortIndex)
281  Id I;
282  // RegularNodeID (or sortIndex)
283  Id J;
284  bool UpEdge;
286 
287  VTKM_EXEC
288  bool operator<(const EdgeDataVolume& b) const
289  {
290  if (this->I == b.I)
291  {
292  if (this->UpEdge == b.UpEdge)
293  {
294  if (this->SubtreeVolume == b.SubtreeVolume)
295  {
296  if (this->UpEdge == true)
297  {
298  return this->J > b.J;
299  }
300  else
301  {
302  return this->J < b.J;
303  }
304  }
305  else
306  {
307  return this->SubtreeVolume > b.SubtreeVolume;
308  }
309  }
310  else
311  {
312  return this->UpEdge < b.UpEdge;
313  }
314  }
315  else
316  {
317  return this->I < b.I;
318  }
319  }
320 };
321 
322 
330 {
335  void operator()(const vtkm::cont::CellSetStructured<2>& cells, vtkm::Id3& pointDimensions) const
336  {
337  vtkm::Id2 pointDimensions2D = cells.GetPointDimensions();
338  pointDimensions[0] = pointDimensions2D[0];
339  pointDimensions[1] = pointDimensions2D[1];
340  pointDimensions[2] = 1;
341  }
342  void operator()(const vtkm::cont::CellSetStructured<3>& cells, vtkm::Id3& pointDimensions) const
343  {
344  pointDimensions = cells.GetPointDimensions();
345  }
347 
349  template <typename T>
350  void operator()(const T&, vtkm::Id3&) const
351  {
352  throw vtkm::cont::ErrorBadValue("Expected 2D or 3D structured cell cet! ");
353  }
354 };
355 
356 
358 {
360  vtkm::Id3& pointDimensions,
361  vtkm::Id3& globalPointDimensions,
362  vtkm::Id3& globalPointIndexStart) const
363  {
364  vtkm::Id2 pointDimensions2D = cells.GetPointDimensions();
365  pointDimensions[0] = pointDimensions2D[0];
366  pointDimensions[1] = pointDimensions2D[1];
367  pointDimensions[2] = 1;
368  vtkm::Id2 globalPointDimensions2D = cells.GetGlobalPointDimensions();
369  globalPointDimensions[0] = globalPointDimensions2D[0];
370  globalPointDimensions[1] = globalPointDimensions2D[1];
371  globalPointDimensions[2] = 1;
372  vtkm::Id2 pointIndexStart2D = cells.GetGlobalPointIndexStart();
373  globalPointIndexStart[0] = pointIndexStart2D[0];
374  globalPointIndexStart[1] = pointIndexStart2D[1];
375  globalPointIndexStart[2] = 0;
376  }
378  vtkm::Id3& pointDimensions,
379  vtkm::Id3& globalPointDimensions,
380  vtkm::Id3& globalPointIndexStart) const
381  {
382  pointDimensions = cells.GetPointDimensions();
383  globalPointDimensions = cells.GetGlobalPointDimensions();
384  globalPointIndexStart = cells.GetGlobalPointIndexStart();
385  }
387 
388 
390  template <typename T>
391  void operator()(const T&, vtkm::Id3&, vtkm::Id3&, vtkm::Id3&) const
392  {
393  throw vtkm::cont::ErrorBadValue("Expected 2D or 3D structured cell cet! ");
394  }
395 };
396 
397 } // namespace contourtree_augmented
398 } // worklet
399 } // vtkm
400 
401 #endif
vtkm::worklet::contourtree_augmented::ELEMENT_EXISTS
constexpr vtkm::Id ELEMENT_EXISTS
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:80
vtkm::worklet::contourtree_augmented::EdgeDataHeight::J
Id J
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:234
vtkm::worklet::contourtree_augmented::INDEX_MASK
constexpr vtkm::Id INDEX_MASK
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:78
vtkm::cont::ArrayHandle::GetNumberOfValues
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
vtkm::worklet::contourtree_augmented::GetLocalAndGlobalPointDimensions::operator()
void operator()(const vtkm::cont::CellSetStructured< 3 > &cells, vtkm::Id3 &pointDimensions, vtkm::Id3 &globalPointDimensions, vtkm::Id3 &globalPointIndexStart) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:377
vtkm::cont::ArrayHandle< vtkm::Id >
vtkm::worklet::contourtree_augmented::IsAscending
VTKM_EXEC_CONT bool IsAscending(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:121
ArrayHandle.h
vtkm::worklet::contourtree_augmented::GetPointDimensions
Helper struct to collect sizing information from a dataset.
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:329
vtkm::worklet::contourtree_augmented::EdgeDataHeight
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:228
vtkm::worklet::contourtree_augmented::IsHypernode
VTKM_EXEC_CONT bool IsHypernode(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:115
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm::worklet::contourtree_augmented::IsTerminalElement
VTKM_EXEC_CONT bool IsTerminalElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:103
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
Types.h
vtkm::worklet::contourtree_augmented::ResizeVector
void ResizeVector(vtkm::cont::ArrayHandle< ValueType > &thearray, vtkm::Id newSize, ValueType fillValue)
Helper function used to resize a 1D ArrayHandle and initalize new values with a given fillValue.
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:180
VTKM_ASSERT
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::cont::ArrayHandle::Allocate
VTKM_CONT void Allocate(vtkm::Id numberOfValues, vtkm::CopyFlag preserve, vtkm::cont::Token &token) const
Allocates an array large enough to hold the given number of values.
Definition: ArrayHandle.h:465
vtkm::worklet::contourtree_augmented::FlagString
std::string FlagString(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:217
vtkm::worklet::contourtree_augmented::MaskedIndexFunctor::MaskedIndexFunctor
VTKM_EXEC_CONT MaskedIndexFunctor()
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:211
vtkm::cont::CellSetStructured
Definition: CastAndCall.h:32
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeMin
Id SubtreeMin
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:236
vtkm::worklet::contourtree_augmented::IS_SADDLE
constexpr vtkm::Id IS_SADDLE
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:86
vtkm::cont::Algorithm::CopySubRange
static VTKM_CONT bool CopySubRange(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, CIn > &input, vtkm::Id inputStartIndex, vtkm::Id numberOfElementsToCopy, vtkm::cont::ArrayHandle< U, COut > &output, vtkm::Id outputIndex=0)
Definition: Algorithm.h:472
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeMax
Id SubtreeMax
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:238
vtkm::worklet::contourtree_augmented::GetPointDimensions::operator()
void operator()(const vtkm::cont::CellSetStructured< 3 > &cells, vtkm::Id3 &pointDimensions) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:342
vtkm::worklet::contourtree_augmented::AssertArrayHandleNoFlagsSet
VTKM_CONT void AssertArrayHandleNoFlagsSet(const vtkm::cont::ArrayHandle< vtkm::Id, S > &ah)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:149
ArrayHandleConstant.h
vtkm::worklet::contourtree_augmented::TERMINAL_ELEMENT
constexpr vtkm::Id TERMINAL_ELEMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:74
vtkm::worklet::contourtree_augmented::EdgeDataVolume::UpEdge
bool UpEdge
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:284
Assert.h
vtkm::worklet::contourtree_augmented::MaskedIndex
VTKM_EXEC_CONT vtkm::Id MaskedIndex(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:127
vtkm::worklet::contourtree_augmented::GetLocalAndGlobalPointDimensions::operator()
void operator()(const T &, vtkm::Id3 &, vtkm::Id3 &, vtkm::Id3 &) const
Raise ErrorBadValue if the input cell set is not a vtkm::cont::CellSetStructured<2> or <3>
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:391
vtkm::worklet::contourtree_augmented::EdgeDataVolume::I
Id I
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:281
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeHeight
Float64 SubtreeHeight
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:240
vtkm::worklet::contourtree_augmented::GetLocalAndGlobalPointDimensions
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:357
vtkm::worklet::contourtree_augmented::GetPointDimensions::operator()
void operator()(const vtkm::cont::CellSetStructured< 2 > &cells, vtkm::Id3 &pointDimensions) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:335
vtkm::worklet::contourtree_augmented::NoSuchElement
VTKM_EXEC_CONT bool NoSuchElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:97
Algorithm.h
vtkm::worklet::contourtree_augmented::EdgeDataHeight::UpEdge
bool UpEdge
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:239
vtkm::worklet::contourtree_augmented::CV_OTHER_FLAG
constexpr vtkm::Id CV_OTHER_FLAG
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:79
vtkm::worklet::contourtree_augmented::EdgeDataVolume::operator<
VTKM_EXEC bool operator<(const EdgeDataVolume &b) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:288
vtkm::worklet::contourtree_augmented::EdgeDataVolume::J
Id J
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:283
vtkm::worklet::contourtree_augmented::EdgeDataHeight::operator<
VTKM_EXEC bool operator<(const EdgeDataHeight &b) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:243
vtkm::worklet::contourtree_augmented::IS_LOWER_LEAF
constexpr vtkm::Id IS_LOWER_LEAF
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:83
vtkm::worklet::contourtree_augmented::IS_SUPERNODE
constexpr vtkm::Id IS_SUPERNODE
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:75
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::worklet::contourtree_augmented::MaskedIndexFunctor
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:208
vtkm::worklet::contourtree_augmented::GetLocalAndGlobalPointDimensions::operator()
void operator()(const vtkm::cont::CellSetStructured< 2 > &cells, vtkm::Id3 &pointDimensions, vtkm::Id3 &globalPointDimensions, vtkm::Id3 &globalPointIndexStart) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:359
vtkm::worklet::contourtree_augmented::IS_ASCENDING
constexpr vtkm::Id IS_ASCENDING
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:77
vtkm::worklet::contourtree_augmented::IS_UPPER_LEAF
constexpr vtkm::Id IS_UPPER_LEAF
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:84
vtkm::cont::ArrayHandleConstant
An array handle with a constant value.
Definition: ArrayHandleConstant.h:63
vtkm::worklet::contourtree_augmented::IS_REGULAR
constexpr vtkm::Id IS_REGULAR
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:85
vtkm::CopyFlag::On
@ On
vtkm::worklet::contourtree_augmented::NoFlagsSet
VTKM_EXEC_CONT bool NoFlagsSet(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:141
vtkm::worklet::contourtree_augmented::IS_ATTACHMENT
constexpr vtkm::Id IS_ATTACHMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:87
vtkm::worklet::contourtree_augmented::IsThis
VTKM_EXEC_CONT bool IsThis(vtkm::Id flaggedIndex)
Used in the context of CombinedVector class used in ContourTreeMesh to merge the mesh of contour tree...
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:134
vtkm::worklet::contourtree_augmented::MaskedIndexFunctor::operator()
VTKM_EXEC_CONT vtkm::Id operator()(T x) const
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:214
vtkm::cont::CellSetStructured::GetPointDimensions
SchedulingRangeType GetPointDimensions() const
Definition: CellSetStructured.h:64
vtkm::Vec< vtkm::Id, 3 >
vtkm::cont::ErrorBadValue
This class is thrown when a VTKm function or method encounters an invalid value that inhibits progres...
Definition: ErrorBadValue.h:25
vtkm::cont::ArrayHandle::ReadPortal
VTKM_CONT ReadPortalType ReadPortal() const
Get an array portal that can be used in the control environment.
Definition: ArrayHandle.h:414
vtkm::worklet::contourtree_augmented::GetPointDimensions::operator()
void operator()(const T &, vtkm::Id3 &) const
Raise ErrorBadValue if the input cell set is not a vtkm::cont::CellSetStructured<2> or <3>
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:350
vtkm::Float64
double Float64
Definition: Types.h:155
CellSetStructured.h
vtkm::worklet::contourtree_augmented::IsSupernode
VTKM_EXEC_CONT bool IsSupernode(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:109
vtkm::worklet::contourtree_augmented::IdArraySetValue
VTKM_CONT void IdArraySetValue(vtkm::Id index, vtkm::Id value, IdArrayType &arr)
Helper function to set a single array valye with CopySubRange to avoid pulling the array to the contr...
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:165
vtkm::worklet::contourtree_augmented::EdgeDataVolume::SubtreeVolume
Id SubtreeVolume
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:285
vtkm::cont::CellSetStructured::GetGlobalPointIndexStart
SchedulingRangeType GetGlobalPointIndexStart() const
Definition: CellSetStructured.h:78
vtkm::Pair
A vtkm::Pair is essentially the same as an STL pair object except that the methods (constructors and ...
Definition: Pair.h:29
vtkm::worklet::contourtree_augmented::EdgeDataHeight::I
Id I
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:232
vtkm::cont::CellSetStructured::GetGlobalPointDimensions
SchedulingRangeType GetGlobalPointDimensions() const
Definition: CellSetStructured.h:66
vtkm::worklet::contourtree_augmented::NO_SUCH_ELEMENT
constexpr vtkm::Id NO_SUCH_ELEMENT
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:73
vtkm::worklet::contourtree_augmented::IS_HYPERNODE
constexpr vtkm::Id IS_HYPERNODE
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:76
vtkm::worklet::contourtree_augmented::EdgeDataVolume
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:277