21 #ifndef GRPPI_STREAM_FILTER_H 22 #define GRPPI_STREAM_FILTER_H 52 template <
typename Execution,
typename Predicate>
53 auto keep(Execution & ex, Predicate && predicate_op)
56 std::forward<Predicate>(predicate_op)};
69 template <
typename Execution,
typename Predicate>
70 auto discard(Execution & ex, Predicate && predicate_op)
72 return keep(ex, [&](
auto val) {
return !predicate_op(val); });
Definition: callable_traits.h:24
Definition: patterns.h:61
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