21 #ifndef __TBB_flow_graph_H 22 #define __TBB_flow_graph_H 38 #if __TBB_PREVIEW_ASYNC_MSG 43 #if __TBB_PREVIEW_STREAMING_NODE 46 #include <unordered_map> 47 #include <type_traits> 48 #endif // __TBB_PREVIEW_STREAMING_NODE 50 #if TBB_DEPRECATED_FLOW_ENQUEUE 51 #define FLOW_SPAWN(a) tbb::task::enqueue((a)) 53 #define FLOW_SPAWN(a) tbb::task::spawn((a)) 57 #if __TBB_CPP11_TUPLE_PRESENT 62 using std::tuple_size;
63 using std::tuple_element;
68 #include "compat/tuple" 90 namespace interface10 {
113 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 117 class edge_container {
120 typedef std::list<C *, tbb::tbb_allocator<C *> > edge_list_type;
122 void add_edge(C &
s) {
123 built_edges.push_back(&
s);
126 void delete_edge(C &
s) {
127 for (
typename edge_list_type::iterator i = built_edges.begin(); i != built_edges.end(); ++i) {
135 void copy_edges(edge_list_type &v) {
139 size_t edge_count() {
140 return (
size_t)(built_edges.size());
149 template<
typename S >
void sender_extract(
S &
s);
150 template<
typename R >
void receiver_extract(R &r);
153 edge_list_type built_edges;
168 namespace interface10 {
173 if (right == NULL)
return left;
175 if (left == NULL)
return right;
186 #if __TBB_PREVIEW_ASYNC_MSG 194 template<
typename T,
typename =
void >
202 return static_cast<const void*>(&t);
206 return static_cast<void*>(&t);
210 return *static_cast<const T*>(
p);
214 return *static_cast<T*>(
p);
235 template<
typename T >
303 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 304 typedef internal::edge_container<successor_type> built_successors_type;
306 typedef built_successors_type::edge_list_type successor_list_type;
307 virtual built_successors_type &built_successors() = 0;
310 virtual void copy_successors( successor_list_type &) = 0;
311 virtual size_t successor_count() = 0;
315 template<
typename X >
321 template<
typename X >
330 class untyped_receiver {
338 #if __TBB_PREVIEW_OPENCL_NODE 352 if (!res)
return false;
367 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 368 typedef internal::edge_container<predecessor_type> built_predecessors_type;
369 typedef built_predecessors_type::edge_list_type predecessor_list_type;
370 virtual built_predecessors_type &built_predecessors() = 0;
373 virtual void copy_predecessors( predecessor_list_type & ) = 0;
374 virtual size_t predecessor_count() = 0;
397 template<
typename T >
418 __TBB_ASSERT(
false,
"async_msg interface does not support 'pull' protocol in try_get()");
428 __TBB_ASSERT(
false,
"async_msg interface does not support 'pull' protocol in try_reserve()");
434 template<
typename T >
463 #else // __TBB_PREVIEW_ASYNC_MSG 466 template<
typename T >
486 virtual bool try_get( T & ) {
return false; }
497 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 498 typedef typename internal::edge_container<successor_type> built_successors_type;
500 typedef typename built_successors_type::edge_list_type successor_list_type;
501 virtual built_successors_type &built_successors() = 0;
503 virtual void internal_delete_built_successor(
successor_type & ) = 0;
504 virtual void copy_successors( successor_list_type &) = 0;
505 virtual size_t successor_count() = 0;
510 template<
typename T >
525 if (!res)
return false;
546 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 547 typedef typename internal::edge_container<predecessor_type> built_predecessors_type;
548 typedef typename built_predecessors_type::edge_list_type predecessor_list_type;
549 virtual built_predecessors_type &built_predecessors() = 0;
552 virtual void copy_predecessors( predecessor_list_type & ) = 0;
553 virtual size_t predecessor_count() = 0;
564 #if __TBB_PREVIEW_OPENCL_NODE 569 #endif // __TBB_PREVIEW_ASYNC_MSG 614 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 615 typedef internal::edge_container<predecessor_type> built_predecessors_type;
616 typedef built_predecessors_type::edge_list_type predecessor_list_type;
617 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
621 my_built_predecessors.add_edge(
s );
626 my_built_predecessors.delete_edge(
s);
631 my_built_predecessors.copy_edges(v);
636 return my_built_predecessors.edge_count();
658 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 661 built_predecessors_type my_built_predecessors;
675 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 676 my_built_predecessors.clear();
693 #if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING 694 template <
typename K,
typename T>
711 namespace interface10 {
716 #if __TBB_PREVIEW_ASYNC_MSG 721 template <
typename C,
typename N>
724 if (
begin) current_node = my_graph->my_nodes;
728 template <
typename C,
typename N>
731 return *operator->();
734 template <
typename C,
typename N>
739 template <
typename C,
typename N>
741 if (current_node) current_node = current_node->next;
745 inline graph::graph() : my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
758 my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
759 prepare_task_arena();
762 my_root_task->set_ref_count(1);
847 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 848 inline void graph::set_name(
const char *
name) {
864 template <
typename Output >
876 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 882 template<
typename Body >
909 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 931 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1020 template<
typename Body>
1026 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1093 return (
new ( task::allocate_additional_child_of( *(this->
my_graph.
root_task()) ) )
1121 template <
typename Input,
typename Output = continue_msg,
typename Policy = queueing,
typename Allocator=cache_aligned_allocator<Input> >
1131 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1132 typedef typename input_impl_type::predecessor_list_type predecessor_list_type;
1133 typedef typename fOutput_type::successor_list_type successor_list_type;
1141 template<
typename Body >
1159 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1165 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1168 successors().built_successors().sender_extract(*
this);
1195 template <
typename Input,
typename Output,
typename Policy = queueing,
typename Allocator=cache_aligned_allocator<Input> >
1201 typename internal::wrap_tuple_elements<
1202 tbb::flow::tuple_size<Output>::value,
1203 internal::multifunction_output,
1221 template<
typename Body>
1226 tbb::internal::fgt_multioutput_node_with_body<N>(
1227 tbb::internal::FLOW_MULTIFUNCTION_NODE,
1235 tbb::internal::fgt_multioutput_node_with_body<N>( tbb::internal::FLOW_MULTIFUNCTION_NODE,
1240 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1246 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1249 base_type::extract();
1259 template<
typename TupleType,
typename Allocator=cache_aligned_allocator<TupleType> >
1266 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1268 typedef typename base_type::predecessor_list_type predecessor_list_type;
1270 typedef typename predecessor_cache_type::built_predecessors_type built_predecessors_type;
1281 tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->
my_graph,
1286 tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->
my_graph,
1290 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1314 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1328 built_predecessors_type &built_predecessors()
__TBB_override {
return my_predessors; }
1331 built_predecessors_type my_predessors;
1339 template <
typename Output,
typename Policy =
internal::Policy<
void> >
1351 template <
typename Body >
1362 template <
typename Body >
1364 graph &g,
int number_of_predecessors,
1382 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1388 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1390 input_impl_type::my_built_predecessors.receiver_extract(*
this);
1391 successors().built_successors().sender_extract(*
this);
1410 template <
typename T>
1417 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1423 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1424 internal::edge_container<predecessor_type> my_built_predecessors;
1444 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1462 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1485 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
1489 my_built_predecessors.add_edge(
p);
1494 my_built_predecessors.delete_edge(
p);
1499 return my_built_predecessors.edge_count();
1502 void copy_predecessors(predecessor_list_type &v)
__TBB_override {
1504 my_built_predecessors.copy_edges(v);
1508 my_built_predecessors.receiver_extract(*
this);
1533 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1534 my_built_predecessors.clear();
1542 template <
typename T,
typename A=cache_aligned_allocator<T> >
1550 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1558 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1559 internal::edge_container<predecessor_type> my_built_predecessors;
1565 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1566 , add_blt_succ, del_blt_succ,
1567 add_blt_pred, del_blt_pred,
1568 blt_succ_cnt, blt_pred_cnt,
1569 blt_succ_cpy, blt_pred_cpy
1574 class buffer_operation :
public internal::aggregated_operation< buffer_operation > {
1577 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1584 successor_list_type *svec;
1585 predecessor_list_type *pvec;
1594 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1597 ,
elem(const_cast<T*>(&e)) ,
ltask(NULL)
1604 typedef internal::aggregating_functor<class_type, buffer_operation>
handler_type;
1612 template<
typename derived_type>
1614 __TBB_ASSERT(static_cast<class_type*>(derived) ==
this,
"'this' is not a base class for derived");
1616 buffer_operation *tmp = NULL;
1617 bool try_forwarding =
false;
1620 op_list = op_list->next;
1621 switch (tmp->type) {
1630 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1632 case add_blt_succ: internal_add_built_succ(tmp);
break;
1633 case del_blt_succ: internal_del_built_succ(tmp);
break;
1634 case add_blt_pred: internal_add_built_pred(tmp);
break;
1635 case del_blt_pred: internal_del_built_pred(tmp);
break;
1636 case blt_succ_cnt: internal_succ_cnt(tmp);
break;
1637 case blt_pred_cnt: internal_pred_cnt(tmp);
break;
1638 case blt_succ_cpy: internal_copy_succs(tmp);
break;
1639 case blt_pred_cpy: internal_copy_preds(tmp);
break;
1648 forwarder_busy =
true;
1663 return op_data.ltask;
1678 task *last_task = NULL;
1681 op_data.ltask = NULL;
1704 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1709 virtual void internal_add_built_succ(buffer_operation *op) {
1714 virtual void internal_del_built_succ(buffer_operation *op) {
1721 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
1723 virtual void internal_add_built_pred(buffer_operation *op) {
1724 my_built_predecessors.add_edge(*(op->p));
1728 virtual void internal_del_built_pred(buffer_operation *op) {
1729 my_built_predecessors.delete_edge(*(op->p));
1733 virtual void internal_succ_cnt(buffer_operation *op) {
1738 virtual void internal_pred_cnt(buffer_operation *op) {
1739 op->cnt_val = my_built_predecessors.edge_count();
1743 virtual void internal_copy_succs(buffer_operation *op) {
1748 virtual void internal_copy_preds(buffer_operation *op) {
1749 my_built_predecessors.copy_edges(*(op->pvec));
1778 template<
typename derived_type>
1780 __TBB_ASSERT(static_cast<class_type*>(derived) ==
this,
"'this' is not a base class for derived");
1782 if (this->my_reserved || !derived->is_item_valid()) {
1784 this->forwarder_busy =
false;
1788 task * last_task = NULL;
1790 for (; counter > 0 && derived->is_item_valid(); --counter)
1791 derived->try_put_and_add_task(last_task);
1793 op->ltask = last_task;
1794 if (last_task && !counter) {
1857 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1877 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1879 buffer_operation op_data(add_blt_succ);
1885 buffer_operation op_data(del_blt_succ);
1891 buffer_operation op_data(add_blt_pred);
1897 buffer_operation op_data(del_blt_pred);
1903 buffer_operation op_data(blt_pred_cnt);
1905 return op_data.cnt_val;
1909 buffer_operation op_data(blt_succ_cnt);
1911 return op_data.cnt_val;
1914 void copy_predecessors( predecessor_list_type &v )
__TBB_override {
1915 buffer_operation op_data(blt_pred_cpy);
1921 buffer_operation op_data(blt_succ_cpy);
1932 r.remove_predecessor(*
this);
1977 buffer_operation op_data(
con_res);
2014 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2017 my_built_predecessors.receiver_extract(*
this);
2028 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2029 my_built_predecessors.clear();
2037 template <
typename T,
typename A=cache_aligned_allocator<T> >
2110 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2123 template<
typename T,
typename A=cache_aligned_allocator<T> >
2135 template<
typename Sequencer >
2137 my_sequencer(new internal::function_body_leaf< T, size_t, Sequencer>(
s) ) {
2154 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2166 size_type tag = (*my_sequencer)(*(op->elem));
2167 #if !TBB_DEPRECATED_SEQUENCER_DUPLICATES 2175 size_t new_tail = (tag+1 > this->
my_tail) ? tag+1 : this->
my_tail;
2189 template<
typename T,
typename Compare = std::less<T>,
typename A=cache_aligned_allocator<T> >
2213 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2247 if ( this->my_reserved ==
true || this->
my_tail == 0 ) {
2252 *(op->elem) =
prio();
2260 if (this->my_reserved ==
true || this->
my_tail == 0) {
2264 this->my_reserved =
true;
2265 *(op->elem) =
prio();
2273 this->my_reserved =
false;
2280 this->my_reserved =
false;
2364 size_type cur_pos =
mark;
2381 while (child <
mark) {
2394 child = (cur_pos<<1)+1;
2403 template<
typename T >
2410 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2440 bool reserved =
false;
2536 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2561 r.remove_predecessor(*
this);
2566 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2594 void copy_predecessors(predecessor_list_type &v)
__TBB_override {
2645 rtask =
new ( task::allocate_additional_child_of( *(this->
my_graph.
root_task()) ) )
2687 template<
typename OutputTuple,
typename JP=queueing>
class join_node;
2689 template<
typename OutputTuple>
2698 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph,
2702 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph,
2706 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2714 template<
typename OutputTuple>
2723 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph,
2727 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph,
2731 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2741 template<
typename OutputTuple,
typename K,
typename KHash>
2743 key_matching_port, OutputTuple, key_matching<K,KHash> > {
2751 #if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING 2755 template<
typename __TBB_B0,
typename __TBB_B1>
2757 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2760 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2>
2762 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2765 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3>
2767 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2770 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4>
2771 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4) :
2773 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2776 #if __TBB_VARIADIC_MAX >= 6 2777 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2779 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5) :
2781 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2785 #if __TBB_VARIADIC_MAX >= 7 2786 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2787 typename __TBB_B5,
typename __TBB_B6>
2788 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6) :
2790 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2794 #if __TBB_VARIADIC_MAX >= 8 2795 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2796 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7>
2797 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,
2798 __TBB_B7 b7) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) {
2799 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2803 #if __TBB_VARIADIC_MAX >= 9 2804 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2805 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7,
typename __TBB_B8>
2806 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,
2807 __TBB_B7 b7, __TBB_B8 b8) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) {
2808 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2812 #if __TBB_VARIADIC_MAX >= 10 2813 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2814 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7,
typename __TBB_B8,
typename __TBB_B9>
2815 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6,
2816 __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9) {
2817 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2822 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2826 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2838 template<
typename T0,
typename T1=null_type,
typename T2=null_type,
typename T3=null_type,
2839 typename T4=null_type,
typename T5=null_type,
typename T6=null_type,
2843 template<
typename T0>
2846 static const int N = 1;
2852 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2857 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2861 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2868 template<
typename T0,
typename T1>
2871 static const int N = 2;
2877 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2882 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2886 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2893 template<
typename T0,
typename T1,
typename T2>
2896 static const int N = 3;
2902 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2907 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2911 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2918 template<
typename T0,
typename T1,
typename T2,
typename T3>
2921 static const int N = 4;
2927 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2932 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2936 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2943 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4>
2946 static const int N = 5;
2952 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2957 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2961 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2968 #if __TBB_VARIADIC_MAX >= 6 2969 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
2970 class indexer_node<T0, T1, T2, T3, T4, T5> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5> > {
2972 static const int N = 6;
2978 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2983 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2987 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2993 #endif //variadic max 6 2995 #if __TBB_VARIADIC_MAX >= 7 2996 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
2998 class indexer_node<T0, T1, T2, T3, T4, T5, T6> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5, T6> > {
3000 static const int N = 7;
3006 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3011 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3015 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3021 #endif //variadic max 7 3023 #if __TBB_VARIADIC_MAX >= 8 3024 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3025 typename T6,
typename T7>
3026 class indexer_node<T0, T1, T2, T3, T4, T5, T6, T7> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5, T6, T7> > {
3028 static const int N = 8;
3034 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3039 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3043 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3049 #endif //variadic max 8 3051 #if __TBB_VARIADIC_MAX >= 9 3052 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3053 typename T6,
typename T7,
typename T8>
3054 class indexer_node<T0, T1, T2, T3, T4, T5, T6, T7, T8> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8> > {
3056 static const int N = 9;
3062 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3067 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3071 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3077 #endif //variadic max 9 3079 #if __TBB_VARIADIC_MAX >= 10 3080 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3081 typename T6,
typename T7,
typename T8,
typename T9>
3084 static const int N = 10;
3086 typedef tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
InputTuple;
3087 typedef typename internal::tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> output_type;
3090 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3095 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3099 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3105 #endif //variadic max 10 3107 #if __TBB_PREVIEW_ASYNC_MSG 3110 template<
typename T >
3113 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3114 s.internal_add_built_predecessor(
p);
3115 p.internal_add_built_successor(
s);
3117 p.register_successor(
s );
3122 template<
typename T >
3127 #if __TBB_PREVIEW_ASYNC_MSG 3128 template<
typename TS,
typename TR,
3135 template<
typename T >
3140 template<
typename T >
3145 #endif // __TBB_PREVIEW_ASYNC_MSG 3147 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3149 template<
typename T,
typename V,
3150 typename =
typename T::output_ports_type,
typename =
typename V::input_ports_type >
3152 make_edge(get<0>(output.output_ports()), get<0>(input.input_ports()));
3156 template<
typename T,
typename R,
3157 typename =
typename T::output_ports_type >
3159 make_edge(get<0>(output.output_ports()), input);
3163 template<
typename S,
typename V,
3164 typename =
typename V::input_ports_type >
3166 make_edge(output, get<0>(input.input_ports()));
3170 #if __TBB_PREVIEW_ASYNC_MSG 3173 template<
typename T >
3176 p.remove_successor(
s );
3177 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3179 p.internal_delete_built_successor(
s);
3180 s.internal_delete_built_predecessor(
p);
3186 template<
typename T >
3191 #if __TBB_PREVIEW_ASYNC_MSG 3192 template<
typename TS,
typename TR,
3199 template<
typename T >
3204 template<
typename T >
3208 #endif // __TBB_PREVIEW_ASYNC_MSG 3210 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3212 template<
typename T,
typename V,
3213 typename =
typename T::output_ports_type,
typename =
typename V::input_ports_type >
3215 remove_edge(get<0>(output.output_ports()), get<0>(input.input_ports()));
3219 template<
typename T,
typename R,
3220 typename =
typename T::output_ports_type >
3222 remove_edge(get<0>(output.output_ports()), input);
3225 template<
typename S,
typename V,
3226 typename =
typename V::input_ports_type >
3232 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3233 template<
typename C >
3234 template<
typename S >
3235 void internal::edge_container<C>::sender_extract(
S &
s ) {
3236 edge_list_type e = built_edges;
3237 for (
typename edge_list_type::iterator i = e.begin(); i != e.end(); ++i ) {
3242 template<
typename C >
3243 template<
typename R >
3244 void internal::edge_container<C>::receiver_extract( R &r ) {
3245 edge_list_type e = built_edges;
3246 for (
typename edge_list_type::iterator i = e.begin(); i != e.end(); ++i ) {
3253 template<
typename Body,
typename Node >
3255 return n.template copy_function_object<Body>();
3258 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3263 template<
typename... InputTypes,
typename... OutputTypes>
3274 static const size_t NUM_INPUTS =
sizeof...(InputTypes);
3275 static const size_t NUM_OUTPUTS =
sizeof...(OutputTypes);
3281 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3292 template<
typename T1,
typename T2>
3296 my_input_ports = tbb::internal::make_unique<input_ports_type>(std::forward<T1>(input_ports_tuple));
3297 my_output_ports = tbb::internal::make_unique<output_ports_type>(std::forward<T2>(output_ports_tuple));
3303 template<
typename... NodeTypes >
3306 template<
typename... NodeTypes >
3309 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3316 __TBB_ASSERT(my_input_ports,
"input ports not set, call set_external_ports to set input ports");
3317 return *my_input_ports;
3321 __TBB_ASSERT(my_output_ports,
"output ports not set, call set_external_ports to set output ports");
3322 return *my_output_ports;
3325 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3327 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3333 template<
typename... InputTypes>
3340 static const size_t NUM_INPUTS =
sizeof...(InputTypes);
3346 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3357 template<
typename T>
3361 my_input_ports = tbb::internal::make_unique<input_ports_type>(std::forward<T>(input_ports_tuple));
3366 template<
typename... NodeTypes >
3369 template<
typename... NodeTypes >
3372 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3379 __TBB_ASSERT(my_input_ports,
"input ports not set, call set_external_ports to set input ports");
3380 return *my_input_ports;
3383 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3385 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3392 template<
typename... OutputTypes>
3399 static const size_t NUM_OUTPUTS =
sizeof...(OutputTypes);
3405 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3416 template<
typename T>
3420 my_output_ports = tbb::internal::make_unique<output_ports_type>(std::forward<T>(output_ports_tuple));
3425 template<
typename... NodeTypes >
3428 template<
typename... NodeTypes >
3431 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3438 __TBB_ASSERT(my_output_ports,
"output ports not set, call set_external_ports to set output ports");
3439 return *my_output_ports;
3442 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3444 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3450 #endif // __TBB_FLOW_GRAPH_CPP11_FEATURES 3452 namespace internal {
3454 template<
typename Gateway>
3468 template<
typename Input,
typename Ports,
typename Gateway,
typename Body>
3490 template <
typename Input,
typename Output,
3556 template<
typename Body>
3564 tbb::internal::fgt_multioutput_node_with_body<1>(
3565 tbb::internal::FLOW_ASYNC_NODE,
3572 static_cast<async_body_base_type*>(this->my_body->get_body_ptr())->set_gateway(&
my_gateway);
3573 static_cast<async_body_base_type*>(this->my_init_body->get_body_ptr())->set_gateway(&
my_gateway);
3575 tbb::internal::fgt_multioutput_node_with_body<1>( tbb::internal::FLOW_ASYNC_NODE,
3584 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3594 return internal::output_port<0>(*this).register_successor(r);
3599 return internal::output_port<0>(*this).remove_successor(r);
3602 template<
typename Body>
3606 mfn_body_type &body_ref = *this->
my_body;
3608 return ab.get_body();
3611 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3612 typedef typename internal::edge_container<successor_type> built_successors_type;
3614 typedef typename built_successors_type::edge_list_type successor_list_type;
3616 return internal::output_port<0>(*this).built_successors();
3620 internal::output_port<0>(*this).internal_add_built_successor(r);
3624 internal::output_port<0>(*this).internal_delete_built_successor(r);
3628 internal::output_port<0>(*this).copy_successors(l);
3632 return internal::output_port<0>(*this).successor_count();
3643 #if __TBB_PREVIEW_STREAMING_NODE 3645 #endif // __TBB_PREVIEW_STREAMING_NODE 3650 namespace interface10a {
3652 using namespace interface10;
3653 namespace internal = interface10::internal;
3655 template<
typename T >
3662 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3686 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3696 bool ret =
s.try_put( my_buffer );
3705 task *rtask =
new ( task::allocate_additional_child_of( *( my_graph.root_task() ) ) )
3722 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3723 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
3724 built_successors_type &built_successors()
__TBB_override {
return my_successors.built_successors(); }
3726 void internal_add_built_successor( successor_type &
s)
__TBB_override {
3728 my_successors.internal_add_built_successor(
s);
3731 void internal_delete_built_successor( successor_type &
s)
__TBB_override {
3733 my_successors.internal_delete_built_successor(
s);
3738 return my_successors.successor_count();
3743 my_successors.copy_successors(v);
3746 void internal_add_built_predecessor( predecessor_type &
p)
__TBB_override {
3748 my_built_predecessors.add_edge(
p);
3751 void internal_delete_built_predecessor( predecessor_type &
p)
__TBB_override {
3753 my_built_predecessors.delete_edge(
p);
3758 return my_built_predecessors.edge_count();
3761 void copy_predecessors( predecessor_list_type &v )
__TBB_override {
3763 my_built_predecessors.copy_edges(v);
3767 my_buffer_is_valid =
false;
3768 built_successors().sender_extract(*
this);
3769 built_predecessors().receiver_extract(*
this);
3776 if ( my_buffer_is_valid ) {
3796 return my_buffer_is_valid;
3801 my_buffer_is_valid =
false;
3811 return try_put_task_impl(v);
3816 my_buffer_is_valid =
true;
3830 o(owner),
s(succ) {};
3833 if (!
s.register_predecessor(o)) {
3834 o.register_successor(
s);
3845 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3846 internal::edge_container<predecessor_type> my_built_predecessors;
3853 my_buffer_is_valid =
false;
3855 my_successors.
clear();
3860 template<
typename T >
3883 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3895 return this->my_buffer_is_valid ? NULL : this->try_put_task_impl(v);
3905 using interface10::graph;
3906 using interface10::graph_node;
3907 using interface10::continue_msg;
3909 using interface10::source_node;
3910 using interface10::function_node;
3911 using interface10::multifunction_node;
3912 using interface10::split_node;
3914 using interface10::indexer_node;
3915 using interface10::internal::tagged_msg;
3918 using interface10::continue_node;
3919 using interface10a::overwrite_node;
3920 using interface10a::write_once_node;
3921 using interface10::broadcast_node;
3922 using interface10::buffer_node;
3923 using interface10::queue_node;
3924 using interface10::sequencer_node;
3925 using interface10::priority_queue_node;
3926 using interface10::limiter_node;
3927 using namespace interface10::internal::graph_policy_namespace;
3928 using interface10::join_node;
3934 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3935 using interface10::composite_node;
3937 using interface10::async_node;
3938 #if __TBB_PREVIEW_ASYNC_MSG 3939 using interface10::async_msg;
3941 #if __TBB_PREVIEW_STREAMING_NODE 3943 using interface10::streaming_node;
3944 #endif // __TBB_PREVIEW_STREAMING_NODE 3945 #if __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES 3954 #undef __TBB_PFG_RESET_ARG 3957 #endif // __TBB_flow_graph_H
input_type & input_ports()
field of type K being used for matching.
receiver< input_type >::predecessor_type predecessor_type
receiver< input_type >::predecessor_type predecessor_type
The predecessor type for this node.
leaf for multifunction. OutputSet can be a std::tuple or a vector.
receiver_type::predecessor_type predecessor_type
Forwards messages in priority order.
virtual bool register_successor(successor_type &r)=0
Add a new successor to this node.
async_node(const async_node &other)
Implements methods for a function node that takes a type Input as input.
bool try_reserve(T &v) __TBB_override
Reserves an item.
void reset_node(reset_flags f) __TBB_override
A cache of successors that are put in a round-robin fashion.
bool place_item(size_t here, const item_type &me)
GraphNodeType & reference
void reset_node(reset_flags f) __TBB_override
resets the source_node to its initial state
static void fgt_async_commit(void *, void *)
buffer_node< T, A > base_type
Implements methods for a function node that takes a type Input as input and sends.
static tbb::task *const SUCCESSFULLY_ENQUEUED
static void * to_void_ptr(T &t)
Base class for tasks generated by graph nodes.
task * try_put_task(const T &v) __TBB_override
Put item to successor; return task to run the successor if possible.
static void fgt_async_reserve(void *, void *)
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3)
bool try_get(input_type &v) __TBB_override
Request an item from the sender.
internal::continue_input< Output, Policy > input_impl_type
async_storage_ptr my_storage
receiver< input_type >::predecessor_type predecessor_type
Input and scheduling for a function node that takes a type Input as input.
bool remove_successor(successor_type &r) __TBB_override
Removes a successor.
virtual source_body * clone()=0
virtual task * try_put_task(const T &t)=0
Put item to successor; return task to run the successor if possible.
void add_task_to_graph_reset_list(graph &g, tbb::task *tp)
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8 > output_type
function_node(graph &g, size_t concurrency,)
Constructor.
buffer_node(graph &g)
Constructor.
void reset_node(reset_flags f) __TBB_override
bool register_predecessor(predecessor_type &src) __TBB_override
Adds src to the list of cached predecessors.
task * try_put_task(const T &t) __TBB_override
receive an item, return a task *if possible
void spawn_put()
Spawns a task that applies the body.
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
const_iterator cend() const
end const iterator
static void fgt_make_edge(void *, void *)
graph & graph_reference() __TBB_override
output_ports_type & output_ports()
void internal_consume(prio_operation *op) __TBB_override
tbb::spin_mutex nodelist_mutex
T input_type
The input type of this receiver.
void reset_node(reset_flags f) __TBB_override
Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
virtual task * try_put_task_wrapper(const void *p, bool is_async)=0
A task that calls a node's forward_task function.
gateway_type * my_gateway
bool push_back(item_type &v)
pointer operator->() const
Dereference.
internal::aggregating_functor< class_type, buffer_operation > handler_type
void internal_consume(queue_operation *op) __TBB_override
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
receiver_gateway_impl(async_node *node)
bool pop_back(item_type &v)
#define __TBB_STATIC_ASSERT(condition, msg)
indexer_node(const indexer_node &other)
void reset_function_input(reset_flags f)
void fgt_multiinput_multioutput_node_desc(const NodeType *, const char *)
receiver< input_type > receiver_type
bool enqueue_forwarding_task(buffer_operation &op_data)
indexer_node(const indexer_node &other)
Body copy_function_object()
task * decrement_counter()
graph_iterator()
Default constructor.
void handle_operations_impl(buffer_operation *op_list, derived_type *derived)
tbb::flow::tuple< sender< OutputTypes > &... > output_ports_type
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
join_node(const join_node &other)
bool try_put(const typename internal::async_helpers< T >::filtered_type &t)
Put an item to the receiver.
continue_msg input_type
The input type.
void swap_items(size_t i, size_t j)
virtual bool remove_predecessor(predecessor_type &)
Remove a predecessor from the node.
bool try_get(T &v) __TBB_override
Request an item from the buffer_node.
source_node(graph &g, Body body, bool is_active=true)
Constructor for a node with a successor.
async_body_base(gateway_type *gateway)
output_ports_type & output_ports()
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7 > output_type
function_body that takes an Input and a set of output ports
internal::unfolded_indexer_node< InputTuple > unfolded_type
An cache of predecessors that supports requests and reservations.
void fetch_item(size_t i, item_type &o)
void set_external_ports(T &&input_ports_tuple)
bool remove_predecessor(predecessor_type &src) __TBB_override
Removes src from the list of cached predecessors.
task * grab_forwarding_task(buffer_operation &op_data)
virtual void internal_rem_succ(buffer_operation *op)
Remove successor.
multifunction_node(const multifunction_node &other)
concurrency
An enumeration the provides the two most common concurrency levels: unlimited and serial.
task that does nothing. Useful for synchronization.
const item_type & back() const
task * try_put_task(const T &t) __TBB_override
Puts an item to this receiver.
const item_type & front() const
task * try_put_task(const input_type &v) __TBB_override
Put item to successor; return task to run the successor if possible.
void add_nodes(const NodeTypes &... n)
interface10::internal::Policy< queueing, lightweight > queueing_lightweight
static const void * to_void_ptr(const T &t)
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp begin
~graph()
Destroys the graph.
Used to form groups of tasks.
static const bool is_async_type
buffer_node< T, A >::size_type size_type
fOutput_type::successor_type successor_type
bool register_successor(successor_type &s) __TBB_override
Add a new successor to this node.
Implements an executable node that supports continue_msg -> Output.
virtual bool try_reserve_wrapper(void *p, bool is_async)=0
predecessor_cache< input_type, null_mutex > my_predecessors
Output output_type
The type of the output message, which is complete.
std::unique_ptr< output_ports_type > my_output_ports
void activate()
Activates a node that was created in the inactive state.
receiver< TupleType > base_type
tbb::flow::tuple_element< N, typename JNT::input_ports_type >::type & input_port(JNT &jn)
templated function to refer to input ports of the join node
input_impl_type::predecessor_type predecessor_type
void remove_node(graph_node *n)
virtual void internal_consume(buffer_operation *op)
A task that calls a node's apply_body_bypass function with no input.
static void fgt_begin_body(void *)
tuple< T0, T1, T2, T3, T4, T5, T6, T7 > InputTuple
Implements a function node that supports Input -> Output.
static void fgt_async_try_put_end(void *, void *)
buffer_node< T, A >::size_type size_type
void move_item(size_t to, size_t from)
void make_edge(sender< T > &p, receiver< T > &s)
Makes an edge between a single predecessor and a single successor.
static void fgt_composite(void *, void *)
unfolded_type::input_ports_type input_ports_type
~source_node()
The destructor.
Implements methods for both executable and function nodes that puts Output to its successors.
internal::tagged_msg< size_t, T0, T1, T2 > output_type
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type type
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
base_type::output_ports_type output_ports_type
graph_iterator< const graph, const graph_node > const_iterator
Detects whether two given types are the same.
virtual void internal_reserve(buffer_operation *op)
graph & graph_reference() __TBB_override
untyped_sender predecessor_type
The predecessor type for this node.
K key_from_message(const T &t)
void register_node(graph_node *n)
tbb::flow::tuple_element< N, typename JNT::input_ports_type >::type & input_port(JNT &jn)
templated function to refer to input ports of the join node
void register_successor(successor_type &r)
An empty class used for messages that mean "I'm done".
internal::multifunction_input< Input, typename base_type::output_ports_type, Policy, Allocator > mfn_input_type
reference operator*() const
Dereference.
tbb::task_group_context * my_context
virtual bool try_get_wrapper(void *p, bool is_async)=0
static void clear_this(P &p)
internal::unfolded_join_node< N, key_matching_port, OutputTuple, key_matching< K, KHash > > unfolded_type
internal::broadcast_cache< input_type > my_successors
void internal_reserve(queue_operation *op) __TBB_override
overwrite_node(const overwrite_node &src)
Copy constructor; doesn't take anything from src; default won't work.
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
internal::round_robin_cache< T, null_rw_mutex > my_successors
output_ports_type my_output_ports
Forwards messages in sequence order.
Base class for user-defined tasks.
output_ports_type & output_ports()
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
bool internal_push(prio_operation *op) __TBB_override
bool try_release() __TBB_override
Release a reserved item.
std::unique_ptr< output_ports_type > my_output_ports
~sequencer_node()
Destructor.
void internal_remove_edge(internal::untyped_sender &p, internal::untyped_receiver &s)
internal::aggregator< handler_type, buffer_operation > my_aggregator
static void fgt_async_try_put_begin(void *, void *)
continue_node(graph &g,)
Constructor for executable node with continue_msg -> Output.
async_msg< T > async_type
multifunction_node< Input, tuple< Output >, Policy, Allocator > base_type
try_put_functor(output_port_type &p, const Output &v)
const_iterator cbegin() const
start const iterator
graph_node * my_nodes_last
Forwards messages in arbitrary order.
bool try_release() __TBB_override
Release a reserved item.
unfolded_type::input_ports_type input_ports_type
internal::source_body< output_type > * my_init_body
void reset_node(reset_flags f) __TBB_override
sender< output_type >::successor_type successor_type
Breaks an infinite loop between the node reservation and register_successor call.
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4)
tbb::flow::tuple< receiver< InputTypes > &... > input_ports_type
tbb::task * root_task()
Returns the root task of the graph.
indexer_node(const indexer_node &other)
queue_node(const queue_node &src)
Copy constructor.
void grow_my_array(size_t minimum_size)
Grows the internal array.
static void fgt_graph_desc(void *, const char *)
tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > InputTuple
task * try_put_task(const X &t)
internal::unfolded_indexer_node< InputTuple > unfolded_type
split_node: accepts a tuple as input, forwards each element of the tuple to its
fOutput_type::successor_type successor_type
tbb::flow::tuple< sender< OutputTypes > &... > output_ports_type
bool try_put(const X &t)
Put an item to the receiver.
tbb::flow::tuple_element< N, typename MOP::output_ports_type >::type & output_port(MOP &op)
internal::function_input_queue< input_type, Allocator > input_queue_type
void add_nodes_impl(CompositeType *, bool)
static const node_priority_t no_priority
overwrite_node< T > base_type
unsigned int node_priority_t
receiver_gateway< output_type > gateway_type
The base of all graph nodes.
internal::tagged_msg< size_t, T0, T1, T2, T3 > output_type
static task * emit_this(graph &g, const T &t, P &p)
void const char const char int ITT_FORMAT __itt_group_sync p
void reset_node(reset_flags f) __TBB_override
void __TBB_EXPORTED_METHOD reset()
Forcefully reinitializes the context after the task tree it was associated with is completed.
continue_node(const continue_node &src)
Copy constructor.
static void fgt_release_wait(void *)
bool register_successor(successor_type &r) __TBB_override
Adds a successor.
void try_put_and_add_task(task *&last_task)
A lock that occupies a single byte.
bool try_consume() __TBB_override
Consumes the reserved item.
std::unique_ptr< input_ports_type > my_input_ports
indexer_node(const indexer_node &other)
virtual task * forward_task()
This is executed by an enqueued task, the "forwarder".
virtual bool try_get(T &)
Request an item from the sender.
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
Base class for types that should not be assigned.
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
base_type::buffer_operation queue_operation
Pure virtual template class that defines a receiver of messages of type T.
static task * try_put_task_wrapper_impl(receiver< T > *const this_recv, const void *p, bool is_async)
unfolded_type::input_ports_type input_ports_type
item_buffer with reservable front-end. NOTE: if reserving, do not
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long ITT_FORMAT lu const __itt_domain __itt_id __itt_string_handle __itt_metadata_type size_t void ITT_FORMAT p const __itt_domain __itt_id __itt_string_handle const wchar_t size_t ITT_FORMAT lu const __itt_domain __itt_id __itt_relation __itt_id ITT_FORMAT p const wchar_t int ITT_FORMAT __itt_group_mark S
broadcast_cache_type my_successors
sequencer_node(const sequencer_node &src)
Copy constructor.
void reserve_wait() __TBB_override
Inform a graph that messages may come from outside, to prevent premature graph completion.
internal::tagged_msg< size_t, T0, T1, T2, T3, T4 > output_type
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5)
void reset_node(reset_flags f) __TBB_override
internal::port_ref_impl< N1, N2 > port_ref()
virtual bool internal_push(buffer_operation *op)
receiver< input_type >::predecessor_type predecessor_type
bool try_put(const output_type &i)
static void alias_port(void *, PortsTuple &)
internal::tagged_msg< size_t, T0, T1 > output_type
graph_iterator< graph, graph_node > iterator
Forwards messages in FIFO order.
receiver< input_type >::predecessor_type predecessor_type
virtual bool remove_successor(successor_type &r)=0
Removes a successor from this node.
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
void remove_successor(successor_type &r)
broadcast_node(const broadcast_node &src)
internal::unfolded_join_node< N, queueing_port, OutputTuple, queueing > unfolded_type
void set_external_ports(T1 &&input_ports_tuple, T2 &&output_ports_tuple)
sender< output_type >::successor_type successor_type
void activate_graph(graph &g)
buffer_operation(op_type t)
bool try_reserve(output_type &v) __TBB_override
Reserves an item.
internal::multifunction_input< input_type, output_ports_type, Policy, Allocator > base_type
internal::wrap_tuple_elements< N, internal::multifunction_output, TupleType >::type output_ports_type
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
Body copy_body(Node &n)
Returns a copy of the body from a function or continue node.
iterator end()
end iterator
indexer_node(const indexer_node &other)
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6)
task * try_put_task_impl(const input_type &v)
indexer_node(const indexer_node &other)
bool my_item_valid(size_type i) const
priority_queue_node(const priority_queue_node &src)
Copy constructor.
void destroy_item(size_type i)
void add_visible_nodes(const NodeTypes &... n)
virtual bool try_release()
Releases the reserved item.
virtual void reset_receiver(reset_flags f=rf_reset_protocol)=0
put receiver back in initial state
virtual bool try_reserve(T &)
Reserves an item in the sender.
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7)
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2)
output_type my_cached_item
internal::function_input_queue< input_type, Allocator > input_queue_type
void remove_edge(sender< T > &p, receiver< T > &s)
Removes an edge between a single predecessor and a single successor.
bool pop_front(item_type &v)
void internal_make_edge(internal::untyped_sender &p, internal::untyped_receiver &s)
internal::unfolded_join_node< N, reserving_port, OutputTuple, reserving > unfolded_type
void release_wait() __TBB_override
Deregisters an external entity that may have interacted with the graph.
bool try_consume() __TBB_override
Consumes a reserved item.
sender< output_type >::successor_type successor_type
void deactivate_graph(graph &g)
static void fgt_graph(void *)
int init_decrement_predecessors
sender< output_type >::successor_type successor_type
void reset_node(reset_flags f) __TBB_override
write_once_node(graph &g)
Constructor.
void internal_pop(prio_operation *op) __TBB_override
void set_external_ports(T &&output_ports_tuple)
tuple< T0, T1, T2, T3, T4, T5 > InputTuple
virtual void reset_node(reset_flags f=rf_reset_protocol)=0
sender< output_type >::successor_type successor_type
sender< output_type >::successor_type successor_type
Body copy_function_object()
buffer_node< T, A > class_type
buffer_node< T, A > base_type
size_type size(size_t new_tail=0)
task * try_put_task(const TupleType &t) __TBB_override
Put item to successor; return task to run the successor if possible.
static void fgt_multiinput_multioutput_node(string_index, void *, void *)
void add_visible_nodes(const NodeTypes &... n)
T output_type
The output type of this sender.
indexer_node(const indexer_node &other)
void internal_forward_task(prio_operation *op) __TBB_override
Tries to forward valid items to successors.
static void fgt_remove_edge(void *, void *)
void prio_push(const T &src)
tbb::flow::tuple< receiver< InputTypes > &... > input_ports_type
void internal_release(prio_operation *op) __TBB_override
sender< output_type >::successor_type successor_type
The type of successors of this node.
int my_initial_predecessor_count
#define __TBB_FLOW_GRAPH_PRIORITY_EXPR(expr)
limiter_node(const limiter_node &src)
Copy constructor.
internal::async_helpers< T >::filtered_type filtered_type
virtual bool try_consume()
Consumes the reserved item.
void reset(reset_flags f=rf_reset_protocol)
Enables one or the other code branches.
priority_queue_node(graph &g)
Constructor.
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
void add_nodes(const NodeTypes &... n)
indexer_node(const indexer_node &other)
bool try_put(const Output &i) __TBB_override
Implements gateway_type::try_put for an external activity to submit a message to FG.
Represents acquisition of a mutex.
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > output_type
task * apply_body_bypass()
Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it.
virtual bool try_reserve_wrapper(void *p, bool is_async) __TBB_override
void reset_node(reset_flags f) __TBB_override
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
receiver< input_type >::predecessor_type predecessor_type
internal::multifunction_input< input_type, output_ports_type, Policy, Allocator > input_impl_type
A cache of successors that are broadcast to.
virtual bool try_get_wrapper(void *p, bool is_async) __TBB_override
internal::unfolded_indexer_node< InputTuple > unfolded_type
task * try_put_task(const input_type &t) __TBB_override
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id parent
void add_visible_nodes(const NodeTypes &... n)
int decrement_ref_count()
Atomically decrement reference count and returns its new value.
The leaf for source_body.
internal::unfolded_indexer_node< InputTuple > unfolded_type
limiter_node(graph &g, size_t threshold, int num_decrement_predecessors=0)
Constructor.
static const void * to_void_ptr(const T &t)
Forwards messages only if the threshold has not been reached.
void reset_receiver(reset_flags f) __TBB_override
put receiver back in initial state
tuple< T0, T1, T2, T3 > InputTuple
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
bool try_consume() __TBB_override
Consumes a reserved item.
internal::async_body_base< gateway_type > async_body_base_type
void operator()(const Input &v, Ports &)
tbb::task_arena * my_task_arena
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
virtual void internal_reg_succ(buffer_operation *op)
Register successor.
input_ports_type & input_ports()
internal::function_input< input_type, output_type, Policy, Allocator > input_impl_type
unfolded_join_node : passes input_ports_type to join_node_base. We build the input port type
bool register_successor(successor_type &r) __TBB_override
Add a new successor to this node.
source_node(const source_node &src)
Copy constructor.
receiver< input_type >::predecessor_type predecessor_type
async_body(const Body &body, gateway_type *gateway)
async_node(graph &g, size_t concurrency,)
multifunction_node(graph &g, size_t concurrency,)
internal::unfolded_indexer_node< InputTuple > unfolded_type
std::unique_ptr< input_ports_type > my_input_ports
static void fgt_node_with_body(string_index, void *, void *, void *)
internal::wrap_tuple_elements< N, internal::multifunction_output, Output >::type output_ports_type
bool try_put_impl(const Output &i)
Implements gateway_type::try_put for an external activity to submit a message to FG.
buffer_operation(const T &e, op_type t)
internal::function_output< output_type > fOutput_type
join_node(const join_node &other)
const item_type & get_my_item(size_t i) const
indexer_node(const indexer_node &other)
internal::broadcast_cache< input_type, null_rw_mutex > my_successors
internal::broadcast_cache< T > my_successors
virtual void finalize() const
internal::unfolded_indexer_node< InputTuple > unfolded_type
buffer_node< T, A >::item_type item_type
void increment_ref_count()
Atomically increment reference count.
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
void reset_node(reset_flags f) __TBB_override
void handle_operations(prio_operation *op_list) __TBB_override
receiver< input_type >::predecessor_type predecessor_type
static const T & from_void_ptr(const void *p)
#define __TBB_FLOW_GRAPH_PRIORITY_ARG0(priority)
void reset_receiver(reset_flags f) __TBB_override
put receiver back in initial state
void try_put_and_add_task(task *&last_task)
bool register_predecessor(predecessor_type &) __TBB_override
Increments the trigger threshold.
internal::function_body< T, size_t > * my_sequencer
iterator begin()
start iterator
static void fgt_end_body(void *)
internal::unfolded_indexer_node< InputTuple > unfolded_type
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6 > output_type
graph & graph_reference() __TBB_override
bool try_get(X &t)
Request an item from the sender.
void const char const char int ITT_FORMAT __itt_group_sync s
void internal_reserve(prio_operation *op) __TBB_override
tuple< T0, T1, T2, T3, T4 > InputTuple
sender< output_type >::successor_type successor_type
A cache of predecessors that only supports try_get.
void reset_node(reset_flags) __TBB_override
bool register_successor(successor_type &r) __TBB_override
Replace the current successor with this new successor.
virtual task * try_put_task_wrapper(const void *p, bool is_async) __TBB_override
join_node(const join_node &other)
internal::async_helpers< T >::filtered_type filtered_type
buffer_node(const buffer_node &src)
Copy constructor.
virtual ~untyped_receiver()
Destructor.
task * try_put_task(const X &t)
bool try_release() __TBB_override
Releases the reserved item.
void internal_pop(queue_operation *op) __TBB_override
virtual bool register_predecessor(predecessor_type &)
Add a predecessor to the node.
internal::unfolded_indexer_node< InputTuple > unfolded_type
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9)
void execute_in_graph_arena(graph &g, F &f)
Executes custom functor inside graph arena.
void reset_node(reset_flags f) __TBB_override
void try_put_and_add_task(task *&last_task)
sender< output_type >::successor_type successor_type
void set_ref_count(int count)
Set reference count.
successors_type my_successors
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1)
task * try_put_task(const input_type &) __TBB_override
Put item to successor; return task to run the successor if possible.
indexer_node(const indexer_node &other)
graph & graph_reference() __TBB_override
register_predecessor_task(predecessor_type &owner, successor_type &succ)
void reset_node(reset_flags) __TBB_override
virtual bool is_continue_receiver()
virtual graph & graph_reference()=0
tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8 > InputTuple
tuple< T0, T1, T2, T3, T4, T5, T6 > InputTuple
virtual void internal_forward_task(buffer_operation *op)
Tries to forward valid items to successors.
Base class for receivers of completion messages.
receiver< input_type >::predecessor_type predecessor_type
internal::function_output< output_type > fOutput_type
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
static void fgt_reserve_wait(void *)
wrap_tuple_elements< N, PT, OutputTuple >::type input_ports_type
An executable node that acts as a source, i.e. it has no predecessors.
graph()
Constructs a graph with isolated task_group_context.
graph & graph_reference() __TBB_override
multifunction_body_type * my_body
task * try_put_task(const T &t) __TBB_override
build a task to run the successor if possible. Default is old behavior.
queue_node(graph &g)
Constructor.
tbb::flow::interface10::async_node::receiver_gateway_impl my_gateway
async_body_base< Gateway > base_type
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Implements methods for an executable node that takes continue_msg as input.
void prepare_task_arena(bool reinit=false)
void wait_for_all()
Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.
internal::broadcast_cache< output_type > & successors() __TBB_override
base_type::size_type size_type
static void fgt_multioutput_node_desc(const NodeType *, const char *)
internal::multifunction_output< Output > output_port_type
task_list_type my_reset_task_list
static void fgt_node(string_index, void *, void *)
tuple< T0, T1 > InputTuple
bool is_continue_receiver() __TBB_override
void internal_forward_task_impl(buffer_operation *op, derived_type *derived)
input_impl_type::predecessor_type predecessor_type
input_ports_type & input_ports()
void reset_node(reset_flags) __TBB_override
bool try_reserve_apply_body(output_type &v)
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5 > output_type
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5, __TBB_B6 b6, __TBB_B7 b7, __TBB_B8 b8)
untyped_receiver successor_type
The successor type for this node.
void reset_node(reset_flags f) __TBB_override
tbb::task * execute() __TBB_override
Should be overridden by derived classes.
tbb::internal::uint64_t tag_value
write_once_node(const write_once_node &src)
Copy constructor: call base class copy constructor.
virtual task * execute()=0
Does whatever should happen when the threshold is reached.
internal::broadcast_cache< output_type > my_successors
bool is_graph_active(graph &g)
bool remove_successor(successor_type &s) __TBB_override
Removes a successor from this node.
bool try_get(output_type &v) __TBB_override
Request an item from the node.
function_node(const function_node &src)
Copy constructor.
output_ports_type & output_ports()
bool try_reserve(X &t)
Reserves an item in the sender.
task * try_put_task(const X &t)
const V & cast_to(T const &t)
void reserve_wait() __TBB_override
Used to register that an external entity may still interact with the graph.
sequencer_node(graph &g, const Sequencer &s)
Constructor.
virtual ~untyped_sender()
bool try_reserve(T &v) __TBB_override
Reserves an item.
Forwards messages of type T to all successors.
An abstract cache of successors.
void release_wait() __TBB_override
Inform a graph that a previous call to reserve_wait is no longer in effect.
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
bool internal_push(sequencer_operation *op) __TBB_override
internal::broadcast_cache< output_type > & successors() __TBB_override
buffer_node< T, A >::buffer_operation sequencer_operation
bool register_successor(successor_type &r) __TBB_override
Adds a new successor.
virtual void handle_operations(buffer_operation *op_list)
virtual void internal_release(buffer_operation *op)
bool remove_predecessor(predecessor_type &) __TBB_override
Decrements the trigger threshold.
static void alias_port(void *, PortsTuple &)
implements a function node that supports Input -> (set of outputs)
void __TBB_store_with_release(volatile T &location, V value)
internal::unfolded_indexer_node< InputTuple > unfolded_type
priority_queue_node class_type
internal::unfolded_indexer_node< InputTuple > unfolded_type
sender< output_type >::successor_type successor_type
void internal_forward_task(queue_operation *op) __TBB_override
Tries to forward valid items to successors.
bool register_successor(successor_type &r) __TBB_override
Add a new successor to this node.
void reset(reset_flags f)
continue_node(graph &g, int number_of_predecessors,)
Constructor for executable node with continue_msg -> Output.
friend class proxy_dependency_receiver
internal::source_body< output_type > * my_body
continue_receiver(const continue_receiver &src)
Copy constructor.
void add_nodes(const NodeTypes &... n)
continue_receiver(__TBB_FLOW_GRAPH_PRIORITY_ARG1(int number_of_predecessors, node_priority_t priority))
Constructor.
void set_gateway(gateway_type *gateway)
bool remove_successor(successor_type &r) __TBB_override
Removes s as a successor.
buffer_node< T, A >::buffer_operation prio_operation
tuple< T0, T1, T2 > InputTuple
static void fgt_node_desc(const NodeType *, const char *)
internal::tagged_msg< size_t, T0 > output_type
void set_owner(owner_type *owner)
Forward declaration section.
virtual void internal_pop(buffer_operation *op)