20 #ifndef __TPIE_PIPELINING_PARALLEL_FACTORY_H__
21 #define __TPIE_PIPELINING_PARALLEL_FACTORY_H__
23 #include <tpie/pipelining/factory_base.h>
24 #include <tpie/pipelining/parallel/options.h>
25 #include <tpie/pipelining/parallel/base.h>
26 #include <tpie/pipelining/node.h>
30 namespace pipelining {
32 namespace parallel_bits {
37 template <
typename fact_t>
43 template <
typename dest_t>
49 typedef typename push_type<processor_t>::type T1;
55 : fact(std::move(fact))
56 , opts(std::move(opts))
60 template <
typename dest_t>
61 typename constructed<dest_t>::type
62 construct(dest_t && dest) {
63 typedef constructed<dest_t> gen_t;
65 typedef typename gen_t::T1 input_type;
66 typedef typename gen_t::T2 output_type;
71 typedef typename gen_t::type producer_t;
73 typename state_t::ptr st(
new state_t(opts, std::move(fact)));
75 consumer_t
consumer(std::move(dest), st);
82 template <
typename dest_t>
83 typename constructed<dest_t>::type
84 construct_copy(dest_t && dest) {
85 return construct(std::forward(dest));
97 #endif // __TPIE_PIPELINING_PARALLEL_FACTORY_H__
Base class of all pipelining factories.
void init_node(node &r)
Initialize node constructed in a subclass.
Factory instantiating a parallel multithreaded pipeline.
Class to deduce the item_type of a node of type T.
Accepts output items and sends them to the main thread.
Node running in main thread, accepting an output buffer from the managing producer and forwards them ...
User-supplied options to the parallelism framework.
State subclass containing the item type specific state, i.e.
Producer, running in main thread, managing the parallel execution.
Concrete consumer implementation.