Lines Matching refs:tbb

51     tbb::flow::continue_msg operator()(const T &/*in*/) {  in operator ()()
52 return tbb::flow::continue_msg(); in operator ()()
60 typedef tbb::flow::split_node<std::tuple<int> > snode_type; in TestSplitNode()
61 tbb::flow::graph g; in TestSplitNode()
63 tbb::flow::function_node<int> rcvr(g,tbb::flow::unlimited, receiverBody<int>()); in TestSplitNode()
65 …CHECK_MESSAGE( (tbb::flow::output_port<0>(snode).my_successors.empty()), "Constructed split_node h… in TestSplitNode()
67 tbb::flow::make_edge(tbb::flow::output_port<0>(snode), rcvr); in TestSplitNode()
68 …CHECK_MESSAGE( (!(tbb::flow::output_port<0>(snode).my_successors.empty())), "after make_edge, spli… in TestSplitNode()
72 …CHECK_MESSAGE( (!(tbb::flow::output_port<0>(snode).my_successors.empty())), "after reset(), split_… in TestSplitNode()
73 g.reset(tbb::flow::rf_clear_edges); in TestSplitNode()
74 …CHECK_MESSAGE( (tbb::flow::output_port<0>(snode).my_successors.empty()), "after reset(rf_clear_edg… in TestSplitNode()
82 tbb::flow::graph g; in TestBufferingNode()
84tbb::flow::function_node<int,int,tbb::flow::rejecting> fnode(g, tbb::flow::serial, serial_fn_body<… in TestBufferingNode()
90 tbb::flow::make_edge(bnode, fnode); in TestBufferingNode()
115 tbb::flow::remove_edge(bnode, fnode); in TestBufferingNode()
118 tbb::flow::join_node<std::tuple<int,int>,tbb::flow::reserving> jnode(g); in TestBufferingNode()
119 tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode)); // will spawn a task in TestBufferingNode()
131 g.reset(tbb::flow::rf_clear_edges); in TestBufferingNode()
133 tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode)); // add edge again in TestBufferingNode()
139 g.reset(tbb::flow::rf_clear_edges); in TestBufferingNode()
141 …CHECK_MESSAGE( (tbb::flow::input_port<0>(jnode).my_predecessors.empty()), "predecessor not reset"); in TestBufferingNode()
150 tbb::flow::graph g; in TestContinueNode()
151tbb::flow::function_node<int> fnode0(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0)); in TestContinueNode()
152 tbb::flow::continue_node<int> cnode(g, /*number_of_predecessors*/ 1, in TestContinueNode()
154tbb::flow::function_node<int> fnode1(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state1)); in TestContinueNode()
155 tbb::flow::make_edge(fnode0, cnode); in TestContinueNode()
156 tbb::flow::make_edge(cnode, fnode1); in TestContinueNode()
192 g.reset(tbb::flow::rf_clear_edges); // should be in forward direction again in TestContinueNode()
205 tbb::spin_mutex::scoped_lock l(cnode.my_mutex); in TestContinueNode()
235 tbb::flow::graph g; in TestFunctionNode()
236 tbb::flow::queue_node<int> qnode0(g); in TestFunctionNode()
237tbb::flow::function_node<int,int, tbb::flow::rejecting > fnode0(g, tbb::flow::serial, serial_fn_… in TestFunctionNode()
238tbb::flow::function_node<int,int/*, tbb::flow::queueing*/> fnode1(g, tbb::flow::serial, serial_fn_… in TestFunctionNode()
240 tbb::flow::queue_node<int> qnode1(g); in TestFunctionNode()
242 tbb::flow::make_edge(fnode0, qnode1); in TestFunctionNode()
243 tbb::flow::make_edge(qnode0, fnode0); in TestFunctionNode()
250 tbb::flow::remove_edge(qnode0, fnode0); in TestFunctionNode()
251 tbb::flow::remove_edge(fnode0, qnode1); in TestFunctionNode()
253 tbb::flow::make_edge(fnode1, qnode1); in TestFunctionNode()
254 tbb::flow::make_edge(qnode0, fnode1); in TestFunctionNode()
260 tbb::flow::remove_edge(qnode0, fnode1); in TestFunctionNode()
261 tbb::flow::remove_edge(fnode1, qnode1); in TestFunctionNode()
268 tbb::flow::make_edge(fnode0, qnode1); in TestFunctionNode()
269tbb::flow::make_edge(qnode0, fnode0); // TODO: invesigate why it always creates a forwarding task in TestFunctionNode()
290 tbb::flow::remove_edge(qnode0, fnode0); in TestFunctionNode()
291 tbb::flow::remove_edge(fnode0, qnode1); in TestFunctionNode()
295 tbb::flow::make_edge(fnode1, qnode1); in TestFunctionNode()
307 tbb::flow::remove_edge(qnode0, fnode1); in TestFunctionNode()
308 tbb::flow::remove_edge(fnode1, qnode1); in TestFunctionNode()
316tbb::flow::make_edge(qnode0, fnode0); // TODO: invesigate why it always creates a forwarding task in TestFunctionNode()
337 g.reset(tbb::flow::rf_clear_edges); in TestFunctionNode()
349 tbb::flow::tag_value operator()( TT v) { in operator ()()
350 tbb::flow::tag_value t = tbb::flow::tag_value(v / my_mult); in operator ()()
358 tbb::flow::graph g; in TestSimpleSuccessorArc()
361 tbb::flow::join_node<std::tuple<int>, JNODE_TYPE> qj(g); in TestSimpleSuccessorArc()
362 tbb::flow::broadcast_node<std::tuple<int> > bnode(g); in TestSimpleSuccessorArc()
363 tbb::flow::make_edge(qj, bnode); in TestSimpleSuccessorArc()
367 g.reset(tbb::flow::rf_clear_edges); in TestSimpleSuccessorArc()
374 TestSimpleSuccessorArc<tbb::flow::tag_matching>(const char *name) { in TestSimpleSuccessorArc()
375 tbb::flow::graph g; in TestSimpleSuccessorArc()
379 tbb::flow::join_node<my_tuple, tbb::flow::tag_matching> qj(g, in TestSimpleSuccessorArc()
383 tbb::flow::broadcast_node<my_tuple > bnode(g); in TestSimpleSuccessorArc()
384 tbb::flow::make_edge(qj, bnode); in TestSimpleSuccessorArc()
388 g.reset(tbb::flow::rf_clear_edges); in TestSimpleSuccessorArc()
395 tbb::flow::graph g; in TestJoinNode()
397 TestSimpleSuccessorArc<tbb::flow::queueing>("queueing"); in TestJoinNode()
398 TestSimpleSuccessorArc<tbb::flow::reserving>("reserving"); in TestJoinNode()
399 TestSimpleSuccessorArc<tbb::flow::tag_matching>("tag_matching"); in TestJoinNode()
404 tbb::flow::join_node<std::tuple<int,int>, tbb::flow::reserving> rj(g); in TestJoinNode()
405 tbb::flow::queue_node<int> q0(g); in TestJoinNode()
406 tbb::flow::queue_node<int> q1(g); in TestJoinNode()
407 tbb::flow::make_edge(q0,tbb::flow::input_port<0>(rj)); in TestJoinNode()
408 tbb::flow::make_edge(q1,tbb::flow::input_port<1>(rj)); in TestJoinNode()
411 …CHECK_MESSAGE( (!(tbb::flow::input_port<0>(rj).my_predecessors.empty())),"reversed port missing pr… in TestJoinNode()
412 …CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
414 …CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),"reversed port has pred af… in TestJoinNode()
415 …CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
418 …CHECK_MESSAGE( (!(tbb::flow::input_port<1>(rj).my_predecessors.empty())),"reversed port missing pr… in TestJoinNode()
419 …CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
421 …CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),"reversed port has pred af… in TestJoinNode()
422 …CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
426 …CHECK_MESSAGE( (!(tbb::flow::input_port<1>(rj).my_predecessors.empty())),"reversed port missing pr… in TestJoinNode()
427 …CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
428 g.reset(tbb::flow::rf_clear_edges); in TestJoinNode()
429 …CHECK_MESSAGE( ((tbb::flow::input_port<1>(rj).my_predecessors.empty())),"reversed port has pred af… in TestJoinNode()
430 …CHECK_MESSAGE( ((tbb::flow::input_port<0>(rj).my_predecessors.empty())),"non-reversed port has pre… in TestJoinNode()
439 using type = tbb::flow::limiter_node<int, DecrementerType>;
445 using type = tbb::flow::limiter_node<int>;
446 using dtype = tbb::flow::continue_msg;
459 struct DecrementerHelper<tbb::flow::continue_msg> {
462 auto& d = static_cast<tbb::detail::d1::continue_receiver&>(decrementer); in check()
467 static tbb::flow::continue_msg makeDType() { in makeDType()
468 return tbb::flow::continue_msg(); in makeDType()
475 tbb::flow::graph g; in TestLimiterNode()
481 tbb::flow::queue_node<int> inq(g); in TestLimiterNode()
482 tbb::flow::queue_node<int> outq(g); in TestLimiterNode()
483 tbb::flow::broadcast_node<dtype> bn(g); in TestLimiterNode()
485 tbb::flow::make_edge(inq,ln); in TestLimiterNode()
486 tbb::flow::make_edge(ln,outq); in TestLimiterNode()
487 tbb::flow::make_edge(bn,ln.decrementer()); in TestLimiterNode()
513 g.reset(tbb::flow::rf_clear_edges); in TestLimiterNode()
521 tbb::flow::make_edge(inq,ln); in TestLimiterNode()
522 tbb::flow::make_edge(ln,outq); in TestLimiterNode()
555 struct test_reversal<tbb::flow::queueing, T> {
562 struct test_reversal<tbb::flow::rejecting, T> {
569 typedef tbb::flow::multifunction_node<int, std::tuple<int, int>, P> multinode_type; in TestMultifunctionNode()
573 tbb::flow::graph g; in TestMultifunctionNode()
574 multinode_type mf(g, tbb::flow::serial, mf_body<multinode_type>(serial_fn_state0)); in TestMultifunctionNode()
575 tbb::flow::queue_node<int> qin(g); in TestMultifunctionNode()
576 tbb::flow::queue_node<int> qodd_out(g); in TestMultifunctionNode()
577 tbb::flow::queue_node<int> qeven_out(g); in TestMultifunctionNode()
578 tbb::flow::make_edge(qin,mf); in TestMultifunctionNode()
579 tbb::flow::make_edge(tbb::flow::output_port<0>(mf), qeven_out); in TestMultifunctionNode()
580 tbb::flow::make_edge(tbb::flow::output_port<1>(mf), qodd_out); in TestMultifunctionNode()
601 if (!std::is_same<P, tbb::flow::rejecting>::value) { in TestMultifunctionNode()
606 g.reset(tbb::flow::rf_clear_edges); in TestMultifunctionNode()
607 …CHECK_MESSAGE( (tbb::flow::output_port<0>(mf).my_successors.empty()), "output_port<0> not reset (r… in TestMultifunctionNode()
608 …CHECK_MESSAGE( (tbb::flow::output_port<1>(mf).my_successors.empty()), "output_port<1> not reset (r… in TestMultifunctionNode()
624 tbb::flow::graph g; in TestIndexerNode()
625 typedef tbb::flow::indexer_node< int, int > indexernode_type; in TestIndexerNode()
628 tbb::flow::queue_node<indexernode_type::output_type> qout(g); in TestIndexerNode()
629 tbb::flow::make_edge(inode,qout); in TestIndexerNode()
634 g.reset(tbb::flow::rf_clear_edges); in TestIndexerNode()
642 tbb::flow::graph g; in TestScalarNode()
644 tbb::flow::queue_node<int> qout(g); in TestScalarNode()
646 tbb::flow::make_edge(on,qout); in TestScalarNode()
651 g.reset(tbb::flow::rf_clear_edges); in TestScalarNode()
664 tbb::flow::graph g; in TestSequencerNode()
665 tbb::flow::sequencer_node<int> bnode(g, seq_body()); in TestSequencerNode()
667tbb::flow::function_node<int> fnode(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0)); in TestSequencerNode()
671 tbb::flow::make_edge(bnode, fnode); in TestSequencerNode()
685 tbb::flow::remove_edge(bnode, fnode); in TestSequencerNode()
687 tbb::flow::join_node<std::tuple<int,int>,tbb::flow::reserving> jnode(g); in TestSequencerNode()
688 tbb::flow::make_edge(bnode, tbb::flow::input_port<0>(jnode)); // will spawn a task in TestSequencerNode()
700 g.reset(tbb::flow::rf_clear_edges); // should be in forward direction again in TestSequencerNode()
711 int operator()(tbb::flow_control& fc) { in operator ()()
721 tbb::flow::graph g; in TestInputNode()
722 tbb::flow::input_node<int> in(g, snode_body(4)); in TestInputNode()
724 tbb::flow::queue_node<int> qin(g); in TestInputNode()
725 tbb::flow::join_node<std::tuple<int,int>, tbb::flow::reserving> jn(g); in TestInputNode()
726 tbb::flow::queue_node<std::tuple<int,int> > qout(g); in TestInputNode()
729 tbb::flow::make_edge(in, tbb::flow::input_port<0>(jn)); in TestInputNode()
730 tbb::flow::make_edge(qin, tbb::flow::input_port<1>(jn)); in TestInputNode()
731 tbb::flow::make_edge(jn,qout); in TestInputNode()
737 g.reset(tbb::flow::rf_clear_edges); in TestInputNode()
739 tbb::flow::make_edge(in, tbb::flow::input_port<0>(jn)); in TestInputNode()
740 tbb::flow::make_edge(qin, tbb::flow::input_port<1>(jn)); in TestInputNode()
741 tbb::flow::make_edge(jn,qout); in TestInputNode()
750 …CHECK_MESSAGE( (tbb::flow::input_port<0>(jn).my_predecessors.empty()), "successor of input_node ha… in TestInputNode()
759 tbb::task_arena arena(MinThread);
763 TestBufferingNode< tbb::flow::buffer_node<int> >("buffer_node"); in __anon8a33875c0902()
764 TestBufferingNode< tbb::flow::priority_queue_node<int> >("priority_queue_node"); in __anon8a33875c0902()
765 TestBufferingNode< tbb::flow::queue_node<int> >("queue_node"); in __anon8a33875c0902()
780 TestMultifunctionNode<tbb::flow::rejecting>();
786 TestMultifunctionNode<tbb::flow::queueing>();
819 TestLimiterNode<tbb::flow::continue_msg>();
837 TestScalarNode<tbb::flow::broadcast_node<int> >("broadcast_node");
838 TestScalarNode<tbb::flow::overwrite_node<int> >("overwrite_node");
839 TestScalarNode<tbb::flow::write_once_node<int> >("write_once_node");
845 tbb::flow::graph g;
847 tbb::flow::input_node<int> src(g, [&](tbb::flow_control& fc) { fc.stop(); return 0;}); in __anon8a33875c0a02()
861 tbb::flow::graph g;
863 tbb::flow::continue_node<int> c(g, [](const tbb::flow::continue_msg&){ return 1; }); in __anon8a33875c0b02()
865tbb::flow::function_node<int, int> f(g, tbb::flow::serial, serial_fn_body<int>(serial_fn_state0));
867 c.try_put(tbb::flow::continue_msg());
878 tbb::flow::graph g;
880 tbb::flow::queue_node<int> q(g);
882 tbb::flow::overwrite_node<int> on(g);
898 tbb::flow::graph g;
899 const tbb::flow::graph cg;
901 tbb::flow::graph::iterator b = g.begin();
902 tbb::flow::graph::iterator b2 = g.begin();
905 tbb::flow::graph::iterator* volatile b2_ptr = &b2;
914 using namespace tbb::flow;
927 using namespace tbb::flow;
950 using namespace tbb::flow;