16 #ifndef GRPPI_FF_DETAIL_UNORDERED_STREAM_FILTER_H
17 #define GRPPI_FF_DETAIL_UNORDERED_STREAM_FILTER_H
21 #include <ff/farm.hpp>
27 template <
typename Item,
typename Filter>
34 std::vector<ff::ff_node *> workers_;
35 std::unique_ptr<filter_emitter<Item>> p_emitter_;
36 std::unique_ptr<filter_collector<Item>> p_collector_;
39 template <
typename Item,
typename Filter>
44 ff::ff_ofarm{false, DEF_IN_BUFF_ENTRIES, DEF_OUT_BUFF_ENTRIES, true, num_workers},
45 filter_{std::move(filter)},
50 for(
int i=0;i<num_workers;++i) {
52 std::forward<Filter>(filter_)});
54 add_workers(workers_);
55 add_emitter(p_emitter_.get());
56 add_collector(p_collector_.get());
Collector node for a filter.
Definition: filter_nodes.h:67
Emitter for a filter stage.
Definition: filter_nodes.h:85
Worker that passes a value to next stage if the predicate is satisfied or the filtered_value constant...
Definition: filter_nodes.h:43
Definition: unordered_stream_filter.h:28
unordered_stream_filter(Filter &&filter, int num_workers)
Definition: unordered_stream_filter.h:40
Definition: callable_traits.h:21