5 #include <tbb/flow_graph.h> 44 virtual bool connect_tail(
INode& tail) = 0;
47 virtual bool connect_head(
INode& head) = 0;
71 return new tbb::flow::source_node<IDepo::pointer>(
graph, *
this,
false);
73 virtual void connect(tbb::flow::graph_node& head, tbb::flow::graph_node& tail) {
74 tbb::flow::sender<IDepo::pointer>* myhead =
dynamic_cast<tbb::flow::sender<IDepo::pointer>*
>(&head);
76 tbb::flow::receiver<IDepo::pointer>* mytail =
dynamic_cast<tbb::flow::receiver<IDepo::pointer>*
>(&tail);
78 make_edge(*myhead, *mytail);
93 return new tbb::flow::function_node<IDepo::pointer>(
graph, concurency, *
this);
95 virtual void connect(tbb::flow::graph_node& head, tbb::flow::graph_node& tail) {
96 tbb::flow::sender<IDepo::pointer>* myhead =
dynamic_cast<tbb::flow::sender<IDepo::pointer>*
>(&head);
98 tbb::flow::receiver<IDepo::pointer>* mytail =
dynamic_cast<tbb::flow::receiver<IDepo::pointer>*
>(&tail);
100 make_edge(*myhead, *mytail);
119 tbb::flow::graph_node* gnsrc = tbbsrc->make_node(graph);
120 tbb::flow::graph_node* gnsnk = tbbsnk->make_node(graph);
121 tbbsrc->connect(*gnsrc, *gnsnk);
123 graph.wait_for_all();
TbbDepoSink(IDepoSink::pointer snk)
std::shared_ptr< const IDepo > pointer
virtual void connect(tbb::flow::graph_node &head, tbb::flow::graph_node &tail)
virtual void connect(tbb::flow::graph_node &head, tbb::flow::graph_node &tail)
virtual bool operator()(boost::any &anyout)
def graph(desc, maker=maker)
bool operator()(const WireCell::IDepo::pointer &in)
The calling signature:
bool operator()(WireCell::IDepo::pointer &out)
The calling signature:
void operator=(const TbbDepoSink &other)
bool operator()(const IDepo::pointer &out)
TbbDepoSource(const TbbDepoSource &other)
std::shared_ptr< Interface > pointer
void operator=(const TbbDepoSource &other)
TbbDepoSource(IDepoSource::pointer src)
tbb::flow::graph_node * tbb_node(tbb::flow::graph &graph)
TbbDepoSink(const TbbDepoSink &other)
tbb::flow::graph_node * make_node(tbb::flow::graph &graph, int concurency=1)
IDepoSource::pointer m_src
bool operator()(IDepo::pointer &out)