21 #ifndef GRPPI_STENCIL_H 22 #define GRPPI_STENCIL_H 55 template <
typename Execution,
typename ...InputIterators,
typename OutputIt,
56 typename StencilTransformer,
typename Neighbourhood,
58 requires_iterator<OutputIt> = 0>
61 std::tuple<InputIterators...> firsts, std::size_t size, OutputIt out,
62 StencilTransformer && transform_op,
63 Neighbourhood && neighbour_op)
65 static_assert(supports_stencil<Execution>(),
66 "stencil not supported for execution type");
67 ex.stencil(firsts, out, size,
68 std::forward<StencilTransformer>(transform_op),
69 std::forward<Neighbourhood>(neighbour_op));
88 template <
typename Execution,
typename ...InputIterators,
89 typename InputIt,
typename OutputIt,
90 typename StencilTransformer,
typename Neighbourhood,
96 std::tuple<InputIterators...> firsts, InputIt last, OutputIt out,
97 StencilTransformer && transform_op,
98 Neighbourhood && neighbour_op)
100 static_assert(supports_stencil<Execution>(),
101 "stencil not supported for execution type");
102 ex.stencil(firsts, out,
103 std::distance(std::get<0>(firsts),last),
104 std::forward<StencilTransformer>(transform_op),
105 std::forward<Neighbourhood>(neighbour_op));
123 template <
typename Execution,
typename InputIt,
typename OutputIt,
124 typename StencilTransformer,
typename Neighbourhood,
128 const Execution & ex,
129 InputIt first, InputIt last, OutputIt out,
130 StencilTransformer && transform_op,
131 Neighbourhood && neighbour_op)
133 static_assert(supports_stencil<Execution>(),
134 "stencil not supported for execution type");
135 ex.stencil(std::make_tuple(first), out,
136 std::distance(first,last),
137 std::forward<StencilTransformer>(transform_op),
138 std::forward<Neighbourhood>(neighbour_op));
158 template <
typename Execution,
typename InputIt,
typename OutputIt,
159 typename StencilTransformer,
typename Neighbourhood,
160 typename ... OtherInputIts,
161 requires_iterator<InputIt> = 0,
163 [[deprecated(
"This version of the interface is deprecated.\n" 164 "If you want to use multiple inputs, use a tuple instead.")]]
166 const Execution & ex,
167 InputIt first, InputIt last, OutputIt out,
168 StencilTransformer && transform_op,
169 Neighbourhood && neighbour_op,
170 OtherInputIts ... other_firsts)
172 static_assert(supports_stencil<Execution>(),
173 "stencil not supported for execution type");
174 ex.stencil(std::make_tuple(first,other_firsts...), out,
175 std::distance(first,last),
176 std::forward<StencilTransformer>(transform_op),
177 std::forward<Neighbourhood>(neighbour_op));
Definition: callable_traits.h:26
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:59
std::enable_if_t< are_iterators< T... >, int > requires_iterators
Definition: iterator_traits.h:64
std::enable_if_t< is_iterator< T >, int > requires_iterator
Definition: iterator_traits.h:58