Go to the documentation of this file.
53 #ifndef vtk_m_worklet_contourtree_distributed_combinehypersweepblockfunctor_h
54 #define vtk_m_worklet_contourtree_distributed_combinehypersweepblockfunctor_h
62 VTKM_THIRDPARTY_PRE_INCLUDE
63 #include <vtkm/thirdparty/diy/diy.h>
64 VTKM_THIRDPARTY_POST_INCLUDE
73 namespace contourtree_distributed
76 template <
typename ContourTreeDataFieldType>
81 const vtkmdiy::ReduceProxy& rp,
82 const vtkmdiy::RegularSwapPartners&
87 const auto selfid = rp.gid();
89 std::vector<int> incoming;
90 rp.incoming(incoming);
92 for (
const int ingid : incoming)
94 auto roundNo = rp.round() - 1;
102 #ifdef DEBUG_PRINT_COMBINED_BLOCK_IDS
103 int incomingGlobalBlockId;
104 rp.dequeue(ingid, incomingGlobalBlockId);
106 "Combining local block " << b->
GlobalBlockId <<
" with incomoing block "
107 << incomingGlobalBlockId);
110 rp.dequeue(ingid, incomingIntrinsicVolume);
112 rp.dequeue(ingid, incomingDependentVolume);
117 auto intrinsicVolumeView =
120 intrinsicVolumeView.GetNumberOfValues());
123 intrinsicVolumeView, incomingIntrinsicVolume, intrinsicVolumeView,
vtkm::Sum());
125 auto dependentVolumeView =
128 dependentVolumeView.GetNumberOfValues());
130 dependentVolumeView, incomingDependentVolume, dependentVolumeView,
vtkm::Sum());
134 for (
int cc = 0; cc < rp.out_link().size(); ++cc)
136 auto target = rp.out_link().target(cc);
137 if (target.gid != selfid)
139 #ifdef DEBUG_PRINT_COMBINED_BLOCK_IDS
146 auto intrinsicVolumeView =
148 auto dependentVolumeView =
162 rp.enqueue(target, sendIntrinsicVolume);
163 rp.enqueue(target, sendDependentVolume);
VTKM_CONT vtkm::Id GetNumberOfValues() const
Returns the number of entries in the array.
Definition: ArrayHandle.h:448
Groups connected points that have the same field value.
Definition: Atomic.h:19
ArrayHandleView< ArrayHandleType > make_ArrayHandleView(const ArrayHandleType &array, vtkm::Id startIndex, vtkm::Id numValues)
Definition: ArrayHandleView.h:222
#define VTKM_ASSERT(condition)
Definition: Assert.h:43
void operator()(vtkm::worklet::contourtree_distributed::HyperSweepBlock< ContourTreeDataFieldType > *b, const vtkmdiy::ReduceProxy &rp, const vtkmdiy::RegularSwapPartners &) const
Definition: CombineHyperSweepBlockFunctor.h:79
VTKM_CONT T ArrayGetValue(vtkm::Id id, const vtkm::cont::ArrayHandle< T, S > &data)
Obtain a small set of values from an ArrayHandle with minimal device transfers.
Definition: ArrayGetValues.h:264
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
const vtkm::worklet::contourtree_distributed::HierarchicalContourTree< ContourTreeDataFieldType > & HierarchicalContourTree
Definition: HyperSweepBlock.h:96
Binary Predicate that takes two arguments argument x, and y and returns sum (addition) of the two val...
Definition: BinaryOperators.h:33
@ Info
Information messages (detected hardware, etc) and temporary debugging output.
std::vector< vtkm::worklet::contourtree_augmented::IdArrayType > FirstSupernodePerIteration
vectors tracking the segments used in each iteration of the hypersweep
Definition: HierarchicalContourTree.h:169
vtkm::cont::ArrayHandle< vtkm::Id > DependentVolume
Definition: HyperSweepBlock.h:100
void ArrayCopy(const SourceArrayType &source, DestArrayType &destination)
Does a deep copy from one array to another array.
Definition: ArrayCopy.h:142
Definition: CombineHyperSweepBlockFunctor.h:77
vtkm::cont::ArrayHandle< vtkm::Id > IntrinsicVolume
Definition: HyperSweepBlock.h:99
#define VTKM_LOG_S(level,...)
Writes a message using stream syntax to the indicated log level.
Definition: Logging.h:261
static VTKM_CONT void Transform(vtkm::cont::DeviceAdapterId devId, const vtkm::cont::ArrayHandle< T, StorageT > &input1, const vtkm::cont::ArrayHandle< U, StorageU > &input2, vtkm::cont::ArrayHandle< V, StorageV > &output, BinaryFunctor binaryFunctor)
Definition: Algorithm.h:1037
int GlobalBlockId
Definition: HyperSweepBlock.h:89
Definition: HyperSweepBlock.h:68