Lines Matching refs:tbb

50     int operator()(tbb::flow_control& fc) {  in operator ()()
65 …void operator()(int, tbb::flow::multifunction_node<int, std::tuple<int,int> >::output_ports_type )… in operator ()()
70 void operator()(tbb::flow::continue_msg){} in operator ()()
92 struct tiny_node : public tbb::flow::composite_node< std::tuple< int >, std::tuple< int > > {
93 tbb::flow::function_node< int, int > f1;
94 tbb::flow::function_node< int, int > f2;
95 typedef tbb::flow::composite_node< std::tuple< int >, std::tuple< int > > base_type;
98 …tiny_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), f1(g, tbb::flow::unlimited, pa… in tiny_node()
99 tbb::flow::make_edge(f1, f2); in tiny_node()
101 std::tuple<tbb::flow::function_node< int, int >& > input_tuple(f1); in tiny_node()
102 std::tuple<tbb::flow::function_node< int, int >& > output_tuple(f2); in tiny_node()
114 tbb::flow::graph g; in test_tiny()
115 tbb::flow::function_node< int, int > f0( g, tbb::flow::unlimited, passthru_body() ); in test_tiny()
117 …CHECK_MESSAGE( (&tbb::flow::input_port<0>(t) == &t.f1), "f1 not bound to input port 0 in composite… in test_tiny()
118 …CHECK_MESSAGE( (&tbb::flow::output_port<0>(t) == &t.f2), "f2 not bound to output port 0 in composi… in test_tiny()
128 …CHECK_MESSAGE( (&tbb::flow::input_port<0>(t2) == &t2.f1), "f1 not bound to input port 0 in composi… in test_tiny()
129 …CHECK_MESSAGE( (&tbb::flow::output_port<0>(t2) == &t2.f2), "f2 not bound to output port 0 in compo… in test_tiny()
131 tbb::flow::function_node< int, int > f3( g, tbb::flow::unlimited, passthru_body() ); in test_tiny()
132 tbb::flow::make_edge( f0, t ); in test_tiny()
133 tbb::flow::make_edge( t, t1 ); in test_tiny()
134 tbb::flow::make_edge( t1, t2 ); in test_tiny()
135 tbb::flow::make_edge( t2 , f3 ); in test_tiny()
136 tbb::flow::queue_node<int> q(g); in test_tiny()
137 tbb::flow::make_edge(f3, q); in test_tiny()
148 tbb::flow::remove_edge(f3, q); in test_tiny()
149 tbb::flow::remove_edge(t2, f3); in test_tiny()
150 tbb::flow::remove_edge(t1, t2); in test_tiny()
152 tbb::flow::make_edge( t1 , f3 ); in test_tiny()
153 tbb::flow::make_edge(f3, q); in test_tiny()
166 class adder_node : public tbb::flow::composite_node< std::tuple< int, int >, std::tuple< int > > {
168 tbb::flow::join_node< std::tuple< int, int >, tbb::flow::queueing > j;
169 tbb::flow::function_node< std::tuple< int, int >, int > f;
171 typedef tbb::flow::composite_node< std::tuple< int, int >, std::tuple< int > > base_type;
180 …adder_node(tbb::flow::graph &g, bool hidden = false) : base_type(g), j(g), f(g, tbb::flow::unlimit… in adder_node()
181 tbb::flow::make_edge( j, f ); in adder_node()
183 …base_type::set_external_ports(base_type::input_ports_type(tbb::flow::input_port<0>(j), tbb::flow::… in adder_node()
199 tbb::flow::graph g; in test_adder()
200 tbb::flow::function_node<int,int> s(g, tbb::flow::unlimited, square_body()); in test_adder()
201 tbb::flow::function_node<int,int> c(g, tbb::flow::unlimited, cube_body()); in test_adder()
202 tbb::flow::function_node<int,int> p(g, tbb::flow::unlimited, passthru_body()); in test_adder()
205 …CHECK_MESSAGE( (&tbb::flow::input_port<0>(a0) == &tbb::flow::input_port<0>(a0.j)), "input_port 0 o… in test_adder()
206 …CHECK_MESSAGE( (&tbb::flow::input_port<1>(a0) == &tbb::flow::input_port<1>(a0.j)), "input_port 1 o… in test_adder()
207 …CHECK_MESSAGE( (&tbb::flow::output_port<0>(a0) == &a0.f), "f not bound to output port 0 in composi… in test_adder()
210 …CHECK_MESSAGE( (&std::get<0>(a0.input_ports()) == &tbb::flow::input_port<0>(a0.j)), "input_port 0 … in test_adder()
211 …CHECK_MESSAGE( (&std::get<1>(a0.input_ports()) == &tbb::flow::input_port<1>(a0.j)), "input_port1 o… in test_adder()
215 …CHECK_MESSAGE( (&tbb::flow::input_port<0>(a2) == &tbb::flow::input_port<0>(a2.j)), "input_port 0 o… in test_adder()
216 …CHECK_MESSAGE( (&tbb::flow::input_port<1>(a2) == &tbb::flow::input_port<1>(a2.j)), "input_port 1 o… in test_adder()
217 …CHECK_MESSAGE( (&tbb::flow::output_port<0>(a2) == &a2.f), "f not bound to output port 0 in composi… in test_adder()
220 …CHECK_MESSAGE( (&std::get<0>(a3.input_ports()) == &tbb::flow::input_port<0>(a3.j)), "input_port 0 … in test_adder()
221 …CHECK_MESSAGE( (&std::get<1>(a3.input_ports()) == &tbb::flow::input_port<1>(a3.j)), "input_port1 o… in test_adder()
224 tbb::flow::function_node<int,int> s2(g, tbb::flow::unlimited, square_body()); in test_adder()
225 tbb::flow::queue_node<int> q(g); in test_adder()
227 tbb::flow::make_edge( s, tbb::flow::input_port<0>(a0) ); in test_adder()
228 tbb::flow::make_edge( c, tbb::flow::input_port<1>(a0) ); in test_adder()
230 tbb::flow::make_edge( c, tbb::flow::input_port<0>(a1) ); in test_adder()
231 tbb::flow::make_edge( c, tbb::flow::input_port<1>(a1) ); in test_adder()
233 tbb::flow::make_edge( tbb::flow::output_port<0>(a0), tbb::flow::input_port<0>(a2) ); in test_adder()
234 tbb::flow::make_edge( tbb::flow::output_port<0>(a1), tbb::flow::input_port<1>(a2) ); in test_adder()
236 tbb::flow::make_edge( tbb::flow::output_port<0>(a2), s2 ); in test_adder()
237 tbb::flow::make_edge( s2, q ); in test_adder()
256 tbb::flow::remove_edge(s2, q); in test_adder()
257 tbb::flow::remove_edge( a2, s2 ); in test_adder()
258 tbb::flow::make_edge( a0, a3 ); in test_adder()
259 tbb::flow::make_edge( a1, tbb::flow::input_port<1>(a3) ); in test_adder()
260 tbb::flow::make_edge( a3, s2 ); in test_adder()
261 tbb::flow::make_edge( s2, q ); in test_adder()
297 tbb::flow::graph g; in test_nested_adder()
298 tbb::flow::composite_node<std::tuple<int, int>, std::tuple<int> > outer_node(g); in test_nested_adder()
299 typedef tbb::flow::composite_node<std::tuple<int, int>, std::tuple<int> > base_type; in test_nested_adder()
300 tbb::flow::broadcast_node<int> input(g); in test_nested_adder()
301 tbb::flow::queue_node<int> output(g); in test_nested_adder()
307 …pe::input_ports_type(tbb::flow::input_port<0>(inner_node1), tbb::flow::input_port<1>(inner_node1))… in test_nested_adder()
309 …CHECK_MESSAGE( (&tbb::flow::input_port<0>(outer_node) == &tbb::flow::input_port<0>(inner_node1)), … in test_nested_adder()
310 …CHECK_MESSAGE( (&tbb::flow::input_port<1>(outer_node) == &tbb::flow::input_port<1>(inner_node1)), … in test_nested_adder()
311 …CHECK_MESSAGE( (&tbb::flow::output_port<0>(outer_node) == &tbb::flow::output_port<0>(inner_node3))… in test_nested_adder()
313 tbb::flow::make_edge(input, tbb::flow::input_port<0>(outer_node)/*inner_node1*/); in test_nested_adder()
314 tbb::flow::make_edge(input, tbb::flow::input_port<1>(outer_node)/*inner_node1*/); in test_nested_adder()
316 tbb::flow::make_edge(inner_node1, tbb::flow::input_port<0>(inner_node2)); in test_nested_adder()
317 tbb::flow::make_edge(inner_node1, tbb::flow::input_port<1>(inner_node2)); in test_nested_adder()
319 tbb::flow::make_edge(inner_node2, tbb::flow::input_port<0>(inner_node3)); in test_nested_adder()
320 tbb::flow::make_edge(inner_node2, tbb::flow::input_port<1>(inner_node3)); in test_nested_adder()
322 tbb::flow::make_edge(outer_node/*inner_node3*/, output); in test_nested_adder()
334 …CHECK_MESSAGE( (tbb::flow::output_port<0>(outer_node).try_get(out) == output.try_get(out)), "outpu… in test_nested_adder()
343 class prefix_node : public tbb::flow::composite_node< std::tuple< T, T, T, T, T >, std::tuple< T, T…
346 tbb::flow::join_node< my_tuple_t, tbb::flow::queueing > j;
347 tbb::flow::split_node< my_tuple_t > s;
349 tbb::flow::function_node< my_tuple_t, my_tuple_t > f;
350 typedef tbb::flow::composite_node< my_tuple_t, my_tuple_t > base_type;
363 …prefix_node(tbb::flow::graph &g, bool hidden = false ) : base_type(g), j(g), s(g), f(g, tbb::flow:… in prefix_node()
364 tbb::flow::make_edge( j, f ); in prefix_node()
365 tbb::flow::make_edge( f, s ); in prefix_node()
367 …type input_tuple(tbb::flow::input_port<0>(j), tbb::flow::input_port<1>(j), tbb::flow::input_port<2… in prefix_node()
369 …e output_tuple(tbb::flow::output_port<0>(s), tbb::flow::output_port<1>(s), tbb::flow::output_port<… in prefix_node()
382 tbb::flow::graph g; in test_prefix()
385 …CHECK_MESSAGE( (&std::get<0>(p.input_ports()) == &tbb::flow::input_port<0>(p.j)), "input port 0 of… in test_prefix()
386 …CHECK_MESSAGE( (&tbb::flow::input_port<1>(p.j) == &tbb::flow::input_port<1>(p.j)), "input port 1 o… in test_prefix()
387 …CHECK_MESSAGE( (&std::get<2>(p.input_ports()) == &tbb::flow::input_port<2>(p.j)), "input port 2 of… in test_prefix()
388 …CHECK_MESSAGE( (&tbb::flow::input_port<3>(p.j) == &tbb::flow::input_port<3>(p.j)), "input port 3 o… in test_prefix()
389 …CHECK_MESSAGE( (&std::get<4>(p.input_ports()) == &tbb::flow::input_port<4>(p.j)), "input port 4 of… in test_prefix()
392 …CHECK_MESSAGE( (&std::get<0>(p.output_ports()) == &tbb::flow::output_port<0>(p.s)), "output port 0… in test_prefix()
393 …CHECK_MESSAGE( (&tbb::flow::output_port<1>(p.s) == &tbb::flow::output_port<1>(p.s)), "output port … in test_prefix()
394 …CHECK_MESSAGE( (&std::get<2>(p.output_ports()) == &tbb::flow::output_port<2>(p.s)), "output port 2… in test_prefix()
395 …CHECK_MESSAGE( (&tbb::flow::output_port<3>(p.s) == &tbb::flow::output_port<3>(p.s)), "output port … in test_prefix()
396 …CHECK_MESSAGE( (&std::get<4>(p.output_ports()) == &tbb::flow::output_port<4>(p.s)), "output port 4… in test_prefix()
398 std::vector< tbb::flow::queue_node<double> > v( 5, tbb::flow::queue_node<double>(g) ); in test_prefix()
399 tbb::flow::make_edge( tbb::flow::output_port<0>(p), v[0] ); in test_prefix()
400 tbb::flow::make_edge( tbb::flow::output_port<1>(p), v[1] ); in test_prefix()
401 tbb::flow::make_edge( tbb::flow::output_port<2>(p), v[2] ); in test_prefix()
402 tbb::flow::make_edge( tbb::flow::output_port<3>(p), v[3] ); in test_prefix()
403 tbb::flow::make_edge( tbb::flow::output_port<4>(p), v[4] ); in test_prefix()
406 tbb::flow::input_port<0>(p).try_put( offset ); in test_prefix()
407 tbb::flow::input_port<1>(p).try_put( offset + 1 ); in test_prefix()
408 tbb::flow::input_port<2>(p).try_put( offset + 2 ); in test_prefix()
409 tbb::flow::input_port<3>(p).try_put( offset + 3 ); in test_prefix()
410 tbb::flow::input_port<4>(p).try_put( offset + 4 ); in test_prefix()
433 tbb::flow::graph g; in input_only_output_only_composite()
435 tbb::flow::composite_node<std::tuple<int>, std::tuple<int> > input_output(g); in input_only_output_only_composite()
437 typedef tbb::flow::composite_node<std::tuple<int>, std::tuple<> > input_only_composite; in input_only_output_only_composite()
438 typedef tbb::flow::composite_node<std::tuple<>, std::tuple<int> > output_only_composite; in input_only_output_only_composite()
440 typedef tbb::flow::input_node<int> src_type; in input_only_output_only_composite()
441 typedef tbb::flow::queue_node<int> q_type; in input_only_output_only_composite()
442 typedef tbb::flow::function_node<int, int> f_type; in input_only_output_only_composite()
443 typedef tbb::flow::sequencer_node<int> sequencer_type; in input_only_output_only_composite()
476 tbb::flow::make_edge(a_out, a_in); in input_only_output_only_composite()
477 tbb::flow::make_edge(f, seq); in input_only_output_only_composite()
478 tbb::flow::make_edge(seq, que); in input_only_output_only_composite()