16 #ifndef GRPPI_FF_DETAIL_ORDERED_STREAM_REDUCE_H
17 #define GRPPI_FF_DETAIL_ORDERED_STREAM_REDUCE_H
21 #include <ff/farm.hpp>
31 template <
typename Item,
typename Reducer,
typename CombineOp>
37 std::vector<ff_node*> workers_;
40 std::unique_ptr<emitter_type> p_emitter_;
43 template <
typename Item,
typename Reducer,
typename Combiner>
48 ff::ff_ofarm{false, DEF_IN_BUFF_ENTRIES, DEF_OUT_BUFF_ENTRIES, true, num_workers},
50 p_emitter_{std::make_unique<
emitter_type>(red_obj.window_size(), red_obj.offset())}
52 for(
int i=0; i<num_workers; ++i) {
55 workers_.push_back(p_worker);
58 add_workers(workers_);
59 setEmitterF(p_emitter_.get());
Ordered stream reduce for FastFlow.
Definition: ordered_stream_reduce.h:32
ordered_stream_reduce(Reducer &&red_obj, int num_workers)
Definition: ordered_stream_reduce.h:44
Reduce emitter.
Definition: reduce_nodes.h:33
Reduce worker.
Definition: reduce_nodes.h:115
Definition: callable_traits.h:21