20 #ifndef __TPIE_PIPELINING_PARALLEL_PIPES_H__
21 #define __TPIE_PIPELINING_PARALLEL_PIPES_H__
24 #include <tpie/pipelining/pipe_base.h>
25 #include <tpie/pipelining/parallel/factory.h>
30 namespace pipelining {
40 template <
typename fact_t>
41 pipe_middle<parallel_bits::factory<fact_t> >
44 switch (maintainOrder) {
46 opts.maintainOrder =
false;
49 opts.maintainOrder =
true;
52 opts.numJobs = numJobs;
53 opts.bufSize = bufSize;
56 (std::move(fact.factory), std::move(opts)));
65 template <
typename fact_t>
66 pipe_middle<parallel_bits::factory<fact_t> >
71 template <
typename fact_t>
72 pipe_middle<parallel_bits::factory<fact_t> >
73 parallel(pipe_middle<fact_t> && fact,
bool maintainOrder,
size_t numJobs,
size_t bufSize = 2048) {
74 log_fatal() <<
"The second argument to tpie::pipelining::parallel has changed.\n"
75 <<
"Use maintain_order instead of true and arbitrary_order instead of false."
80 template <
typename fact_t>
81 pipe_middle<parallel_bits::factory<fact_t> >
82 parallel(pipe_middle<fact_t> && fact,
bool maintainOrder) {
83 log_fatal() <<
"The second argument to tpie::pipelining::parallel has changed.\n"
84 <<
"Use maintain_order instead of true and arbitrary_order instead of false."
93 #endif // __TPIE_PIPELINING_PARALLEL_PIPES_H__
pipe_middle< parallel_bits::factory< fact_t > > parallel(pipe_middle< fact_t > &&fact, maintain_order_type maintainOrder, size_t numJobs, size_t bufSize=2048)
Runs a pipeline in multiple threads.
Factory instantiating a parallel multithreaded pipeline.
Do not maintain order; push items as soon as a worker has processed them.
logstream & log_fatal()
Return logstream for writing fatal log messages.
memory_size_type default_worker_count()
Return the number of job threads initialized by the job framework in init_job().
Job class for job manager.
Maintain order; push items in the same order that a single thread would have.
User-supplied options to the parallelism framework.
A pipe_middle class pushes input down the pipeline.
Whether to maintain order in parallel or not.
maintain_order_type
Type describing whether to maintain the order of items in parallel.