Lines Matching refs:tbb
41 using tbb::detail::d1::SUCCESSFULLY_ENQUEUED;
42 using tbb::detail::d1::graph_task;
45 struct serial_receiver : public tbb::flow::receiver<T>, utils::NoAssign {
47 tbb::flow::graph& my_graph;
49 serial_receiver(tbb::flow::graph& g) : next_value(T(0)), my_graph(g) {} in serial_receiver()
56 tbb::flow::graph& graph_reference() const override { in graph_reference()
62 struct parallel_receiver : public tbb::flow::receiver<T>, utils::NoAssign {
65 tbb::flow::graph& my_graph;
67 parallel_receiver(tbb::flow::graph& g) : my_graph(g) { my_count = 0; } in parallel_receiver()
74 tbb::flow::graph& graph_reference() const override { in graph_reference()
80 struct empty_sender : public tbb::flow::sender<T> {
81 typedef typename tbb::flow::sender<T>::successor_type successor_type;
91 tbb::flow::limiter_node<T> &my_lim;
94 put_body( tbb::flow::limiter_node<T> &lim, std::atomic<int> &accept_count ) : in put_body()
109 tbb::flow::limiter_node<T> &my_lim;
112 put_dec_body( tbb::flow::limiter_node<T> &lim, std::atomic<int> &accept_count ) : in put_dec_body()
122 my_lim.decrementer().try_put( tbb::flow::continue_msg() ); in operator ()()
130 void test_puts_with_decrements( int num_threads, tbb::flow::limiter_node< T >& lim , tbb::flow::gra… in test_puts_with_decrements()
132 empty_sender< tbb::flow::continue_msg > s; in test_puts_with_decrements()
135 tbb::flow::make_edge( lim, r ); in test_puts_with_decrements()
136 tbb::flow::make_edge(s, lim.decrementer()); in test_puts_with_decrements()
157 tbb::flow::graph g; in test_parallel()
158 tbb::flow::limiter_node< T > lim(g, i); in test_parallel()
162 tbb::flow::make_edge( lim, r ); in test_parallel()
172 tbb::flow::graph g; in test_parallel()
173 tbb::flow::limiter_node< T > lim(g, i); in test_parallel()
175 tbb::flow::limiter_node< T > lim_copy( lim ); in test_parallel()
193 tbb::flow::graph g; in test_serial()
194 tbb::flow::limiter_node< T > lim(g, i); in test_serial()
196 tbb::flow::make_edge( lim, r ); in test_serial()
206 tbb::flow::graph g; in test_serial()
207 tbb::flow::limiter_node< T > lim(g, i); in test_serial()
209 empty_sender< tbb::flow::continue_msg > s; in test_serial()
210 tbb::flow::make_edge( lim, r ); in test_serial()
211 tbb::flow::make_edge(s, lim.decrementer()); in test_serial()
216 lim.decrementer().try_put( tbb::flow::continue_msg() ); in test_serial()
229 typedef tbb::flow::multifunction_node<int, std::tuple<int,tbb::flow::continue_msg> > mfnode_type;
246 if(!std::get<DECREMENT_OUTPUT>(out).try_put(tbb::flow::continue_msg())) { in operator ()()
278 tbb::flow::graph g; in test_multifunction_to_limiter()
285 mfnode_type mf_node(g, tbb::flow::unlimited, mfnode_body(_max, local_cnt)); in test_multifunction_to_limiter()
286 tbb::flow::function_node<int, int> fn_node(g, tbb::flow::unlimited, fn_body()); in test_multifunction_to_limiter()
287 tbb::flow::limiter_node<int> lim_node(g, _nparallel); in test_multifunction_to_limiter()
288 tbb::flow::make_edge(tbb::flow::output_port<LIMITER_OUTPUT>(mf_node), lim_node); in test_multifunction_to_limiter()
289 tbb::flow::make_edge(tbb::flow::output_port<DECREMENT_OUTPUT>(mf_node), lim_node.decrementer()); in test_multifunction_to_limiter()
290 tbb::flow::make_edge(lim_node, fn_node); in test_multifunction_to_limiter()
291 tbb::flow::make_edge(fn_node, mf_node); in test_multifunction_to_limiter()
314 tbb::flow::graph g; in test_continue_msg_reception()
315 tbb::flow::limiter_node<int> ln(g,2); in test_continue_msg_reception()
316 tbb::flow::queue_node<int> qn(g); in test_continue_msg_reception()
317 tbb::flow::make_edge(ln, qn); in test_continue_msg_reception()
318 ln.decrementer().try_put(tbb::flow::continue_msg()); in test_continue_msg_reception()
332 using namespace tbb::flow; in test_reserve_release_messages()
359 tbb::flow::make_edge(limit, output_queue); //putting the successor back in test_reserve_release_messages()
377 tbb::flow::graph g; in test_decrementer()
378 tbb::flow::limiter_node<int, int> limit(g, threshold); in test_decrementer()
379 tbb::flow::queue_node<int> queue(g); in test_decrementer()
400 tbb::flow::limiter_node<int, long long> limit2(g, threshold2); in test_decrementer()
418 tbb::flow::limiter_node<int, long long> limit3(g, threshold3); in test_decrementer()
438 tbb::flow::graph g; in test_try_put_without_successors()
440 tbb::flow::buffer_node<int> bn(g); in test_try_put_without_successors()
441 tbb::flow::limiter_node<int> ln(g, try_put_num); in test_try_put_without_successors()
443 tbb::flow::make_edge(bn, ln); in test_try_put_without_successors()
450 tbb::flow::function_node<int, int> fn(g, tbb::flow::unlimited, in test_try_put_without_successors()
457 tbb::flow::make_edge(ln, fn); in test_try_put_without_successors()
463 tbb::flow::remove_edge(bn, ln); in test_try_put_without_successors()
464 ln.decrementer().try_put(tbb::flow::continue_msg()); in test_try_put_without_successors()
475 using msg_t = tbb::flow::continue_msg; in test_follows_and_precedes_api()
481 <msg_t, tbb::flow::limiter_node<msg_t, msg_t>>(messages_for_follows, 1000); in test_follows_and_precedes_api()
483 <msg_t, tbb::flow::limiter_node<msg_t, msg_t>>(messages_for_precedes, 1000); in test_follows_and_precedes_api()
490 using namespace tbb::flow; in test_deduction_guides()
512 tbb::flow::graph graph{}; in test_decrement_while_try_put_task()
514 tbb::flow::input_node<int> input{ graph, [&](tbb::flow_control & fc) -> int { in test_decrement_while_try_put_task()
519 tbb::flow::limiter_node<int, int> blockingNode{ graph, 1 }; in test_decrement_while_try_put_task()
520 tbb::flow::multifunction_node<int, std::tuple<int>> processing{ graph, tbb::flow::serial, in test_decrement_while_try_put_task()
527 tbb::flow::make_edge(input, blockingNode); in test_decrement_while_try_put_task()
528 tbb::flow::make_edge(blockingNode, processing); in test_decrement_while_try_put_task()
529 tbb::flow::make_edge(processing, blockingNode.decrementer()); in test_decrement_while_try_put_task()
542 tbb::task_arena arena(i);
614 tbb::flow::graph graph;
615 tbb::flow::queue_node<TestLargeStruct> input_node( graph );
616 tbb::flow::function_node<TestLargeStruct> func( graph, tbb::flow::serial,
619 tbb::flow::make_edge( input_node, func );
623 tbb::task_scheduler_handle handle{ tbb::attach{} };
624 tbb::finalize( handle, std::nothrow );