21 #ifndef GRPPI_SEQ_STREAM_FILTER_H 22 #define GRPPI_SEQ_STREAM_FILTER_H 49 template <
typename Generator,
typename Predicate,
typename Consumer>
51 Predicate predicate_op, Consumer consume_op)
54 auto item = generate_op();
56 if (predicate_op(*item)) {
75 template <
typename Generator,
typename Predicate,
typename Consumer>
77 Predicate predicate_op, Consumer consume_op)
80 std::forward<Generator>(generate_op),
81 [&](
auto val) {
return !predicate_op(val); },
82 std::forward<Consumer>(consume_op)
Definition: callable_traits.h:24
void discard(parallel_execution_native &ex, Generator generate_op, Predicate predicate_op, Consumer consume_op)
Invoke Filter pattern on a data sequence with sequential execution policy. This function discards fro...
Definition: native/stream_filter.h:177
void keep(parallel_execution_native &ex, Generator generate_op, Predicate predicate_op, Consumer consume_op)
Invoke Filter pattern pattern on a data sequence with sequential execution policy. This function keeps in the stream only those items that satisfy the predicate.
Definition: native/stream_filter.h:50
Sequential execution policy.
Definition: sequential_execution.h:31