13 #ifndef vtk_m_worklet_contour_flyingedges_pass2_h
14 #define vtk_m_worklet_contour_flyingedges_pass2_h
23 namespace flying_edges
37 WholeArrayInOut axis_sums,
41 WholeArrayIn edgeData);
46 typename WholeSumField,
47 typename FieldInPointId,
48 typename WholeEdgeField,
51 const WholeSumField& axis_sums,
52 const FieldInPointId& axis_mins,
53 const FieldInPointId& axis_maxs,
55 const WholeEdgeField& edges,
72 pdims[AxisToSum::xindex] - 1, edges, axis_mins, axis_maxs, startPos, axis_inc, left, right);
79 onBoundary[AxisToSum::yindex] = (ijk[AxisToSum::yindex] >= (pdims[AxisToSum::yindex] - 2));
80 onBoundary[AxisToSum::zindex] = (ijk[AxisToSum::zindex] >= (pdims[AxisToSum::zindex] - 2));
83 vtkm::Id3 sums = axis_sums.Get(threadIndices.GetIndicesIncident()[0]);
86 if (onBoundary[AxisToSum::yindex])
88 adj_row_sum = axis_sums.Get(threadIndices.GetIndicesIncident()[1]);
90 if (onBoundary[AxisToSum::zindex])
92 adj_col_sum = axis_sums.Get(threadIndices.GetIndicesIncident()[3]);
95 for (
vtkm::Id i = left; i < right; ++i)
101 cell_tri_count += numTris;
108 onBoundary[AxisToSum::xindex] = (i >= (pdims[AxisToSum::xindex] - 2));
111 sums[AxisToSum::yindex] += edgeUses[4];
113 sums[AxisToSum::zindex] += edgeUses[8];
117 AxisToSum{}, onBoundary, edgeUses, sums, adj_row_sum, adj_col_sum);
121 axis_sums.Set(threadIndices.GetIndicesIncident()[0], sums);
122 if (onBoundary[AxisToSum::yindex])
124 axis_sums.Set(threadIndices.GetIndicesIncident()[1], adj_row_sum);
126 if (onBoundary[AxisToSum::zindex])
128 axis_sums.Set(threadIndices.GetIndicesIncident()[3], adj_col_sum);
140 template <
typename AxisToSum>
148 if (onBoundary[AxisToSum::xindex])
150 sums[AxisToSum::yindex] += edgeUses[5];
151 sums[AxisToSum::zindex] += edgeUses[9];
152 if (onBoundary[AxisToSum::yindex])
154 adj_row_sum[AxisToSum::zindex] += edgeUses[11];
156 if (onBoundary[AxisToSum::zindex])
158 adj_col_sum[AxisToSum::yindex] += edgeUses[7];
161 if (onBoundary[AxisToSum::yindex])
163 adj_row_sum[AxisToSum::zindex] += edgeUses[10];
165 if (onBoundary[AxisToSum::zindex])
167 adj_col_sum[AxisToSum::yindex] += edgeUses[6];