16 #ifndef GRPPI_STENCIL_H
17 #define GRPPI_STENCIL_H
50 template <
typename Execution,
typename ...InputIterators,
typename OutputIt,
51 typename StencilTransformer,
typename Neighbourhood,
53 requires_iterator<OutputIt> = 0>
56 std::tuple<InputIterators...> firsts, std::size_t size, OutputIt out,
57 StencilTransformer && transform_op,
58 Neighbourhood && neighbour_op)
60 static_assert(supports_stencil<Execution>(),
61 "stencil not supported for execution type");
62 ex.stencil(firsts, out, size,
63 std::forward<StencilTransformer>(transform_op),
64 std::forward<Neighbourhood>(neighbour_op));
83 template <
typename Execution,
typename ...InputIterators,
84 typename InputIt,
typename OutputIt,
85 typename StencilTransformer,
typename Neighbourhood,
87 requires_iterator<InputIt> = 0,
88 requires_iterator<OutputIt> = 0>
91 std::tuple<InputIterators...> firsts, InputIt last, OutputIt out,
92 StencilTransformer && transform_op,
93 Neighbourhood && neighbour_op)
95 static_assert(supports_stencil<Execution>(),
96 "stencil not supported for execution type");
97 ex.stencil(firsts, out,
98 std::distance(std::get<0>(firsts),last),
99 std::forward<StencilTransformer>(transform_op),
100 std::forward<Neighbourhood>(neighbour_op));
118 template <
typename Execution,
typename InputIt,
typename OutputIt,
119 typename StencilTransformer,
typename Neighbourhood,
120 requires_iterator<InputIt> = 0,
121 requires_iterator<OutputIt> = 0>
123 const Execution & ex,
124 InputIt first, InputIt last, OutputIt out,
125 StencilTransformer && transform_op,
126 Neighbourhood && neighbour_op)
128 static_assert(supports_stencil<Execution>(),
129 "stencil not supported for execution type");
130 ex.stencil(std::make_tuple(first), out,
131 std::distance(first,last),
132 std::forward<StencilTransformer>(transform_op),
133 std::forward<Neighbourhood>(neighbour_op));
153 template <
typename Execution,
typename InputIt,
typename OutputIt,
154 typename StencilTransformer,
typename Neighbourhood,
155 typename ... OtherInputIts,
156 requires_iterator<InputIt> = 0,
157 requires_iterator<OutputIt> = 0>
158 [[deprecated(
"This version of the interface is deprecated.\n"
159 "If you want to use multiple inputs, use a tuple instead.")]]
161 const Execution & ex,
162 InputIt first, InputIt last, OutputIt out,
163 StencilTransformer && transform_op,
164 Neighbourhood && neighbour_op,
165 OtherInputIts ... other_firsts)
167 static_assert(supports_stencil<Execution>(),
168 "stencil not supported for execution type");
169 ex.stencil(std::make_tuple(first,other_firsts...), out,
170 std::distance(first,last),
171 std::forward<StencilTransformer>(transform_op),
172 std::forward<Neighbourhood>(neighbour_op));
void stencil(const Execution &ex, std::tuple< InputIterators... > firsts, std::size_t size, OutputIt out, StencilTransformer &&transform_op, Neighbourhood &&neighbour_op)
Invoke Stencil pattern on a data sequence with sequential execution.
Definition: stencil.h:54
Definition: callable_traits.h:21
std::enable_if_t< are_iterators< T... >, int > requires_iterators
Definition: iterator_traits.h:59