VTK-m  2.0
HypersweepWorklets.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 #ifndef vtk_m_worklet_contourtree_augmented_process_contourtree_inc_hypersweep_worklets_h
54 #define vtk_m_worklet_contourtree_augmented_process_contourtree_inc_hypersweep_worklets_h
55 
56 #include <vtkm/BinaryOperators.h>
59 
63 namespace vtkm
64 {
65 namespace worklet
66 {
67 namespace contourtree_augmented
68 {
69 namespace process_contourtree_inc
70 {
71 
73 {
74 public:
75  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut);
76  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4);
77  using InputDomain = _3;
78 
80 
82  : TotalVolume(_totalVolume)
83  {
84  }
85 
86  template <typename IdWholeArrayInPortalType, typename EdgeWholeArrayInOutPortal>
87  VTKM_EXEC void operator()(const vtkm::Id currentId,
88  const IdWholeArrayInPortalType& hypersweepSumValuesPortal,
89  const IdWholeArrayInPortalType& superarcIntrinsicWeightPortal,
90  const IdWholeArrayInPortalType& superarcsPortal,
91  const EdgeWholeArrayInOutPortal& arcsPortal) const
92  {
93  Id i = currentId;
94  Id parent = MaskedIndex(superarcsPortal.Get(i));
95  if (parent == 0)
96  {
97  // We expect the root to the last vertex in the supernodes array
98  VTKM_ASSERT(i != superarcsPortal.GetNumberOfValues() - 2);
99  return;
100  }
101 
102  EdgeDataVolume edge;
103  edge.I = i;
104  edge.J = parent;
105  edge.UpEdge = IsAscending((superarcsPortal.Get(i)));
106  edge.SubtreeVolume = (this->TotalVolume - hypersweepSumValuesPortal.Get(i)) +
107  (superarcIntrinsicWeightPortal.Get(i) - 1);
108 
109  EdgeDataVolume oppositeEdge;
110  oppositeEdge.I = parent;
111  oppositeEdge.J = i;
112  oppositeEdge.UpEdge = !edge.UpEdge;
113  oppositeEdge.SubtreeVolume = hypersweepSumValuesPortal.Get(i);
114 
115  arcsPortal.Set(i * 2, edge);
116  arcsPortal.Set(i * 2 + 1, oppositeEdge);
117  }
118 };
119 
120 
122 {
123 public:
124  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut);
125  typedef void ExecutionSignature(InputIndex, _1, _2, _3);
126  using InputDomain = _1;
127 
129 
130  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
132  const vtkm::Id sortedNode,
133  const IdWholeArrayInPortalType& nodesPortal,
134  const IdWholeArrayInPortalType& superparentsPortal,
135  const IdWholeArrayInOutPortalType& firstVertexForSuperparentPortal) const
136  {
137  vtkm::Id sortID = nodesPortal.Get(sortedNode);
138  vtkm::Id superparent = superparentsPortal.Get(sortID);
139  if (sortedNode == 0)
140  {
141  firstVertexForSuperparentPortal.Set(superparent, sortedNode);
142  }
143  else if (superparent != superparentsPortal.Get(nodesPortal.Get(sortedNode - 1)))
144  {
145  firstVertexForSuperparentPortal.Set(superparent, sortedNode);
146  }
147  }
148 };
149 
151 {
152 public:
153  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut);
154  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4);
155  using InputDomain = _2;
156 
158 
159  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
160  VTKM_EXEC void operator()(const vtkm::Id superarc,
161  const IdWholeArrayInPortalType& arcsPortal,
162  const IdWholeArrayInPortalType& superarcsPortal,
163  const IdWholeArrayInPortalType& firstVertexForSuperparentPortal,
164  const IdWholeArrayInOutPortalType& superarcIntrinsicWeightPortal) const
165  {
166  if (superarc == superarcsPortal.GetNumberOfValues() - 1)
167  {
168  superarcIntrinsicWeightPortal.Set(
169  superarc, arcsPortal.GetNumberOfValues() - firstVertexForSuperparentPortal.Get(superarc));
170  }
171  else
172  {
173  superarcIntrinsicWeightPortal.Set(superarc,
174  firstVertexForSuperparentPortal.Get(superarc + 1) -
175  firstVertexForSuperparentPortal.Get(superarc));
176  }
177  }
178 };
179 
180 
182 {
183 public:
184  typedef void ControlSignature(WholeArrayIn, WholeArrayInOut);
185  typedef void ExecutionSignature(InputIndex, _1, _2);
186  using InputDomain = _1;
187 
189 
190  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
192  const vtkm::Id supernode,
193  const IdWholeArrayInPortalType& whenTransferredPortal,
194  const IdWholeArrayInOutPortalType& firstSupernodePerIterationPortal) const
195  {
196  vtkm::Id when = MaskedIndex(whenTransferredPortal.Get(supernode));
197  if (supernode == 0)
198  {
199  firstSupernodePerIterationPortal.Set(when, supernode);
200  }
201  else if (when != MaskedIndex(whenTransferredPortal.Get(supernode - 1)))
202  {
203  firstSupernodePerIterationPortal.Set(when, supernode);
204  }
205  }
206 };
207 
208 
209 
210 
211 template <typename Operator>
213 {
214 public:
215  typedef void ControlSignature(WholeArrayIn iterationHypernodes,
216  WholeArrayIn hypernodes,
217  WholeArrayIn hyperarcs,
218  WholeArrayIn howManyUsed,
219  AtomicArrayInOut minMaxIndex);
220 
221  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5);
222  using InputDomain = _1;
223 
224  Operator Op;
225 
226  // Default Constructor
228  : Op(_op)
229  {
230  }
231 
232  template <typename IdWholeArrayHandleCountingIn,
233  typename IdWholeArrayIn,
234  typename IdWholeArrayInOut>
235  VTKM_EXEC void operator()(const vtkm::Id hyperarcId,
236  const IdWholeArrayHandleCountingIn& iterationHypernodesPortal,
237  const IdWholeArrayIn& hypernodesPortal,
238  const IdWholeArrayIn& hyperarcsPortal,
239  const IdWholeArrayIn& howManyUsedPortal,
240  const IdWholeArrayInOut& minMaxIndexPortal) const
241  {
242  Id i = iterationHypernodesPortal.Get(hyperarcId);
243 
244  // If it's the last hyperacs (there's nothing to do it's just the root)
245  if (i >= hypernodesPortal.GetNumberOfValues() - 1)
246  {
247  return;
248  }
249 
250  //
251  // The value of the prefix scan is now accumulated in the last supernode of the hyperarc. Transfer is to the target
252  //
253  vtkm::Id lastSupernode = MaskedIndex(hypernodesPortal.Get(i + 1)) - howManyUsedPortal.Get(i);
254 
255  //
256  // Transfer the accumulated value to the target supernode
257  //
258  Id vertex = lastSupernode - 1;
259  Id parent = MaskedIndex(hyperarcsPortal.Get(i));
260 
261  Id vertexValue = minMaxIndexPortal.Get(vertex);
262  //Id parentValue = minMaxIndexPortal.Get(parent);
263 
264  //Id writeValue = op(vertexValue, parentValue);
265 
266  auto cur = minMaxIndexPortal.Get(parent); // Load the current value at idx
267  // Use a compare-exchange loop to ensure the operation gets applied atomically
268  while (!minMaxIndexPortal.CompareExchange(parent, &cur, this->Op(cur, vertexValue)))
269  ;
270 
271  //minMaxIndexPortal.Set(parent, writeValue);
272  }
273 }; // ComputeMinMaxValues
274 
276 {
277 public:
278  typedef void ControlSignature(WholeArrayIn,
279  WholeArrayIn,
280  WholeArrayIn,
281  WholeArrayIn,
282  WholeArrayIn,
283  WholeArrayInOut);
284  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5, _6);
285  using InputDomain = _1;
286 
288 
289  VTKM_EXEC_CONT InitialiseArcs(vtkm::Id _globalMinSortedIndex,
290  vtkm::Id _globalMaxSortedIndex,
291  vtkm::Id _rootSupernodeId)
292  : GlobalMinSortedIndex(_globalMinSortedIndex)
293  , GlobalMaxSortedIndex(_globalMaxSortedIndex)
294  , RootSupernodeId(_rootSupernodeId)
295  {
296  }
297 
298  template <typename IdWholeArrayInPortalType, typename EdgeWholeArrayInOutPortal>
299  VTKM_EXEC void operator()(const vtkm::Id currentId,
300  const IdWholeArrayInPortalType& minParentsPortal,
301  const IdWholeArrayInPortalType& maxParentsPortal,
302  const IdWholeArrayInPortalType& minValuesPortal,
303  const IdWholeArrayInPortalType& maxValuesPortal,
304  const IdWholeArrayInPortalType& superarcsPortal,
305  const EdgeWholeArrayInOutPortal& arcsPortal) const
306  {
307  Id i = currentId;
308  Id parent = MaskedIndex(superarcsPortal.Get(i));
309 
310  // The root does not correspond to an arc
311  if (parent == 0)
312  return;
313 
314  EdgeDataHeight edge;
315  edge.I = i;
316  edge.J = parent;
317  edge.UpEdge = IsAscending((superarcsPortal.Get(i)));
318 
319  EdgeDataHeight oppositeEdge;
320  oppositeEdge.I = parent;
321  oppositeEdge.J = i;
322  oppositeEdge.UpEdge = !edge.UpEdge;
323 
324 
325  // Is it in the direction of the minRootedTree?
326  if (MaskedIndex(minParentsPortal.Get(edge.J)) == edge.I)
327  {
328  edge.SubtreeMin = minValuesPortal.Get(edge.J);
329  oppositeEdge.SubtreeMin = this->GlobalMinSortedIndex;
330  }
331  else
332  {
333  oppositeEdge.SubtreeMin = minValuesPortal.Get(oppositeEdge.J);
334  edge.SubtreeMin = this->GlobalMinSortedIndex;
335  }
336 
337  // Is it in the direction of the maxRootedTree?
338  if (MaskedIndex(maxParentsPortal.Get(edge.J)) == edge.I)
339  {
340  edge.SubtreeMax = maxValuesPortal.Get(edge.J);
341  oppositeEdge.SubtreeMax = this->GlobalMaxSortedIndex;
342  }
343  else
344  {
345  oppositeEdge.SubtreeMax = maxValuesPortal.Get(oppositeEdge.J);
346  edge.SubtreeMax = this->GlobalMaxSortedIndex;
347  }
348 
349  // We technically don't need this because the root is supposed to be the last vertex
350  if (i > this->RootSupernodeId)
351  {
352  i--;
353  }
354 
355  arcsPortal.Set(i * 2, edge);
356  arcsPortal.Set(i * 2 + 1, oppositeEdge);
357  }
358 };
359 
360 
362 {
363 public:
364  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut);
365  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4);
366  using InputDomain = _4;
367 
369 
370  template <typename Float64WholeArrayInPortalType,
371  typename IdWholeArrayInPortalType,
372  typename EdgeWholeArrayInOutPortal>
373  VTKM_EXEC void operator()(const vtkm::Id currentId,
374  const Float64WholeArrayInPortalType& fieldValuesPortal,
375  const IdWholeArrayInPortalType& ctSortOrderPortal,
376  const IdWholeArrayInPortalType& supernodesPortal,
377  const EdgeWholeArrayInOutPortal& arcsPortal) const
378  {
379  Id i = currentId;
380  EdgeDataHeight edge = arcsPortal.Get(i);
381 
382  Float64 minIsoval = fieldValuesPortal.Get(ctSortOrderPortal.Get(edge.SubtreeMin));
383  Float64 maxIsoval = fieldValuesPortal.Get(ctSortOrderPortal.Get(edge.SubtreeMax));
384  Float64 vertexIsoval =
385  fieldValuesPortal.Get(ctSortOrderPortal.Get(supernodesPortal.Get(edge.I)));
386 
387  // We need to incorporate the value of the vertex into the height of the tree (otherwise leafs edges have 0 persistence)
388  minIsoval = vtkm::Minimum()(minIsoval, vertexIsoval);
389  maxIsoval = vtkm::Maximum()(maxIsoval, vertexIsoval);
390 
391  edge.SubtreeHeight = maxIsoval - minIsoval;
392 
393  arcsPortal.Set(i, edge);
394  }
395 }; // ComputeMinMaxValues
396 
397 
398 
399 
401 {
402 public:
403  typedef void ControlSignature(WholeArrayInOut, WholeArrayInOut, WholeArrayIn);
404  typedef void ExecutionSignature(InputIndex, _1, _2, _3);
405  using InputDomain = _3;
406 
408 
409  template <typename IdWholeArrayInPortalType, typename EdgeWholeArrayInOutPortal>
410  VTKM_EXEC void operator()(const vtkm::Id currentId,
411  const IdWholeArrayInPortalType& bestUpwardPortal,
412  const IdWholeArrayInPortalType& bestDownwardPortal,
413  const EdgeWholeArrayInOutPortal& arcsPortal) const
414  {
415  vtkm::Id i = currentId;
416 
417  if (i == 0)
418  {
419  if (arcsPortal.Get(0).UpEdge == 0)
420  {
421  bestDownwardPortal.Set(arcsPortal.Get(0).I, arcsPortal.Get(0).J);
422  }
423  else
424  {
425  bestUpwardPortal.Set(arcsPortal.Get(0).I, arcsPortal.Get(0).J);
426  }
427  }
428  else
429  {
430  if (arcsPortal.Get(i).UpEdge == 0 && arcsPortal.Get(i).I != arcsPortal.Get(i - 1).I)
431  {
432  bestDownwardPortal.Set(arcsPortal.Get(i).I, arcsPortal.Get(i).J);
433  }
434 
435  if (arcsPortal.Get(i).UpEdge == 1 &&
436  (arcsPortal.Get(i).I != arcsPortal.Get(i - 1).I || arcsPortal.Get(i - 1).UpEdge == 0))
437  {
438  bestUpwardPortal.Set(arcsPortal.Get(i).I, arcsPortal.Get(i).J);
439  }
440  }
441  }
442 }; // ComputeMinMaxValues
443 
444 
446 {
447 public:
448  typedef void ControlSignature(WholeArrayInOut);
449 
450  typedef void ExecutionSignature(InputIndex, _1);
451  using InputDomain = _1;
452 
453 
454  // Default Constructor
456 
457  template <typename IdWholeArrayInPortalType>
458  VTKM_EXEC void operator()(const vtkm::Id currentId,
459  const IdWholeArrayInPortalType& maskedArrayPortal) const
460  {
461  const auto currentValue = maskedArrayPortal.Get(currentId);
462  maskedArrayPortal.Set(currentId, MaskedIndex(currentValue));
463  }
464 }; // ComputeMinMaxValues
465 
467 {
468 public:
469  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayOut);
470 
471  typedef void ExecutionSignature(InputIndex, _1, _2, _3);
472  using InputDomain = _3;
473 
474 
475  // Default Constructor
477 
478  template <typename IdWholeArrayInPortalType, typename IdWholeArrayOutPortalType>
479  VTKM_EXEC void operator()(const vtkm::Id supernodeId,
480  const IdWholeArrayInPortalType& bestUpwardPortal,
481  const IdWholeArrayInPortalType& bestDownwardPortal,
482  const IdWholeArrayOutPortalType& whichBranchPortal) const
483  {
484  vtkm::Id bestUp = bestUpwardPortal.Get(supernodeId);
485  if (NoSuchElement(bestUp))
486  {
487  // flag it as an upper leaf
488  whichBranchPortal.Set(supernodeId, TERMINAL_ELEMENT | supernodeId);
489  }
490  else if (bestDownwardPortal.Get(bestUp) == supernodeId)
491  whichBranchPortal.Set(supernodeId, bestUp);
492  else
493  whichBranchPortal.Set(supernodeId, TERMINAL_ELEMENT | supernodeId);
494  }
495 }; // ComputeMinMaxValues
496 
498 {
499 public:
500  typedef void ControlSignature(WholeArrayIn, WholeArrayInOut);
501 
502  typedef void ExecutionSignature(InputIndex, _1, _2);
503  using InputDomain = _2;
504 
505 
506  // Default Constructor
508 
509  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
510  VTKM_EXEC void operator()(const vtkm::Id supernode,
511  const IdWholeArrayInPortalType& chainToBranchPortal,
512  const IdWholeArrayInOutPortalType& whichBranchPortal) const
513  {
514  const auto currentValue = MaskedIndex(whichBranchPortal.Get(supernode));
515  whichBranchPortal.Set(supernode, chainToBranchPortal.Get(currentValue));
516  }
517 }; // ComputeMinMaxValues
518 
520 {
521 public:
522  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut, WholeArrayInOut);
523 
524  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4);
525  using InputDomain = _2;
526 
528 
529  // Default Constructor
531  : NumSupernodes(_NumSupernodes)
532  {
533  }
534 
535  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
536  VTKM_EXEC void operator()(const vtkm::Id supernode,
537  const IdWholeArrayInPortalType& supernodeSorterPortal,
538  const IdWholeArrayInPortalType& whichBranchPortal,
539  const IdWholeArrayInOutPortalType& branchMinimumPortal,
540  const IdWholeArrayInOutPortalType& branchMaximumPortal) const
541  {
542  // retrieve supernode & branch IDs
543  vtkm::Id supernodeID = supernodeSorterPortal.Get(supernode);
544  vtkm::Id branchID = whichBranchPortal.Get(supernodeID);
545  // save the branch ID as the owner
546  // use LHE of segment to set branch minimum
547  if (supernode == 0)
548  { // sn = 0
549  branchMinimumPortal.Set(branchID, supernodeID);
550  } // sn = 0
551  else if (branchID != whichBranchPortal.Get(supernodeSorterPortal.Get(supernode - 1)))
552  { // LHE
553  branchMinimumPortal.Set(branchID, supernodeID);
554  } // LHE
555  // use RHE of segment to set branch maximum
556  if (supernode == this->NumSupernodes - 1)
557  { // sn = max
558  branchMaximumPortal.Set(branchID, supernodeID);
559  } // sn = max
560  else if (branchID != whichBranchPortal.Get(supernodeSorterPortal.Get(supernode + 1)))
561  { // RHE
562  branchMaximumPortal.Set(branchID, supernodeID);
563  } // RHE
564  }
565 }; // ComputeMinMaxValues
566 
568 {
569 public:
570  typedef void ControlSignature(WholeArrayIn,
571  WholeArrayIn,
572  WholeArrayIn,
573  WholeArrayIn,
574  WholeArrayIn,
575  WholeArrayInOut,
576  WholeArrayInOut);
577 
578  typedef void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5, _6, _7);
579  using InputDomain = _2;
580 
581  // Default Constructor
583 
584  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
585  VTKM_EXEC void operator()(const vtkm::Id branchID,
586  const IdWholeArrayInPortalType& whichBranchPortal,
587  const IdWholeArrayInPortalType& branchMinimumPortal,
588  const IdWholeArrayInPortalType& branchMaximumPortal,
589  const IdWholeArrayInPortalType& bestDownwardPortal,
590  const IdWholeArrayInPortalType& bestUpwardPortal,
591  const IdWholeArrayInOutPortalType& branchSaddlePortal,
592  const IdWholeArrayInOutPortalType& branchParentPortal) const
593  {
594  vtkm::Id branchMax = branchMaximumPortal.Get(branchID);
595  // check whether the maximum is NOT a leaf
596  if (!NoSuchElement(bestUpwardPortal.Get(branchMax)))
597  { // points to a saddle
598  branchSaddlePortal.Set(branchID, MaskedIndex(bestUpwardPortal.Get(branchMax)));
599  // if not, then the bestUp points to a saddle vertex at which we join the parent
600  branchParentPortal.Set(branchID, whichBranchPortal.Get(bestUpwardPortal.Get(branchMax)));
601  } // points to a saddle
602  // now do the same with the branch minimum
603  vtkm::Id branchMin = branchMinimumPortal.Get(branchID);
604  // test whether NOT a lower leaf
605  if (!NoSuchElement(bestDownwardPortal.Get(branchMin)))
606  { // points to a saddle
607  branchSaddlePortal.Set(branchID, MaskedIndex(bestDownwardPortal.Get(branchMin)));
608  // if not, then the bestUp points to a saddle vertex at which we join the parent
609  branchParentPortal.Set(branchID, whichBranchPortal.Get(bestDownwardPortal.Get(branchMin)));
610  } // points to a saddle
611  }
612 }; // ComputeMinMaxValues
613 
614 
615 
617 {
618 public:
619  typedef void ControlSignature(WholeArrayIn, WholeArrayInOut);
620 
621  typedef void ExecutionSignature(InputIndex, _1, _2);
622  using InputDomain = _1;
623 
624 
625  // Default Constructor
627 
628  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
629  VTKM_EXEC void operator()(const vtkm::Id supernode,
630  const IdWholeArrayInPortalType& whichBranchPortal,
631  const IdWholeArrayInOutPortalType& chainToBranchPortal) const
632  {
633  // test whether the supernode points to itself to find the top ends
634  if (MaskedIndex(whichBranchPortal.Get(supernode)) == supernode)
635  {
636  chainToBranchPortal.Set(supernode, 1);
637  }
638  }
639 }; // ComputeMinMaxValues
640 
641 
643 {
644 public:
645  typedef void ControlSignature(WholeArrayIn, WholeArrayInOut);
646 
647  typedef void ExecutionSignature(InputIndex, _1, _2);
648  using InputDomain = _1;
649 
651 
652  template <typename IdWholeArrayInPortalType, typename IdWholeArrayInOutPortalType>
653  VTKM_EXEC void operator()(const vtkm::Id supernode,
654  const IdWholeArrayInPortalType& whichBranchPortal,
655  const IdWholeArrayInOutPortalType& chainToBranchPortal) const
656  {
657  // test whether the supernode points to itself to find the top ends
658  if (MaskedIndex(whichBranchPortal.Get(supernode)) == supernode)
659  {
660  const auto value = chainToBranchPortal.Get(supernode);
661  chainToBranchPortal.Set(supernode, value - 1);
662  }
663  else
664  {
665  chainToBranchPortal.Set(supernode, (vtkm::Id)NO_SUCH_ELEMENT);
666  }
667  }
668 }; // ComputeMinMaxValues
669 
670 
671 template <typename Operator>
673 {
674 public:
675  typedef void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut);
676 
677  typedef void ExecutionSignature(InputIndex, _1, _2, _3);
678  using InputDomain = _1;
679 
680  Operator Op;
681 
682  // Default Constructor
684  : Op(_op)
685  {
686  }
687 
688  template <typename IdWholeArrayIn, typename IdWholeArrayInOut>
689  VTKM_EXEC void operator()(const vtkm::Id superarcId,
690  const IdWholeArrayIn& parentsPortal,
691  const IdWholeArrayIn& supernodesPortal,
692  const IdWholeArrayInOut& hypersweepValuesPortal) const
693  {
694  Id i = superarcId;
695 
696  Id parent = MaskedIndex(parentsPortal.Get(i));
697 
698  Id subtreeValue = hypersweepValuesPortal.Get(i);
699  Id parentValue = MaskedIndex(supernodesPortal.Get(parent));
700 
701  hypersweepValuesPortal.Set(i, this->Op(subtreeValue, parentValue));
702  }
703 }; // ComputeMinMaxValues
704 
705 
706 } // process_contourtree_inc
707 } // namespace contourtree_augmented
708 } // namespace worklet
709 } // namespace vtkm
710 
711 
712 #endif
vtkm::worklet::contourtree_augmented::EdgeDataHeight::J
Id J
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:234
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4)
Definition: HypersweepWorklets.h:524
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch::FinaliseChainToBranch
VTKM_EXEC_CONT FinaliseChainToBranch()
Definition: HypersweepWorklets.h:650
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5, _6, _7)
Definition: HypersweepWorklets.h:578
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId
Definition: HypersweepWorklets.h:497
vtkm::worklet::contourtree_augmented::IsAscending
VTKM_EXEC_CONT bool IsAscending(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:121
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2)
Definition: HypersweepWorklets.h:647
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration
Definition: HypersweepWorklets.h:181
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight::operator()
VTKM_EXEC void operator()(const vtkm::Id superarc, const IdWholeArrayInPortalType &arcsPortal, const IdWholeArrayInPortalType &superarcsPortal, const IdWholeArrayInPortalType &firstVertexForSuperparentPortal, const IdWholeArrayInOutPortalType &superarcIntrinsicWeightPortal) const
Definition: HypersweepWorklets.h:160
vtkm::worklet::contourtree_augmented::EdgeDataHeight
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:228
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration::SetFirstSupernodePerIteration
VTKM_EXEC_CONT SetFirstSupernodePerIteration()
Definition: HypersweepWorklets.h:188
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown::operator()
VTKM_EXEC void operator()(const vtkm::Id currentId, const IdWholeArrayInPortalType &bestUpwardPortal, const IdWholeArrayInPortalType &bestDownwardPortal, const EdgeWholeArrayInOutPortal &arcsPortal) const
Definition: HypersweepWorklets.h:410
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume
Definition: HypersweepWorklets.h:72
VTKM_EXEC
#define VTKM_EXEC
Definition: ExportMacros.h:51
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:675
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::GlobalMinSortedIndex
vtkm::Id GlobalMinSortedIndex
Definition: HypersweepWorklets.h:287
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::InputDomain
_2 InputDomain
Definition: HypersweepWorklets.h:525
WorkletMapField.h
VTKM_ASSERT
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
VTKM_EXEC_CONT
#define VTKM_EXEC_CONT
Definition: ExportMacros.h:52
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5, _6)
Definition: HypersweepWorklets.h:284
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId::WhichBranchNewId
VTKM_EXEC_CONT WhichBranchNewId()
Definition: HypersweepWorklets.h:507
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayOut)
Definition: HypersweepWorklets.h:469
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeMin
Id SubtreeMin
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:236
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::Op
Operator Op
Definition: HypersweepWorklets.h:680
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight::InputDomain
_2 InputDomain
Definition: HypersweepWorklets.h:155
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId::operator()
VTKM_EXEC void operator()(const vtkm::Id supernode, const IdWholeArrayInPortalType &chainToBranchPortal, const IdWholeArrayInOutPortalType &whichBranchPortal) const
Definition: HypersweepWorklets.h:510
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::NumSupernodes
vtkm::Id NumSupernodes
Definition: HypersweepWorklets.h:527
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration::operator()
VTKM_EXEC void operator()(const vtkm::Id supernode, const IdWholeArrayInPortalType &whenTransferredPortal, const IdWholeArrayInOutPortalType &firstSupernodePerIterationPortal) const
Definition: HypersweepWorklets.h:191
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown
Definition: HypersweepWorklets.h:400
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4)
Definition: HypersweepWorklets.h:76
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeMax
Id SubtreeMax
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:238
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight::ComputeIntrinsicWeight
VTKM_EXEC_CONT ComputeIntrinsicWeight()
Definition: HypersweepWorklets.h:157
vtkm::Maximum
Binary Predicate that takes two arguments argument x, and y and returns the x if x > y otherwise retu...
Definition: BinaryOperators.h:85
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight::operator()
VTKM_EXEC void operator()(const vtkm::Id currentId, const Float64WholeArrayInPortalType &fieldValuesPortal, const IdWholeArrayInPortalType &ctSortOrderPortal, const IdWholeArrayInPortalType &supernodesPortal, const EdgeWholeArrayInOutPortal &arcsPortal) const
Definition: HypersweepWorklets.h:373
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
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3)
Definition: HypersweepWorklets.h:471
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::Op
Operator Op
Definition: HypersweepWorklets.h:224
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId::InputDomain
_2 InputDomain
Definition: HypersweepWorklets.h:503
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:648
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet
Definition: HypersweepWorklets.h:567
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::process_contourtree_inc::InitialiseArcs::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:285
vtkm::worklet::contourtree_augmented::EdgeDataVolume::I
Id I
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:281
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::TotalVolume
vtkm::Id TotalVolume
Definition: HypersweepWorklets.h:79
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight
Definition: HypersweepWorklets.h:150
vtkm::Id
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::RootSupernodeId
vtkm::Id RootSupernodeId
Definition: HypersweepWorklets.h:287
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:500
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:184
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet::BranchSaddleParentSet
VTKM_EXEC_CONT BranchSaddleParentSet()
Definition: HypersweepWorklets.h:582
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3)
Definition: HypersweepWorklets.h:404
vtkm::worklet::contourtree_augmented::process_contourtree_inc::UnmaskArray::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:451
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:186
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown::SetBestUpDown
VTKM_EXEC_CONT SetBestUpDown()
Definition: HypersweepWorklets.h:407
vtkm::worklet::contourtree_augmented::EdgeDataHeight::SubtreeHeight
Float64 SubtreeHeight
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:240
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::operator()
VTKM_EXEC void operator()(const vtkm::Id hyperarcId, const IdWholeArrayHandleCountingIn &iterationHypernodesPortal, const IdWholeArrayIn &hypernodesPortal, const IdWholeArrayIn &hyperarcsPortal, const IdWholeArrayIn &howManyUsedPortal, const IdWholeArrayInOut &minMaxIndexPortal) const
Definition: HypersweepWorklets.h:235
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut, WholeArrayInOut)
Definition: HypersweepWorklets.h:522
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown::PropagateBestUpDown
VTKM_EXEC_CONT PropagateBestUpDown()
Definition: HypersweepWorklets.h:476
vtkm::worklet::contourtree_augmented::NoSuchElement
VTKM_EXEC_CONT bool NoSuchElement(vtkm::Id flaggedIndex)
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:97
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch
Definition: HypersweepWorklets.h:642
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstSupernodePerIteration::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2)
Definition: HypersweepWorklets.h:185
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:622
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4, _5)
Definition: HypersweepWorklets.h:221
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep
Definition: HypersweepWorklets.h:212
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight::InputDomain
_4 InputDomain
Definition: HypersweepWorklets.h:366
vtkm::worklet::contourtree_augmented::EdgeDataHeight::UpEdge
bool UpEdge
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:239
vtkm::worklet::contourtree_augmented::process_contourtree_inc::UnmaskArray::operator()
VTKM_EXEC void operator()(const vtkm::Id currentId, const IdWholeArrayInPortalType &maskedArrayPortal) const
Definition: HypersweepWorklets.h:458
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3)
Definition: HypersweepWorklets.h:125
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4)
Definition: HypersweepWorklets.h:154
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent::SetFirstVertexForSuperparent
VTKM_EXEC_CONT SetFirstVertexForSuperparent()
Definition: HypersweepWorklets.h:128
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent
Definition: HypersweepWorklets.h:121
vtkm::worklet::contourtree_augmented::EdgeDataVolume::J
Id J
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:283
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch::operator()
VTKM_EXEC void operator()(const vtkm::Id supernode, const IdWholeArrayInPortalType &whichBranchPortal, const IdWholeArrayInOutPortalType &chainToBranchPortal) const
Definition: HypersweepWorklets.h:629
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet::InputDomain
_2 InputDomain
Definition: HypersweepWorklets.h:579
Types.h
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet
Definition: HypersweepWorklets.h:519
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:278
vtkm::worklet::contourtree_augmented::process_contourtree_inc::UnmaskArray::ControlSignature
void ControlSignature(WholeArrayInOut)
Definition: HypersweepWorklets.h:448
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown::InputDomain
_3 InputDomain
Definition: HypersweepWorklets.h:472
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::operator()
VTKM_EXEC void operator()(const vtkm::Id currentId, const IdWholeArrayInPortalType &hypersweepSumValuesPortal, const IdWholeArrayInPortalType &superarcIntrinsicWeightPortal, const IdWholeArrayInPortalType &superarcsPortal, const EdgeWholeArrayInOutPortal &arcsPortal) const
Definition: HypersweepWorklets.h:87
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight
Definition: HypersweepWorklets.h:361
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:222
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet::operator()
VTKM_EXEC void operator()(const vtkm::Id branchID, const IdWholeArrayInPortalType &whichBranchPortal, const IdWholeArrayInPortalType &branchMinimumPortal, const IdWholeArrayInPortalType &branchMaximumPortal, const IdWholeArrayInPortalType &bestDownwardPortal, const IdWholeArrayInPortalType &bestUpwardPortal, const IdWholeArrayInOutPortalType &branchSaddlePortal, const IdWholeArrayInOutPortalType &branchParentPortal) const
Definition: HypersweepWorklets.h:585
BinaryOperators.h
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2)
Definition: HypersweepWorklets.h:621
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::operator()
VTKM_EXEC void operator()(const vtkm::Id superarcId, const IdWholeArrayIn &parentsPortal, const IdWholeArrayIn &supernodesPortal, const IdWholeArrayInOut &hypersweepValuesPortal) const
Definition: HypersweepWorklets.h:689
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:678
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight::ComputeSubtreeHeight
VTKM_EXEC_CONT ComputeSubtreeHeight()
Definition: HypersweepWorklets.h:368
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3, _4)
Definition: HypersweepWorklets.h:365
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::AddDependentWeightHypersweep
VTKM_EXEC_CONT AddDependentWeightHypersweep(Operator _op)
Definition: HypersweepWorklets.h:227
vtkm::worklet::contourtree_augmented::process_contourtree_inc::UnmaskArray::ExecutionSignature
void ExecutionSignature(InputIndex, _1)
Definition: HypersweepWorklets.h:450
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown
Definition: HypersweepWorklets.h:466
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::InitialiseArcsVolume
VTKM_EXEC_CONT InitialiseArcsVolume(vtkm::Id _totalVolume)
Definition: HypersweepWorklets.h:81
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs
Definition: HypersweepWorklets.h:275
vtkm::worklet::contourtree_augmented::process_contourtree_inc::UnmaskArray::UnmaskArray
VTKM_EXEC_CONT UnmaskArray()
Definition: HypersweepWorklets.h:455
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown::InputDomain
_3 InputDomain
Definition: HypersweepWorklets.h:405
vtkm::worklet::contourtree_augmented::process_contourtree_inc::AddDependentWeightHypersweep::ControlSignature
void ControlSignature(WholeArrayIn iterationHypernodes, WholeArrayIn hypernodes, WholeArrayIn hyperarcs, WholeArrayIn howManyUsed, AtomicArrayInOut minMaxIndex)
Definition: HypersweepWorklets.h:215
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:645
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent
Definition: HypersweepWorklets.h:672
vtkm::worklet::contourtree_augmented::process_contourtree_inc::WhichBranchNewId::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2)
Definition: HypersweepWorklets.h:502
vtkm::Float64
double Float64
Definition: Types.h:155
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchSaddleParentSet::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut, WholeArrayInOut)
Definition: HypersweepWorklets.h:570
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch::PrepareChainToBranch
VTKM_EXEC_CONT PrepareChainToBranch()
Definition: HypersweepWorklets.h:626
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeIntrinsicWeight::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:153
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:619
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::ExecutionSignature
void ExecutionSignature(InputIndex, _1, _2, _3)
Definition: HypersweepWorklets.h:677
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent::InputDomain
_1 InputDomain
Definition: HypersweepWorklets.h:126
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:75
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::GlobalMaxSortedIndex
vtkm::Id GlobalMaxSortedIndex
Definition: HypersweepWorklets.h:287
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::operator()
VTKM_EXEC void operator()(const vtkm::Id supernode, const IdWholeArrayInPortalType &supernodeSorterPortal, const IdWholeArrayInPortalType &whichBranchPortal, const IdWholeArrayInOutPortalType &branchMinimumPortal, const IdWholeArrayInOutPortalType &branchMaximumPortal) const
Definition: HypersweepWorklets.h:536
vtkm::worklet::contourtree_augmented::EdgeDataVolume::SubtreeVolume
Id SubtreeVolume
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:285
vtkm::worklet::contourtree_augmented::process_contourtree_inc::FinaliseChainToBranch::operator()
VTKM_EXEC void operator()(const vtkm::Id supernode, const IdWholeArrayInPortalType &whichBranchPortal, const IdWholeArrayInOutPortalType &chainToBranchPortal) const
Definition: HypersweepWorklets.h:653
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PropagateBestUpDown::operator()
VTKM_EXEC void operator()(const vtkm::Id supernodeId, const IdWholeArrayInPortalType &bestUpwardPortal, const IdWholeArrayInPortalType &bestDownwardPortal, const IdWholeArrayOutPortalType &whichBranchPortal) const
Definition: HypersweepWorklets.h:479
vtkm::worklet::contourtree_augmented::EdgeDataHeight::I
Id I
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:232
vtkm::exec::arg::InputIndex
The ExecutionSignature tag to use to get the input index.
Definition: InputIndex.h:42
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcsVolume::InputDomain
_3 InputDomain
Definition: HypersweepWorklets.h:77
vtkm::worklet::contourtree_augmented::process_contourtree_inc::BranchMinMaxSet::BranchMinMaxSet
VTKM_EXEC_CONT BranchMinMaxSet(vtkm::Id _NumSupernodes)
Definition: HypersweepWorklets.h:530
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::process_contourtree_inc::UnmaskArray
Definition: HypersweepWorklets.h:445
vtkm::worklet::contourtree_augmented::process_contourtree_inc::PrepareChainToBranch
Definition: HypersweepWorklets.h:616
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetBestUpDown::ControlSignature
void ControlSignature(WholeArrayInOut, WholeArrayInOut, WholeArrayIn)
Definition: HypersweepWorklets.h:403
vtkm::worklet::WorkletMapField
Base class for worklets that do a simple mapping of field arrays.
Definition: WorkletMapField.h:38
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::InitialiseArcs
VTKM_EXEC_CONT InitialiseArcs(vtkm::Id _globalMinSortedIndex, vtkm::Id _globalMaxSortedIndex, vtkm::Id _rootSupernodeId)
Definition: HypersweepWorklets.h:289
vtkm::Minimum
Binary Predicate that takes two arguments argument x, and y and returns the x if x < y otherwise retu...
Definition: BinaryOperators.h:99
vtkm::worklet::contourtree_augmented::process_contourtree_inc::ComputeSubtreeHeight::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:364
vtkm::worklet::contourtree_augmented::process_contourtree_inc::InitialiseArcs::operator()
VTKM_EXEC void operator()(const vtkm::Id currentId, const IdWholeArrayInPortalType &minParentsPortal, const IdWholeArrayInPortalType &maxParentsPortal, const IdWholeArrayInPortalType &minValuesPortal, const IdWholeArrayInPortalType &maxValuesPortal, const IdWholeArrayInPortalType &superarcsPortal, const EdgeWholeArrayInOutPortal &arcsPortal) const
Definition: HypersweepWorklets.h:299
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent::ControlSignature
void ControlSignature(WholeArrayIn, WholeArrayIn, WholeArrayInOut)
Definition: HypersweepWorklets.h:124
vtkm::worklet::contourtree_augmented::process_contourtree_inc::SetFirstVertexForSuperparent::operator()
VTKM_EXEC void operator()(const vtkm::Id sortedNode, const IdWholeArrayInPortalType &nodesPortal, const IdWholeArrayInPortalType &superparentsPortal, const IdWholeArrayInOutPortalType &firstVertexForSuperparentPortal) const
Definition: HypersweepWorklets.h:131
vtkm::worklet::contourtree_augmented::EdgeDataVolume
Definition: filter/scalar_topology/worklet/contourtree_augmented/Types.h:277
vtkm::worklet::contourtree_augmented::process_contourtree_inc::IncorporateParent::IncorporateParent
VTKM_EXEC_CONT IncorporateParent(Operator _op)
Definition: HypersweepWorklets.h:683