21 #ifndef GRPPI_SEQ_STREAM_ITERATION_H 22 #define GRPPI_SEQ_STREAM_ITERATION_H 48 template<
typename Generator,
typename Transformer,
typename Predicate,
51 Generator generate_op, Transformer && transform_op,
52 Predicate predicate_op, Consumer consume_op)
55 auto item = generate_op();
59 val = transform_op(val);
60 }
while (!predicate_op(val));
79 template<
typename Generator,
typename Transformer,
typename Predicate,
82 Generator && generate_op,
84 Predicate && predicate_op, Consumer && consume_op)
87 std::forward<Generator>(generate_op),
89 std::forward<Predicate>(predicate_op),
90 std::forward<Consumer>(consume_op));
107 template<
typename Generator,
typename Transformer,
typename Predicate,
110 Generator generate_op,
112 Predicate predicate_op,
116 auto item = generate_op();
120 val = farm_obj.task(val);
121 }
while (!predicate_op(val));
139 template<
typename Generator,
typename Predicate,
typename Consumer,
140 typename ... Transformers>
142 Generator && generate_op,
144 Transformers...> & pipe_obj,
145 Predicate && predicate_op, Consumer && consume_op)
149 forward<Generator>(generate_op),
151 Transformers...> &&>(pipe),
152 forward<Predicate>(predicate_op),
153 forward<Consumer>(consume_op));
169 template<
typename Generator,
typename Predicate,
typename Consumer,
170 typename ...Transformers>
172 Generator generate_op,
174 Predicate predicate_op, Consumer consume_op)
178 auto item = generate_op();
182 using generated_type =
typename result_of<Generator()>::type;
183 using generated_value_type =
typename generated_type::value_type;
187 forward<pipeline_info_type>(pipe));
188 }
while (!predicate_op(val));
Definition: callable_traits.h:24
Definition: patterns.h:29
void repeat_until(parallel_execution_native &ex, Generator &&generate_op, pipeline_info< parallel_execution_native, MoreTransformers... > &&pipe, Predicate predicate_op, Consumer consume_op)
Invoke Stream iteration pattern on a data stream with native parallel execution with a generator...
Definition: native/stream_iteration.h:55
Definition: patterns.h:51
Sequential execution policy.
Definition: sequential_execution.h:31
void composed_pipeline(InQueue &input_queue, const pipeline_info< parallel_execution_native, MoreTransformers... > &pipe, OutQueue &output_queue, std::vector< std::thread > &tasks)
Definition: native/pipeline.h:36