18 #ifndef viskores_exec_arg_FetchExtrude_h
19 #define viskores_exec_arg_FetchExtrude_h
47 template <
typename FetchType,
typename ExecObjectType>
51 template <
typename ScatterAndMaskMode>
54 ScatterAndMaskMode>& indices,
58 const auto& xgcidx = indices.GetIndicesIncident();
59 const viskores::Id offset1 = (xgcidx.Planes[0] * xgcidx.NumberOfPointsPerPlane);
60 const viskores::Id offset2 = (xgcidx.Planes[1] * xgcidx.NumberOfPointsPerPlane);
62 result[0] = offset1 + xgcidx.PointIds[0][0];
63 result[1] = offset1 + xgcidx.PointIds[0][1];
64 result[2] = offset1 + xgcidx.PointIds[0][2];
65 result[3] = offset2 + xgcidx.PointIds[1][0];
66 result[4] = offset2 + xgcidx.PointIds[1][1];
67 result[5] = offset2 + xgcidx.PointIds[1][2];
72 template <
typename ConnectivityType,
typename ScatterAndMaskMode>
76 const ExecObjectType&)
const -> decltype(indices.GetIndicesIncident())
78 return indices.GetIndicesIncident();
81 template <
typename ThreadIndicesType,
typename ValueType>
92 viskores::internal::ArrayPortalXGCCoordinates<T>>
97 template <
typename ScatterAndMaskMode>
100 ScatterAndMaskMode>& indices,
101 const viskores::internal::ArrayPortalXGCCoordinates<T>& portal)
102 -> decltype(portal.GetWedge(indices.GetIndicesIncident()))
104 return portal.GetWedge(indices.GetIndicesIncident());
108 template <
typename ThreadIndicesType>
110 const viskores::internal::ArrayPortalXGCCoordinates<T>& field)
const
111 -> decltype(detail::FetchArrayTopologyMapInImplementation<
112 typename ThreadIndicesType::Connectivity,
113 viskores::internal::ArrayPortalXGCCoordinates<T>,
114 ThreadIndicesType>::
Load(indices, field))
116 using Implementation = detail::FetchArrayTopologyMapInImplementation<
117 typename ThreadIndicesType::Connectivity,
118 viskores::internal::ArrayPortalXGCCoordinates<T>,
120 return Implementation::Load(indices, field);
123 template <
typename ThreadIndicesType,
typename ValueType>
125 const viskores::internal::ArrayPortalXGCCoordinates<T>&,
133 template <
typename T>
134 struct Fetch<
viskores::exec::arg::FetchTagArrayDirectIn,
136 viskores::internal::ArrayPortalXGCCoordinates<T>>
140 template <
typename ThreadIndicesType>
142 const viskores::internal::ArrayPortalXGCCoordinates<T>& points)
143 -> decltype(points.Get(indices.GetInputIndex()))
146 return points.Get(indices.GetInputIndex());
150 template <
typename ScatterAndMaskMode>
153 ScatterAndMaskMode>& indices,
154 const viskores::internal::ArrayPortalXGCCoordinates<T>& points)
155 -> decltype(points.Get(indices.GetIndexLogical()))
158 return points.Get(indices.GetIndexLogical());
161 template <
typename ThreadIndicesType,
typename ValueType>
163 const viskores::internal::ArrayPortalXGCCoordinates<T>&,