21 #ifndef GRPPI_FF_DETAIL_ORDERED_STREAM_FILTER_H 22 #define GRPPI_FF_DETAIL_ORDERED_STREAM_FILTER_H 26 #include <ff/farm.hpp> 32 template <
typename Item,
typename Filter>
39 std::vector<ff::ff_node *> workers_;
40 std::unique_ptr<filter_collector<Item>> p_collector_;
43 template <
typename Item,
typename Filter>
48 ff::ff_ofarm{
false, DEF_IN_BUFF_ENTRIES, DEF_OUT_BUFF_ENTRIES,
true, num_workers},
49 filter_{std::move(filter)},
51 p_collector_{std::make_unique<filter_collector<Item>>()}
53 for(
int i=0;i<num_workers;i++) {
55 std::forward<Filter>(filter)});
57 add_workers(workers_);
58 setCollectorF(p_collector_.get());
Definition: callable_traits.h:26
Worker that passes a value to next stage if the predicate is satisfied or the filtered_value constant...
Definition: filter_nodes.h:47
Definition: ordered_stream_filter.h:33
ordered_stream_filter(Filter &&filter, int num_workers)
Definition: ordered_stream_filter.h:44