#include "WireCellUtil/Testing.h"
#include <boost/pipeline.hpp>
#include <iostream>
Go to the source code of this file.
Definition at line 41 of file _test_pipeline.cxx.
42 cerr <<
"consume1(" <<
x <<
")" <<
endl;
QTextStream & endl(QTextStream &s)
void consume2 |
( |
queue_front< int > & |
qf | ) |
|
Definition at line 44 of file _test_pipeline.cxx.
45 int i; qf.wait_pull(i);
46 cerr <<
"consume2(" << i <<
")" <<
endl;
QTextStream & endl(QTextStream &s)
Definition at line 48 of file _test_pipeline.cxx.
49 cerr <<
"consume3(" <<
x <<
")" <<
endl;
QTextStream & endl(QTextStream &s)
int consume4 |
( |
queue_front< int > & |
qf | ) |
|
Definition at line 51 of file _test_pipeline.cxx.
52 int i; qf.wait_pull(i);
53 cerr <<
"consume4(" << i <<
")" <<
endl;
QTextStream & endl(QTextStream &s)
Definition at line 9 of file _test_pipeline.cxx.
12 queue_front<int> qf(q);
13 queue_back<int> qb(q);
15 Assert(qf.is_closed() ==
false);
Definition at line 58 of file _test_pipeline.cxx.
60 std::vector<int>
input{0, 1, 2, 3};
std::shared_ptr< spdlog::details::thread_pool > thread_pool()
void consume2(queue_front< int > &qf)
int consume4(queue_front< int > &qf)
Definition at line 75 of file _test_pipeline.cxx.
77 auto f_consume1 = std::function<void(int)>(
consume1);
78 auto f_consume2 = std::function<void(queue_front<int>&)>(
consume2);
79 auto f_consume3 = std::function<int(int)>(
consume3);
80 auto f_consume4 = std::function<int(queue_front<int>&)>(
consume4);
82 std::vector<int>
input{0, 1, 2, 3};
86 auto exec1 = (from(
input) | f_consume1).
run(pool);
87 auto exec2 = (from(
input) | f_consume2).
run(pool);
88 auto exec3 = (from(
input) | to(f_consume3)).
run(pool);
89 auto exec4 = (from(
input) | to(f_consume4)).
run(pool);
std::shared_ptr< spdlog::details::thread_pool > thread_pool()
void consume2(queue_front< int > &qf)
int consume4(queue_front< int > &qf)