21 #ifndef GRPPI_FF_DETAIL_ORDERED_STREAM_REDUCE_H 22 #define GRPPI_FF_DETAIL_ORDERED_STREAM_REDUCE_H 26 #include <ff/farm.hpp> 36 template <
typename Item,
typename Reducer,
typename CombineOp>
42 std::vector<ff_node*> workers_;
45 std::unique_ptr<emitter_type> p_emitter_;
48 template <
typename Item,
typename Reducer,
typename Combiner>
53 ff::ff_ofarm{
false, DEF_IN_BUFF_ENTRIES, DEF_OUT_BUFF_ENTRIES,
true, num_workers},
55 p_emitter_{std::make_unique<emitter_type>(red_obj.window_size(), red_obj.offset())}
57 for(
int i=0; i<num_workers; ++i) {
60 workers_.push_back(p_worker);
63 add_workers(workers_);
64 setEmitterF(p_emitter_.get());
Definition: callable_traits.h:26
Reduce worker.
Definition: reduce_nodes.h:120
Reduce emitter.
Definition: reduce_nodes.h:38
Ordered stream reduce for FastFlow.
Definition: ordered_stream_reduce.h:37
ordered_stream_reduce(Reducer &&red_obj, int num_workers)
Definition: ordered_stream_reduce.h:49