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>
28 namespace tpie::pipelining::parallel_bits {
33 template <
typename fact_t>
39 template <
typename dest_t>
44 typedef typename fact_t::template constructed_type<after_t> processor_t;
45 typedef typename push_type<processor_t>::type T1;
51 template <
typename dest_t>
55 : fact(std::move(fact))
56 , opts(std::move(opts))
60 template <
typename dest_t>
61 constructed_type<dest_t> construct(dest_t && dest) {
62 typedef constructed<dest_t> gen_t;
64 typedef typename gen_t::T1 input_type;
65 typedef typename gen_t::T2 output_type;
70 typedef typename gen_t::type producer_t;
72 typename state_t::ptr st(
new state_t(opts, std::move(fact)));
74 consumer_t
consumer(std::move(dest), st);
81 template <
typename dest_t>
82 constructed_type<dest_t> construct_copy(dest_t && dest) {
83 return construct(std::forward(dest));
91 #endif // __TPIE_PIPELINING_PARALLEL_FACTORY_H__