#include <tbb/flow_graph.h>
#include <iostream>
Go to the source code of this file.
Definition at line 103 of file test_tbb_join.cxx.
107 typedef tbb::flow::source_node<int> int_source;
108 vector<int_source> countdowns;
111 for (
int i=0; i<
n; ++i) {
112 countdowns.push_back(int_source(graph,
CountDown(i),
false));
116 typedef std::tuple<int,int,int> IntTriple;
119 typedef tbb::flow::join_node< IntTriple > JoinInt3;
123 tbb::flow::function_node< std::tuple<int,int,int>, vector<int> > bo(graph, 0, th);
124 tbb::flow::function_node< vector<int>,
int >
fn(graph, 0,
Adder());
126 for (
int i=0; i<
n; ++i) {
127 make_edge(countdowns[i],*jrec[i]);
131 for (
int i=0; i<
n; ++i) {
132 countdowns[i].activate();
135 graph.wait_for_all();
vector< int_receiver * > input_ports(tbb::flow::join_node< TupleType > &jn)
def graph(desc, maker=maker)