Go to the documentation of this file.
13 #ifndef vtk_m_worklet_contour_flyingedges_pass1_h
14 #define vtk_m_worklet_contour_flyingedges_pass1_h
23 namespace flying_edges
48 template <
typename Device,
typename WholeEdgeField>
51 WholeEdgeField& edges,
54 edges.Set(write_index, edgeCase);
57 template <
typename WholeEdgeField>
60 WholeEdgeField& edges,
65 edges.Set(write_index, edgeCase);
86 WholeArrayInOut edgeData,
92 typename WholeEdgeField,
93 typename WholeDataField,
99 WholeEdgeField& edges,
100 const WholeDataField& field,
111 axis_min = this->PointDims[AxisToSum::xindex];
113 T s1 = field.Get(startPos);
115 axis_sum = { 0, 0, 0 };
116 const vtkm::Id end = this->PointDims[AxisToSum::xindex] - 1;
120 s1 = field.Get(startPos + (offset * (i + 1)));
132 write_edge(device, startPos + (offset * i), edges, edgeCase);
136 axis_sum[AxisToSum::xindex] += 1;
138 if (axis_min == (end + 1))
150 template <
typename DeviceAdapterTag,
typename T,
typename StorageTagField,
typename... Args>
156 Args&&... args)
const
161 invoke(worklet, metaDataMesh2D, std::forward<Args>(args)..., edgeCases, inputField);
165 template <
typename DeviceAdapterTag,
typename T,
typename StorageTagField,
typename... Args>
171 Args&&... args)
const
177 invoke(worklet, metaDataMesh2D, std::forward<Args>(args)..., edgeCases, inputField);
181 template <
typename DeviceAdapterTag,
typename... Args>
184 return this->
LaunchXAxis(device, std::forward<Args>(args)...);
187 template <
typename... Args>
190 return this->
LaunchYAxis(device, std::forward<Args>(args)...);
193 template <
typename... Args>
196 return this->
LaunchYAxis(device, std::forward<Args>(args)...);
VTKM_EXEC vtkm::Id3 compute_ijk(SumXAxis, const vtkm::Id3 &executionSpaceIJK)
Definition: FlyingEdgesHelpers.h:96
Manages an array-worth of data.
Definition: ArrayHandle.h:283
void(CellSetIn, FieldOut axis_sum, FieldOut axis_min, FieldOut axis_max, WholeArrayInOut edgeData, WholeArrayIn data) ControlSignature
Definition: FlyingEdgesPass1.h:87
#define VTKM_EXEC
Definition: ExportMacros.h:51
Groups connected points that have the same field value.
Definition: Atomic.h:19
@ Below
Definition: FlyingEdgesHelpers.h:37
VTKM_EXEC vtkm::Id compute_start(SumXAxis, const vtkm::Id3 &ijk, const vtkm::Id3 &dims)
Definition: FlyingEdgesHelpers.h:131
Definition: CastAndCall.h:32
@ RightAbove
Definition: FlyingEdgesHelpers.h:40
Definition: FlyingEdgesPass1.h:148
vtkm::Int32 Id
Represents an ID (index into arrays).
Definition: Types.h:191
Definition: FlyingEdgesHelpers.h:51
ComputePass1(T value, const vtkm::Id3 &pdims)
Definition: FlyingEdgesPass1.h:76
VTKM_CONT void Fill(const ValueType &fillValue, vtkm::Id startIndex, vtkm::Id endIndex, vtkm::cont::Token &token) const
Fills the array with a given value.
Definition: ArrayHandle.h:530
void(ThreadIndices, _2, _3, _4, _5, _6, Device) ExecutionSignature
Definition: FlyingEdgesPass1.h:88
Base class for worklets that map from Cells to Points.
Definition: WorkletMapTopology.h:274
Allows launching any worklet without a dispatcher.
Definition: Invoker.h:41
VTKM_EXEC vtkm::Id compute_inc(SumXAxis, const vtkm::Id3 &)
Definition: FlyingEdgesHelpers.h:174
The ExecutionSignature tag to use to get the thread indices.
Definition: ThreadIndices.h:41
#define VTKM_CONT
Definition: ExportMacros.h:57
VTKM_EXEC void write_edge(Device, vtkm::Id write_index, WholeEdgeField &edges, vtkm::UInt8 edgeCase)
Definition: FlyingEdgesPass1.h:49
uint8_t UInt8
Definition: Types.h:157
_1 InputDomain
Definition: FlyingEdgesPass1.h:89
VTKM_CONT bool operator()(vtkm::cont::DeviceAdapterTagCuda device, Args &&... args) const
Definition: FlyingEdgesPass1.h:188
vtkm::cont::CellSetStructured< 2 > make_metaDataMesh2D(SumXAxis, const vtkm::Id3 &pdims)
Definition: FlyingEdgesHelpers.h:81
VTKM_CONT bool LaunchYAxis(DeviceAdapterTag device, const ComputePass1< T > &worklet, const vtkm::cont::ArrayHandle< T, StorageTagField > &inputField, vtkm::cont::ArrayHandle< vtkm::UInt8 > &edgeCases, vtkm::cont::CellSetStructured< 2 > &metaDataMesh2D, Args &&... args) const
Definition: FlyingEdgesPass1.h:166
Definition: FlyingEdgesHelpers.h:57
VTKM_CONT bool operator()(vtkm::cont::DeviceAdapterTagKokkos device, Args &&... args) const
Definition: FlyingEdgesPass1.h:194
VTKM_CONT bool operator()(DeviceAdapterTag device, Args &&... args) const
Definition: FlyingEdgesPass1.h:182
@ LeftAbove
Definition: FlyingEdgesHelpers.h:39
Definition: FlyingEdgesPass1.h:70
VTKM_EXEC void operator()(const ThreadIndices &threadIndices, vtkm::Id3 &axis_sum, vtkm::Id &axis_min, vtkm::Id &axis_max, WholeEdgeField &edges, const WholeDataField &field, Device device) const
Definition: FlyingEdgesPass1.h:95
VTKM_CONT bool LaunchXAxis(DeviceAdapterTag device, const ComputePass1< T > &worklet, const vtkm::cont::ArrayHandle< T, StorageTagField > &inputField, vtkm::cont::ArrayHandle< vtkm::UInt8 > &edgeCases, vtkm::cont::CellSetStructured< 2 > &metaDataMesh2D, Args &&... args) const
Definition: FlyingEdgesPass1.h:151
T IsoValue
Definition: FlyingEdgesPass1.h:73
ComputePass1()
Definition: FlyingEdgesPass1.h:75
vtkm::Id3 PointDims
Definition: FlyingEdgesPass1.h:72