17 #ifndef __TBB_flow_graph_H 18 #define __TBB_flow_graph_H 34 #if __TBB_PREVIEW_ASYNC_MSG 39 #if __TBB_PREVIEW_STREAMING_NODE 42 #include <unordered_map> 43 #include <type_traits> 44 #endif // __TBB_PREVIEW_STREAMING_NODE 46 #if TBB_DEPRECATED_FLOW_ENQUEUE 47 #define FLOW_SPAWN(a) tbb::task::enqueue((a)) 49 #define FLOW_SPAWN(a) tbb::task::spawn((a)) 53 #if __TBB_CPP11_TUPLE_PRESENT 58 using std::tuple_size;
59 using std::tuple_element;
64 #include "compat/tuple" 86 namespace interface10 {
109 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 113 class edge_container {
116 typedef std::list<C *, tbb::tbb_allocator<C *> > edge_list_type;
118 void add_edge(C &
s) {
119 built_edges.push_back(&
s);
122 void delete_edge(C &
s) {
123 for (
typename edge_list_type::iterator i = built_edges.begin(); i != built_edges.end(); ++i) {
131 void copy_edges(edge_list_type &v) {
135 size_t edge_count() {
136 return (
size_t)(built_edges.size());
145 template<
typename S >
void sender_extract(
S &
s);
146 template<
typename R >
void receiver_extract(R &r);
149 edge_list_type built_edges;
164 namespace interface10 {
169 if (right == NULL)
return left;
171 if (left == NULL)
return right;
182 #if __TBB_PREVIEW_ASYNC_MSG 190 template<
typename T,
typename =
void >
198 return static_cast<const void*>(&t);
202 return static_cast<void*>(&t);
206 return *static_cast<const T*>(
p);
210 return *static_cast<T*>(
p);
231 template<
typename T >
299 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 300 typedef internal::edge_container<successor_type> built_successors_type;
302 typedef built_successors_type::edge_list_type successor_list_type;
303 virtual built_successors_type &built_successors() = 0;
306 virtual void copy_successors( successor_list_type &) = 0;
307 virtual size_t successor_count() = 0;
311 template<
typename X >
317 template<
typename X >
326 class untyped_receiver {
334 #if __TBB_PREVIEW_OPENCL_NODE 348 if (!res)
return false;
363 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 364 typedef internal::edge_container<predecessor_type> built_predecessors_type;
365 typedef built_predecessors_type::edge_list_type predecessor_list_type;
366 virtual built_predecessors_type &built_predecessors() = 0;
369 virtual void copy_predecessors( predecessor_list_type & ) = 0;
370 virtual size_t predecessor_count() = 0;
393 template<
typename T >
414 __TBB_ASSERT(
false,
"async_msg interface does not support 'pull' protocol in try_get()");
424 __TBB_ASSERT(
false,
"async_msg interface does not support 'pull' protocol in try_reserve()");
430 template<
typename T >
459 #else // __TBB_PREVIEW_ASYNC_MSG 462 template<
typename T >
482 virtual bool try_get( T & ) {
return false; }
493 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 494 typedef typename internal::edge_container<successor_type> built_successors_type;
496 typedef typename built_successors_type::edge_list_type successor_list_type;
497 virtual built_successors_type &built_successors() = 0;
499 virtual void internal_delete_built_successor(
successor_type & ) = 0;
500 virtual void copy_successors( successor_list_type &) = 0;
501 virtual size_t successor_count() = 0;
506 template<
typename T >
521 if (!res)
return false;
542 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 543 typedef typename internal::edge_container<predecessor_type> built_predecessors_type;
544 typedef typename built_predecessors_type::edge_list_type predecessor_list_type;
545 virtual built_predecessors_type &built_predecessors() = 0;
548 virtual void copy_predecessors( predecessor_list_type & ) = 0;
549 virtual size_t predecessor_count() = 0;
560 #if __TBB_PREVIEW_OPENCL_NODE 565 #endif // __TBB_PREVIEW_ASYNC_MSG 610 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 611 typedef internal::edge_container<predecessor_type> built_predecessors_type;
612 typedef built_predecessors_type::edge_list_type predecessor_list_type;
613 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
617 my_built_predecessors.add_edge(
s );
622 my_built_predecessors.delete_edge(
s);
627 my_built_predecessors.copy_edges(v);
632 return my_built_predecessors.edge_count();
654 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 657 built_predecessors_type my_built_predecessors;
671 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 672 my_built_predecessors.clear();
689 #if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING 690 template <
typename K,
typename T>
707 namespace interface10 {
712 #if __TBB_PREVIEW_ASYNC_MSG 717 template <
typename C,
typename N>
720 if (
begin) current_node = my_graph->my_nodes;
724 template <
typename C,
typename N>
727 return *operator->();
730 template <
typename C,
typename N>
735 template <
typename C,
typename N>
737 if (current_node) current_node = current_node->next;
741 inline graph::graph() : my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
754 my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
755 prepare_task_arena();
758 my_root_task->set_ref_count(1);
843 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 844 inline void graph::set_name(
const char *
name) {
860 template <
typename Output >
872 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 878 template<
typename Body >
905 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 927 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1016 template<
typename Body>
1022 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1089 return (
new ( task::allocate_additional_child_of( *(this->
my_graph.
root_task()) ) )
1117 template <
typename Input,
typename Output = continue_msg,
typename Policy = queueing,
typename Allocator=cache_aligned_allocator<Input> >
1127 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1128 typedef typename input_impl_type::predecessor_list_type predecessor_list_type;
1129 typedef typename fOutput_type::successor_list_type successor_list_type;
1137 template<
typename Body >
1155 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1161 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1164 successors().built_successors().sender_extract(*
this);
1191 template <
typename Input,
typename Output,
typename Policy = queueing,
typename Allocator=cache_aligned_allocator<Input> >
1197 typename internal::wrap_tuple_elements<
1198 tbb::flow::tuple_size<Output>::value,
1199 internal::multifunction_output,
1217 template<
typename Body>
1222 tbb::internal::fgt_multioutput_node_with_body<N>(
1223 tbb::internal::FLOW_MULTIFUNCTION_NODE,
1231 tbb::internal::fgt_multioutput_node_with_body<N>( tbb::internal::FLOW_MULTIFUNCTION_NODE,
1236 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1242 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1245 base_type::extract();
1255 template<
typename TupleType,
typename Allocator=cache_aligned_allocator<TupleType> >
1262 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1264 typedef typename base_type::predecessor_list_type predecessor_list_type;
1266 typedef typename predecessor_cache_type::built_predecessors_type built_predecessors_type;
1277 tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->
my_graph,
1282 tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->
my_graph,
1286 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1310 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1324 built_predecessors_type &built_predecessors()
__TBB_override {
return my_predessors; }
1327 built_predecessors_type my_predessors;
1335 template <
typename Output,
typename Policy =
internal::Policy<
void> >
1347 template <
typename Body >
1358 template <
typename Body >
1360 graph &g,
int number_of_predecessors,
1378 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1384 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1386 input_impl_type::my_built_predecessors.receiver_extract(*
this);
1387 successors().built_successors().sender_extract(*
this);
1406 template <
typename T>
1413 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1419 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1420 internal::edge_container<predecessor_type> my_built_predecessors;
1440 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1458 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1481 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
1485 my_built_predecessors.add_edge(
p);
1490 my_built_predecessors.delete_edge(
p);
1495 return my_built_predecessors.edge_count();
1498 void copy_predecessors(predecessor_list_type &v)
__TBB_override {
1500 my_built_predecessors.copy_edges(v);
1504 my_built_predecessors.receiver_extract(*
this);
1529 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1530 my_built_predecessors.clear();
1538 template <
typename T,
typename A=cache_aligned_allocator<T> >
1546 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1554 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1555 internal::edge_container<predecessor_type> my_built_predecessors;
1561 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1562 , add_blt_succ, del_blt_succ,
1563 add_blt_pred, del_blt_pred,
1564 blt_succ_cnt, blt_pred_cnt,
1565 blt_succ_cpy, blt_pred_cpy
1570 class buffer_operation :
public internal::aggregated_operation< buffer_operation > {
1573 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1580 successor_list_type *svec;
1581 predecessor_list_type *pvec;
1590 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1593 ,
elem(const_cast<T*>(&e)) ,
ltask(NULL)
1600 typedef internal::aggregating_functor<class_type, buffer_operation>
handler_type;
1608 template<
typename derived_type>
1610 __TBB_ASSERT(static_cast<class_type*>(derived) ==
this,
"'this' is not a base class for derived");
1612 buffer_operation *tmp = NULL;
1613 bool try_forwarding =
false;
1616 op_list = op_list->next;
1617 switch (tmp->type) {
1626 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1628 case add_blt_succ: internal_add_built_succ(tmp);
break;
1629 case del_blt_succ: internal_del_built_succ(tmp);
break;
1630 case add_blt_pred: internal_add_built_pred(tmp);
break;
1631 case del_blt_pred: internal_del_built_pred(tmp);
break;
1632 case blt_succ_cnt: internal_succ_cnt(tmp);
break;
1633 case blt_pred_cnt: internal_pred_cnt(tmp);
break;
1634 case blt_succ_cpy: internal_copy_succs(tmp);
break;
1635 case blt_pred_cpy: internal_copy_preds(tmp);
break;
1644 forwarder_busy =
true;
1659 return op_data.ltask;
1674 task *last_task = NULL;
1677 op_data.ltask = NULL;
1700 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1705 virtual void internal_add_built_succ(buffer_operation *op) {
1710 virtual void internal_del_built_succ(buffer_operation *op) {
1717 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
1719 virtual void internal_add_built_pred(buffer_operation *op) {
1720 my_built_predecessors.add_edge(*(op->p));
1724 virtual void internal_del_built_pred(buffer_operation *op) {
1725 my_built_predecessors.delete_edge(*(op->p));
1729 virtual void internal_succ_cnt(buffer_operation *op) {
1734 virtual void internal_pred_cnt(buffer_operation *op) {
1735 op->cnt_val = my_built_predecessors.edge_count();
1739 virtual void internal_copy_succs(buffer_operation *op) {
1744 virtual void internal_copy_preds(buffer_operation *op) {
1745 my_built_predecessors.copy_edges(*(op->pvec));
1774 template<
typename derived_type>
1776 __TBB_ASSERT(static_cast<class_type*>(derived) ==
this,
"'this' is not a base class for derived");
1778 if (this->my_reserved || !derived->is_item_valid()) {
1780 this->forwarder_busy =
false;
1784 task * last_task = NULL;
1786 for (; counter > 0 && derived->is_item_valid(); --counter)
1787 derived->try_put_and_add_task(last_task);
1789 op->ltask = last_task;
1790 if (last_task && !counter) {
1853 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 1873 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 1875 buffer_operation op_data(add_blt_succ);
1881 buffer_operation op_data(del_blt_succ);
1887 buffer_operation op_data(add_blt_pred);
1893 buffer_operation op_data(del_blt_pred);
1899 buffer_operation op_data(blt_pred_cnt);
1901 return op_data.cnt_val;
1905 buffer_operation op_data(blt_succ_cnt);
1907 return op_data.cnt_val;
1910 void copy_predecessors( predecessor_list_type &v )
__TBB_override {
1911 buffer_operation op_data(blt_pred_cpy);
1917 buffer_operation op_data(blt_succ_cpy);
1928 r.remove_predecessor(*
this);
1973 buffer_operation op_data(
con_res);
2010 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2013 my_built_predecessors.receiver_extract(*
this);
2024 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2025 my_built_predecessors.clear();
2033 template <
typename T,
typename A=cache_aligned_allocator<T> >
2106 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2119 template<
typename T,
typename A=cache_aligned_allocator<T> >
2131 template<
typename Sequencer >
2133 my_sequencer(new internal::function_body_leaf< T, size_t, Sequencer>(
s) ) {
2150 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2162 size_type tag = (*my_sequencer)(*(op->elem));
2163 #if !TBB_DEPRECATED_SEQUENCER_DUPLICATES 2171 size_t new_tail = (tag+1 > this->
my_tail) ? tag+1 : this->
my_tail;
2185 template<
typename T,
typename Compare = std::less<T>,
typename A=cache_aligned_allocator<T> >
2209 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2243 if ( this->my_reserved ==
true || this->
my_tail == 0 ) {
2248 *(op->elem) =
prio();
2256 if (this->my_reserved ==
true || this->
my_tail == 0) {
2260 this->my_reserved =
true;
2261 *(op->elem) =
prio();
2269 this->my_reserved =
false;
2276 this->my_reserved =
false;
2360 size_type cur_pos =
mark;
2377 while (child <
mark) {
2390 child = (cur_pos<<1)+1;
2399 template<
typename T >
2406 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2436 bool reserved =
false;
2532 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2557 r.remove_predecessor(*
this);
2562 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 2590 void copy_predecessors(predecessor_list_type &v)
__TBB_override {
2641 rtask =
new ( task::allocate_additional_child_of( *(this->
my_graph.
root_task()) ) )
2683 template<
typename OutputTuple,
typename JP=queueing>
class join_node;
2685 template<
typename OutputTuple>
2694 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph,
2698 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_RESERVING, &this->my_graph,
2702 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2710 template<
typename OutputTuple>
2719 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph,
2723 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_QUEUEING, &this->my_graph,
2727 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2737 template<
typename OutputTuple,
typename K,
typename KHash>
2739 key_matching_port, OutputTuple, key_matching<K,KHash> > {
2747 #if __TBB_PREVIEW_MESSAGE_BASED_KEY_MATCHING 2751 template<
typename __TBB_B0,
typename __TBB_B1>
2753 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2756 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2>
2758 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2761 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3>
2763 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2766 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4>
2767 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4) :
2769 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2772 #if __TBB_VARIADIC_MAX >= 6 2773 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2775 join_node(
graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4, __TBB_B5 b5) :
2777 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2781 #if __TBB_VARIADIC_MAX >= 7 2782 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2783 typename __TBB_B5,
typename __TBB_B6>
2784 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) :
2786 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2790 #if __TBB_VARIADIC_MAX >= 8 2791 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2792 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7>
2793 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,
2794 __TBB_B7 b7) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7) {
2795 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2799 #if __TBB_VARIADIC_MAX >= 9 2800 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2801 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7,
typename __TBB_B8>
2802 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,
2803 __TBB_B7 b7, __TBB_B8 b8) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8) {
2804 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2808 #if __TBB_VARIADIC_MAX >= 10 2809 template<
typename __TBB_B0,
typename __TBB_B1,
typename __TBB_B2,
typename __TBB_B3,
typename __TBB_B4,
2810 typename __TBB_B5,
typename __TBB_B6,
typename __TBB_B7,
typename __TBB_B8,
typename __TBB_B9>
2811 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,
2812 __TBB_B7 b7, __TBB_B8 b8, __TBB_B9 b9) :
unfolded_type(g, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9) {
2813 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2818 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_JOIN_NODE_TAG_MATCHING, &this->my_graph,
2822 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2834 template<
typename T0,
typename T1=null_type,
typename T2=null_type,
typename T3=null_type,
2835 typename T4=null_type,
typename T5=null_type,
typename T6=null_type,
2839 template<
typename T0>
2842 static const int N = 1;
2848 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2853 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2857 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2864 template<
typename T0,
typename T1>
2867 static const int N = 2;
2873 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2878 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2882 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2889 template<
typename T0,
typename T1,
typename T2>
2892 static const int N = 3;
2898 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2903 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2907 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2914 template<
typename T0,
typename T1,
typename T2,
typename T3>
2917 static const int N = 4;
2923 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2928 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2932 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2939 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4>
2942 static const int N = 5;
2948 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2953 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2957 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2964 #if __TBB_VARIADIC_MAX >= 6 2965 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5>
2966 class indexer_node<T0, T1, T2, T3, T4, T5> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5> > {
2968 static const int N = 6;
2974 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2979 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
2983 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 2989 #endif //variadic max 6 2991 #if __TBB_VARIADIC_MAX >= 7 2992 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
2994 class indexer_node<T0, T1, T2, T3, T4, T5, T6> :
public internal::unfolded_indexer_node<tuple<T0, T1, T2, T3, T4, T5, T6> > {
2996 static const int N = 7;
3002 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3007 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3011 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3017 #endif //variadic max 7 3019 #if __TBB_VARIADIC_MAX >= 8 3020 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3021 typename T6,
typename T7>
3022 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> > {
3024 static const int N = 8;
3030 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3035 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3039 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3045 #endif //variadic max 8 3047 #if __TBB_VARIADIC_MAX >= 9 3048 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3049 typename T6,
typename T7,
typename T8>
3050 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> > {
3052 static const int N = 9;
3058 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3063 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3067 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3073 #endif //variadic max 9 3075 #if __TBB_VARIADIC_MAX >= 10 3076 template<
typename T0,
typename T1,
typename T2,
typename T3,
typename T4,
typename T5,
3077 typename T6,
typename T7,
typename T8,
typename T9>
3080 static const int N = 10;
3082 typedef tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
InputTuple;
3083 typedef typename internal::tagged_msg<size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> output_type;
3086 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3091 tbb::internal::fgt_multiinput_node<N>( tbb::internal::FLOW_INDEXER_NODE, &this->
my_graph,
3095 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3101 #endif //variadic max 10 3103 #if __TBB_PREVIEW_ASYNC_MSG 3106 template<
typename T >
3109 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3110 s.internal_add_built_predecessor(
p);
3111 p.internal_add_built_successor(
s);
3113 p.register_successor(
s );
3118 template<
typename T >
3123 #if __TBB_PREVIEW_ASYNC_MSG 3124 template<
typename TS,
typename TR,
3131 template<
typename T >
3136 template<
typename T >
3141 #endif // __TBB_PREVIEW_ASYNC_MSG 3143 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3145 template<
typename T,
typename V,
3146 typename =
typename T::output_ports_type,
typename =
typename V::input_ports_type >
3148 make_edge(get<0>(output.output_ports()), get<0>(input.input_ports()));
3152 template<
typename T,
typename R,
3153 typename =
typename T::output_ports_type >
3155 make_edge(get<0>(output.output_ports()), input);
3159 template<
typename S,
typename V,
3160 typename =
typename V::input_ports_type >
3162 make_edge(output, get<0>(input.input_ports()));
3166 #if __TBB_PREVIEW_ASYNC_MSG 3169 template<
typename T >
3172 p.remove_successor(
s );
3173 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3175 p.internal_delete_built_successor(
s);
3176 s.internal_delete_built_predecessor(
p);
3182 template<
typename T >
3187 #if __TBB_PREVIEW_ASYNC_MSG 3188 template<
typename TS,
typename TR,
3195 template<
typename T >
3200 template<
typename T >
3204 #endif // __TBB_PREVIEW_ASYNC_MSG 3206 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3208 template<
typename T,
typename V,
3209 typename =
typename T::output_ports_type,
typename =
typename V::input_ports_type >
3211 remove_edge(get<0>(output.output_ports()), get<0>(input.input_ports()));
3215 template<
typename T,
typename R,
3216 typename =
typename T::output_ports_type >
3218 remove_edge(get<0>(output.output_ports()), input);
3221 template<
typename S,
typename V,
3222 typename =
typename V::input_ports_type >
3228 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3229 template<
typename C >
3230 template<
typename S >
3231 void internal::edge_container<C>::sender_extract(
S &
s ) {
3232 edge_list_type e = built_edges;
3233 for (
typename edge_list_type::iterator i = e.begin(); i != e.end(); ++i ) {
3238 template<
typename C >
3239 template<
typename R >
3240 void internal::edge_container<C>::receiver_extract( R &r ) {
3241 edge_list_type e = built_edges;
3242 for (
typename edge_list_type::iterator i = e.begin(); i != e.end(); ++i ) {
3249 template<
typename Body,
typename Node >
3251 return n.template copy_function_object<Body>();
3254 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3259 template<
typename... InputTypes,
typename... OutputTypes>
3270 static const size_t NUM_INPUTS =
sizeof...(InputTypes);
3271 static const size_t NUM_OUTPUTS =
sizeof...(OutputTypes);
3277 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3288 template<
typename T1,
typename T2>
3292 my_input_ports = tbb::internal::make_unique<input_ports_type>(std::forward<T1>(input_ports_tuple));
3293 my_output_ports = tbb::internal::make_unique<output_ports_type>(std::forward<T2>(output_ports_tuple));
3299 template<
typename... NodeTypes >
3302 template<
typename... NodeTypes >
3305 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3312 __TBB_ASSERT(my_input_ports,
"input ports not set, call set_external_ports to set input ports");
3313 return *my_input_ports;
3317 __TBB_ASSERT(my_output_ports,
"output ports not set, call set_external_ports to set output ports");
3318 return *my_output_ports;
3321 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3323 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3329 template<
typename... InputTypes>
3336 static const size_t NUM_INPUTS =
sizeof...(InputTypes);
3342 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3353 template<
typename T>
3357 my_input_ports = tbb::internal::make_unique<input_ports_type>(std::forward<T>(input_ports_tuple));
3362 template<
typename... NodeTypes >
3365 template<
typename... NodeTypes >
3368 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3375 __TBB_ASSERT(my_input_ports,
"input ports not set, call set_external_ports to set input ports");
3376 return *my_input_ports;
3379 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3381 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3388 template<
typename... OutputTypes>
3395 static const size_t NUM_OUTPUTS =
sizeof...(OutputTypes);
3401 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3412 template<
typename T>
3416 my_output_ports = tbb::internal::make_unique<output_ports_type>(std::forward<T>(output_ports_tuple));
3421 template<
typename... NodeTypes >
3424 template<
typename... NodeTypes >
3427 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3434 __TBB_ASSERT(my_output_ports,
"output ports not set, call set_external_ports to set output ports");
3435 return *my_output_ports;
3438 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3440 __TBB_ASSERT(
false,
"Current composite_node implementation does not support extract");
3446 #endif // __TBB_FLOW_GRAPH_CPP11_FEATURES 3448 namespace internal {
3450 template<
typename Gateway>
3464 template<
typename Input,
typename Ports,
typename Gateway,
typename Body>
3486 template <
typename Input,
typename Output,
3552 template<
typename Body>
3560 tbb::internal::fgt_multioutput_node_with_body<1>(
3561 tbb::internal::FLOW_ASYNC_NODE,
3568 static_cast<async_body_base_type*>(this->my_body->get_body_ptr())->set_gateway(&
my_gateway);
3569 static_cast<async_body_base_type*>(this->my_init_body->get_body_ptr())->set_gateway(&
my_gateway);
3571 tbb::internal::fgt_multioutput_node_with_body<1>( tbb::internal::FLOW_ASYNC_NODE,
3580 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3590 return internal::output_port<0>(*this).register_successor(r);
3595 return internal::output_port<0>(*this).remove_successor(r);
3598 template<
typename Body>
3602 mfn_body_type &body_ref = *this->
my_body;
3604 return ab.get_body();
3607 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3608 typedef typename internal::edge_container<successor_type> built_successors_type;
3610 typedef typename built_successors_type::edge_list_type successor_list_type;
3612 return internal::output_port<0>(*this).built_successors();
3616 internal::output_port<0>(*this).internal_add_built_successor(r);
3620 internal::output_port<0>(*this).internal_delete_built_successor(r);
3624 internal::output_port<0>(*this).copy_successors(l);
3628 return internal::output_port<0>(*this).successor_count();
3639 #if __TBB_PREVIEW_STREAMING_NODE 3641 #endif // __TBB_PREVIEW_STREAMING_NODE 3646 namespace interface10a {
3648 using namespace interface10;
3649 namespace internal = interface10::internal;
3651 template<
typename T >
3658 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3682 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3692 bool ret =
s.try_put( my_buffer );
3701 task *rtask =
new ( task::allocate_additional_child_of( *( my_graph.root_task() ) ) )
3718 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3719 built_predecessors_type &built_predecessors()
__TBB_override {
return my_built_predecessors; }
3720 built_successors_type &built_successors()
__TBB_override {
return my_successors.built_successors(); }
3722 void internal_add_built_successor( successor_type &
s)
__TBB_override {
3724 my_successors.internal_add_built_successor(
s);
3727 void internal_delete_built_successor( successor_type &
s)
__TBB_override {
3729 my_successors.internal_delete_built_successor(
s);
3734 return my_successors.successor_count();
3739 my_successors.copy_successors(v);
3742 void internal_add_built_predecessor( predecessor_type &
p)
__TBB_override {
3744 my_built_predecessors.add_edge(
p);
3747 void internal_delete_built_predecessor( predecessor_type &
p)
__TBB_override {
3749 my_built_predecessors.delete_edge(
p);
3754 return my_built_predecessors.edge_count();
3757 void copy_predecessors( predecessor_list_type &v )
__TBB_override {
3759 my_built_predecessors.copy_edges(v);
3763 my_buffer_is_valid =
false;
3764 built_successors().sender_extract(*
this);
3765 built_predecessors().receiver_extract(*
this);
3772 if ( my_buffer_is_valid ) {
3792 return my_buffer_is_valid;
3797 my_buffer_is_valid =
false;
3807 return try_put_task_impl(v);
3812 my_buffer_is_valid =
true;
3826 o(owner),
s(succ) {};
3829 if (!
s.register_predecessor(o)) {
3830 o.register_successor(
s);
3841 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION 3842 internal::edge_container<predecessor_type> my_built_predecessors;
3849 my_buffer_is_valid =
false;
3851 my_successors.
clear();
3856 template<
typename T >
3879 #if TBB_PREVIEW_FLOW_GRAPH_TRACE 3891 return this->my_buffer_is_valid ? NULL : this->try_put_task_impl(v);
3901 using interface10::graph;
3902 using interface10::graph_node;
3903 using interface10::continue_msg;
3905 using interface10::source_node;
3906 using interface10::function_node;
3907 using interface10::multifunction_node;
3908 using interface10::split_node;
3910 using interface10::indexer_node;
3911 using interface10::internal::tagged_msg;
3914 using interface10::continue_node;
3915 using interface10a::overwrite_node;
3916 using interface10a::write_once_node;
3917 using interface10::broadcast_node;
3918 using interface10::buffer_node;
3919 using interface10::queue_node;
3920 using interface10::sequencer_node;
3921 using interface10::priority_queue_node;
3922 using interface10::limiter_node;
3923 using namespace interface10::internal::graph_policy_namespace;
3924 using interface10::join_node;
3930 #if __TBB_FLOW_GRAPH_CPP11_FEATURES 3931 using interface10::composite_node;
3933 using interface10::async_node;
3934 #if __TBB_PREVIEW_ASYNC_MSG 3935 using interface10::async_msg;
3937 #if __TBB_PREVIEW_STREAMING_NODE 3939 using interface10::streaming_node;
3940 #endif // __TBB_PREVIEW_STREAMING_NODE 3941 #if __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES 3950 #undef __TBB_PFG_RESET_ARG 3953 #endif // __TBB_flow_graph_H
Body copy_body(Node &n)
Returns a copy of the body from a function or continue node.
int my_initial_predecessor_count
bool try_get(T &v) __TBB_override
Request an item from the buffer_node.
reference operator*() const
Dereference.
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
void reset_node(reset_flags) __TBB_override
sequencer_node(const sequencer_node &src)
Copy constructor.
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1)
void reset_node(reset_flags f) __TBB_override
buffer_node< T, A >::buffer_operation prio_operation
sender< output_type >::successor_type successor_type
virtual void reset_node(reset_flags f=rf_reset_protocol)=0
task * try_put_task(const X &t)
A task that calls a node's apply_body_bypass function with no input.
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
limiter_node(graph &g, size_t threshold, int num_decrement_predecessors=0)
Constructor.
void internal_consume(prio_operation *op) __TBB_override
bool remove_successor(successor_type &r) __TBB_override
Removes s as a successor.
Implements a function node that supports Input -> Output.
join_node(const join_node &other)
receiver< input_type >::predecessor_type predecessor_type
bool try_release() __TBB_override
Release a reserved item.
internal::tagged_msg< size_t, T0, T1, T2, T3 > 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 parent
std::unique_ptr< input_ports_type > my_input_ports
sender< output_type >::successor_type successor_type
The type of successors of this node.
void release_wait() __TBB_override
Deregisters an external entity that may have interacted with the graph.
static const bool is_async_type
int decrement_ref_count()
Atomically decrement reference count and returns its new value.
task * try_put_task(const input_type &v) __TBB_override
Put item to successor; return task to run the successor if possible.
join_node(const join_node &other)
int init_decrement_predecessors
tbb::flow::interface10::async_node::receiver_gateway_impl my_gateway
base_type::size_type size_type
virtual void handle_operations(buffer_operation *op_list)
void activate_graph(graph &g)
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
~source_node()
The destructor.
bool register_successor(successor_type &r) __TBB_override
Add a new successor to this node.
Enables one or the other code branches.
bool register_predecessor(predecessor_type &) __TBB_override
Increments the trigger threshold.
static void clear_this(P &p)
async_node(graph &g, size_t concurrency,)
std::unique_ptr< input_ports_type > my_input_ports
~sequencer_node()
Destructor.
async_msg< T > async_type
bool internal_push(prio_operation *op) __TBB_override
Represents acquisition of a mutex.
async_body_base< Gateway > base_type
~graph()
Destroys the graph.
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)
priority_queue_node(graph &g)
Constructor.
priority_queue_node(const priority_queue_node &src)
Copy constructor.
function_body that takes an Input and a set of output ports
receiver< input_type >::predecessor_type predecessor_type
tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > InputTuple
An cache of predecessors that supports requests and reservations.
indexer_node(const indexer_node &other)
bool try_consume() __TBB_override
Consumes a reserved item.
sender< output_type >::successor_type successor_type
void reset_node(reset_flags f) __TBB_override
internal::broadcast_cache< input_type, null_rw_mutex > my_successors
void reset_node(reset_flags f) __TBB_override
receiver< input_type >::predecessor_type predecessor_type
void operator()(const Input &v, Ports &)
bool pop_front(item_type &v)
tbb::flow::tuple< sender< OutputTypes > &... > output_ports_type
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)
bool register_successor(successor_type &r) __TBB_override
Replace the current successor with this new successor.
graph & graph_reference() __TBB_override
Forwards messages in arbitrary order.
A cache of successors that are broadcast to.
broadcast_node(const broadcast_node &src)
virtual void internal_forward_task(buffer_operation *op)
Tries to forward valid items to successors.
tuple< T0, T1 > InputTuple
Breaks an infinite loop between the node reservation and register_successor call.
virtual bool try_get_wrapper(void *p, bool is_async) __TBB_override
unsigned int node_priority_t
buffer_node< T, A >::size_type size_type
receiver_gateway< output_type > gateway_type
void const char const char int ITT_FORMAT __itt_group_sync s
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
bool try_get(X &t)
Request an item from the sender.
void prepare_task_arena(bool reinit=false)
void reset_node(reset_flags) __TBB_override
overwrite_node< T > base_type
virtual task * try_put_task_wrapper(const void *p, bool is_async) __TBB_override
buffer_operation(const T &e, op_type t)
void reset_node(reset_flags f) __TBB_override
resets the source_node to its initial state
internal::unfolded_indexer_node< InputTuple > unfolded_type
virtual ~untyped_receiver()
Destructor.
bool try_get(input_type &v) __TBB_override
Request an item from the sender.
size_type size(size_t new_tail=0)
task that does nothing. Useful for synchronization.
continue_msg input_type
The input type.
virtual void internal_consume(buffer_operation *op)
virtual bool register_predecessor(predecessor_type &)
Add a predecessor to the node.
void internal_forward_task(prio_operation *op) __TBB_override
Tries to forward valid items to successors.
async_body(const Body &body, gateway_type *gateway)
bool pop_back(item_type &v)
void move_item(size_t to, size_t from)
internal::tagged_msg< size_t, T0, T1, T2, T3, T4 > output_type
input_impl_type::predecessor_type predecessor_type
void set_external_ports(T &&input_ports_tuple)
void handle_operations(prio_operation *op_list) __TBB_override
Used to form groups of tasks.
bool try_release() __TBB_override
Release a reserved item.
indexer_node(const indexer_node &other)
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)
bool try_put(const output_type &i)
internal::multifunction_input< input_type, output_ports_type, Policy, Allocator > input_impl_type
Pure virtual template class that defines a receiver of messages of type T.
internal::unfolded_indexer_node< InputTuple > unfolded_type
static void fgt_composite(void *, void *)
Implements methods for both executable and function nodes that puts Output to its successors.
task * try_put_task(const T &t) __TBB_override
receive an item, return a task *if possible
virtual bool is_continue_receiver()
item_buffer with reservable front-end. NOTE: if reserving, do not
void activate()
Activates a node that was created in the inactive state.
virtual graph & graph_reference()=0
void __TBB_store_with_release(volatile T &location, V value)
virtual void internal_reserve(buffer_operation *op)
receiver< input_type >::predecessor_type predecessor_type
The predecessor type for this node.
bool push_back(item_type &v)
interface10::internal::Policy< queueing, lightweight > queueing_lightweight
void remove_successor(successor_type &r)
void release_wait() __TBB_override
Inform a graph that a previous call to reserve_wait is no longer in effect.
const item_type & back() const
receiver_type::predecessor_type predecessor_type
const item_type & front() const
void reset_node(reset_flags f) __TBB_override
input_ports_type & input_ports()
wrap_tuple_elements< N, PT, OutputTuple >::type input_ports_type
A cache of predecessors that only supports try_get.
virtual bool try_reserve_wrapper(void *p, bool is_async)=0
receiver_gateway_impl(async_node *node)
Output output_type
The type of the output message, which is complete.
internal::wrap_tuple_elements< N, internal::multifunction_output, TupleType >::type output_ports_type
indexer_node(const indexer_node &other)
bool try_consume() __TBB_override
Consumes a reserved item.
static void fgt_graph_desc(void *, const char *)
bool remove_predecessor(predecessor_type &src) __TBB_override
Removes src from the list of cached predecessors.
internal::round_robin_cache< T, null_rw_mutex > my_successors
void reset_function_input(reset_flags f)
#define __TBB_FLOW_GRAPH_PRIORITY_ARG0(priority)
indexer_node(const indexer_node &other)
An abstract cache of successors.
Detects whether two given types are the same.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
void add_visible_nodes(const NodeTypes &... n)
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2)
virtual void reset_receiver(reset_flags f=rf_reset_protocol)=0
put receiver back in initial state
void internal_forward_task_impl(buffer_operation *op, derived_type *derived)
internal::continue_input< Output, Policy > input_impl_type
void increment_ref_count()
Atomically increment reference count.
void reset_receiver(reset_flags f) __TBB_override
put receiver back in initial state
sender< output_type >::successor_type successor_type
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.
task * try_put_task(const T &t) __TBB_override
Puts an item to this receiver.
tuple< T0, T1, T2, T3, T4, T5, T6 > InputTuple
tbb::internal::uint64_t tag_value
register_predecessor_task(predecessor_type &owner, successor_type &succ)
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
sender< output_type >::successor_type successor_type
tbb::task * root_task()
Returns the root task of the graph.
bool try_reserve(output_type &v) __TBB_override
Reserves an item.
split_node: accepts a tuple as input, forwards each element of the tuple to its
Base class for user-defined tasks.
graph & graph_reference() __TBB_override
void reset_node(reset_flags) __TBB_override
tuple< T0, T1, T2, T3, T4, T5 > InputTuple
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
task * try_put_task(const T &t) __TBB_override
build a task to run the successor if possible. Default is old behavior.
internal::tagged_msg< size_t, T0, T1 > output_type
Base class for receivers of completion messages.
input_type & input_ports()
Body copy_function_object()
virtual bool try_get_wrapper(void *p, bool is_async)=0
continue_receiver(__TBB_FLOW_GRAPH_PRIORITY_ARG1(int number_of_predecessors, node_priority_t priority))
Constructor.
bool remove_successor(successor_type &s) __TBB_override
Removes a successor from this node.
An executable node that acts as a source, i.e. it has no predecessors.
sender< output_type >::successor_type successor_type
buffer_node< T, A >::buffer_operation sequencer_operation
priority_queue_node class_type
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
task * try_put_task(const TupleType &t) __TBB_override
Put item to successor; return task to run the successor if possible.
task * apply_body_bypass()
Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it.
static void fgt_node_with_body(string_index, void *, void *, void *)
Implements methods for an executable node that takes continue_msg as input.
virtual bool try_consume()
Consumes the reserved item.
static void fgt_multiinput_multioutput_node(string_index, void *, void *)
static void fgt_end_body(void *)
void wait_for_all()
Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.
iterator begin()
start iterator
leaf for multifunction. OutputSet can be a std::tuple or a vector.
static void fgt_async_commit(void *, void *)
void execute_in_graph_arena(graph &g, F &f)
Executes custom functor inside graph arena.
virtual bool remove_predecessor(predecessor_type &)
Remove a predecessor from the node.
internal::multifunction_output< Output > output_port_type
Implements methods for a function node that takes a type Input as input.
void reserve_wait() __TBB_override
Inform a graph that messages may come from outside, to prevent premature graph completion.
bool remove_successor(successor_type &r) __TBB_override
Removes a successor from this node.
void reset_node(reset_flags f) __TBB_override
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)
The base of all graph nodes.
static void fgt_graph(void *)
static void fgt_async_try_put_end(void *, void *)
function_node(graph &g, size_t concurrency,)
Constructor.
A lock that occupies a single byte.
void try_put_and_add_task(task *&last_task)
iterator end()
end iterator
Body copy_function_object()
static const T & from_void_ptr(const void *p)
Base class for types that should not be assigned.
function_node(const function_node &src)
Copy constructor.
Forwards messages in FIFO order.
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
void add_visible_nodes(const NodeTypes &... n)
output_ports_type & output_ports()
void reset_node(reset_flags f) __TBB_override
source_node(graph &g, Body body, bool is_active=true)
Constructor for a node with a successor.
bool place_item(size_t here, const item_type &me)
tuple< T0, T1, T2, T3 > InputTuple
Forwards messages of type T to all successors.
virtual bool register_successor(successor_type &r)=0
Add a new successor to this node.
internal::aggregating_functor< class_type, buffer_operation > handler_type
void try_put_and_add_task(task *&last_task)
bool try_reserve(T &v) __TBB_override
Reserves an item.
internal::broadcast_cache< output_type > & successors() __TBB_override
buffer_node(const buffer_node &src)
Copy constructor.
async_body_base(gateway_type *gateway)
indexer_node(const indexer_node &other)
bool enqueue_forwarding_task(buffer_operation &op_data)
implements a function node that supports Input -> (set of outputs)
void reset_node(reset_flags f) __TBB_override
receiver< TupleType > base_type
static tbb::task *const SUCCESSFULLY_ENQUEUED
tbb::flow::tuple< sender< OutputTypes > &... > output_ports_type
receiver< input_type >::predecessor_type predecessor_type
indexer_node(const indexer_node &other)
Meets "allocator" requirements of ISO C++ Standard, Section 20.1.5.
internal::unfolded_join_node< N, reserving_port, OutputTuple, reserving > unfolded_type
bool try_put(const typename internal::async_helpers< T >::filtered_type &t)
Put an item to the receiver.
unfolded_type::input_ports_type input_ports_type
A task that calls a node's forward_task function.
void reset_receiver(reset_flags f) __TBB_override
put receiver back in initial state
tbb::spin_mutex nodelist_mutex
internal::broadcast_cache< output_type > my_successors
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5 > output_type
virtual bool try_release()
Releases the reserved item.
receiver< input_type >::predecessor_type predecessor_type
virtual void finalize() const
static void fgt_release_wait(void *)
void swap_items(size_t i, size_t j)
void add_task_to_graph_reset_list(graph &g, tbb::task *tp)
output_ports_type & output_ports()
tuple< T0, T1, T2, T3, T4, T5, T6, T7, T8 > InputTuple
tuple< T0, T1, T2 > InputTuple
unfolded_type::input_ports_type input_ports_type
internal::source_body< output_type > * my_body
bool try_reserve(T &v) __TBB_override
Reserves an item.
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
void try_put_and_add_task(task *&last_task)
bool is_graph_active(graph &g)
Input and scheduling for a function node that takes a type Input as input.
multifunction_node(const multifunction_node &other)
internal::function_input_queue< input_type, Allocator > input_queue_type
task * try_put_task(const X &t)
internal::function_output< output_type > fOutput_type
const V & cast_to(T const &t)
bool register_successor(successor_type &r) __TBB_override
Adds a successor.
sequencer_node(graph &g, const Sequencer &s)
Constructor.
T output_type
The output type of this sender.
Forward declaration section.
static void fgt_async_try_put_begin(void *, void *)
static const void * to_void_ptr(const T &t)
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
unfolded_type::input_ports_type input_ports_type
virtual task * try_put_task_wrapper(const void *p, bool is_async)=0
graph()
Constructs a graph with isolated task_group_context.
field of type K being used for matching.
Base class for tasks generated by graph nodes.
internal::broadcast_cache< T > my_successors
virtual void internal_reg_succ(buffer_operation *op)
Register successor.
Forwards messages in priority order.
task * decrement_counter()
void remove_node(graph_node *n)
static void fgt_async_reserve(void *, void *)
internal::async_helpers< T >::filtered_type filtered_type
void internal_remove_edge(internal::untyped_sender &p, internal::untyped_receiver &s)
std::unique_ptr< output_ports_type > my_output_ports
indexer_node(const indexer_node &other)
internal::async_helpers< T >::filtered_type filtered_type
internal::unfolded_indexer_node< InputTuple > unfolded_type
internal::unfolded_indexer_node< InputTuple > unfolded_type
std::unique_ptr< output_ports_type > my_output_ports
void reserve_wait() __TBB_override
Used to register that an external entity may still interact with the graph.
bool try_get(output_type &v) __TBB_override
Request an item from the node.
multifunction_node< Input, tuple< Output >, Policy, Allocator > base_type
void make_edge(sender< T > &p, receiver< T > &s)
Makes an edge between a single predecessor and a single successor.
internal::unfolded_indexer_node< InputTuple > unfolded_type
queue_node(const queue_node &src)
Copy constructor.
write_once_node(const write_once_node &src)
Copy constructor: call base class copy constructor.
virtual bool internal_push(buffer_operation *op)
tbb::task_arena * my_task_arena
continue_node(graph &g, int number_of_predecessors,)
Constructor for executable node with continue_msg -> Output.
friend class proxy_dependency_receiver
Implements an executable node that supports continue_msg -> Output.
bool register_predecessor(predecessor_type &src) __TBB_override
Adds src to the list of cached predecessors.
void reset_node(reset_flags f) __TBB_override
void add_nodes(const NodeTypes &... n)
void internal_pop(prio_operation *op) __TBB_override
tuple< T0, T1, T2, T3, T4 > InputTuple
void set_gateway(gateway_type *gateway)
buffer_node< T, A >::item_type item_type
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
graph_iterator()
Default constructor.
void set_external_ports(T &&output_ports_tuple)
static task * emit_this(graph &g, const T &t, P &p)
static const node_priority_t no_priority
static void fgt_remove_edge(void *, void *)
multifunction_body_type * my_body
buffer_node< T, A > class_type
bool my_item_valid(size_type i) const
virtual void internal_release(buffer_operation *op)
virtual task * execute()=0
Does whatever should happen when the threshold is reached.
Forwards messages only if the threshold has not been reached.
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)
static void fgt_reserve_wait(void *)
internal::unfolded_join_node< N, key_matching_port, OutputTuple, key_matching< K, KHash > > unfolded_type
The leaf for source_body.
graph_node * my_nodes_last
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3)
multifunction_node(graph &g, size_t concurrency,)
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8 > output_type
unfolded_join_node : passes input_ports_type to join_node_base. We build the input port type
internal::port_ref_impl< N1, N2 > port_ref()
An empty class used for messages that mean "I'm done".
broadcast_cache_type my_successors
untyped_receiver successor_type
The successor type for this node.
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > output_type
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6, T7 > output_type
internal::unfolded_indexer_node< InputTuple > unfolded_type
indexer_node(const indexer_node &other)
void add_nodes(const NodeTypes &... n)
tbb::task * execute() __TBB_override
Should be overridden by derived classes.
Forwards messages in sequence order.
internal::tagged_msg< size_t, T0, T1, T2 > output_type
void remove_edge(sender< T > &p, receiver< T > &s)
Removes an edge between a single predecessor and a single successor.
void fetch_item(size_t i, item_type &o)
internal::tagged_msg< size_t, T0, T1, T2, T3, T4, T5, T6 > output_type
void fgt_multiinput_multioutput_node_desc(const NodeType *, const char *)
buffer_node(graph &g)
Constructor.
join_node(graph &g, __TBB_B0 b0, __TBB_B1 b1, __TBB_B2 b2, __TBB_B3 b3, __TBB_B4 b4)
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
virtual void internal_rem_succ(buffer_operation *op)
Remove successor.
bool try_reserve(X &t)
Reserves an item in the sender.
base_type::output_ports_type output_ports_type
static void fgt_node(string_index, void *, void *)
virtual void internal_pop(buffer_operation *op)
buffer_node< T, A > base_type
void reset_receiver(reset_flags) __TBB_override
put receiver back in initial state
receiver< input_type >::predecessor_type predecessor_type
K key_from_message(const T &t)
static void fgt_begin_body(void *)
virtual bool remove_successor(successor_type &r)=0
Removes a successor from this node.
tbb::flow::tuple< receiver< InputTypes > &... > input_ports_type
graph & graph_reference() __TBB_override
void register_successor(successor_type &r)
internal::unfolded_join_node< N, queueing_port, OutputTuple, queueing > unfolded_type
write_once_node(graph &g)
Constructor.
void set_external_ports(T1 &&input_ports_tuple, T2 &&output_ports_tuple)
internal::function_input< input_type, output_type, Policy, Allocator > input_impl_type
fOutput_type::successor_type successor_type
task * try_put_task_impl(const input_type &v)
try_put_functor(output_port_type &p, const Output &v)
receiver< input_type > receiver_type
gateway_type * my_gateway
void destroy_item(size_type i)
bool try_consume() __TBB_override
Consumes the reserved item.
internal::multifunction_input< input_type, output_ports_type, Policy, Allocator > base_type
output_ports_type my_output_ports
virtual bool try_reserve(T &)
Reserves an item in the sender.
source_node(const source_node &src)
Copy constructor.
internal::broadcast_cache< input_type > my_successors
tuple< T0, T1, T2, T3, T4, T5, T6, T7 > InputTuple
void internal_forward_task(queue_operation *op) __TBB_override
Tries to forward valid items to successors.
void reset(reset_flags f)
output_ports_type & output_ports()
virtual bool try_reserve_wrapper(void *p, bool is_async) __TBB_override
tbb::flow::tuple< receiver< InputTypes > &... > input_ports_type
bool remove_successor(successor_type &r) __TBB_override
Removes a successor.
tbb::task_group_context * my_context
graph_iterator< const graph, const graph_node > const_iterator
receiver< input_type >::predecessor_type predecessor_type
void register_node(graph_node *n)
internal::unfolded_indexer_node< InputTuple > unfolded_type
fOutput_type::successor_type successor_type
concurrency
An enumeration the provides the two most common concurrency levels: unlimited and serial.
internal::tagged_msg< size_t, T0 > output_type
bool try_put(const X &t)
Put an item to the receiver.
successors_type my_successors
void set_owner(owner_type *owner)
#define __TBB_FLOW_GRAPH_PRIORITY_EXPR(expr)
void reset_node(reset_flags f) __TBB_override
void add_nodes(const NodeTypes &... n)
void add_nodes_impl(CompositeType *, bool)
T input_type
The input type of this receiver.
bool register_successor(successor_type &s) __TBB_override
Add a new successor to this node.
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
const_iterator cbegin() const
start const iterator
void const char const char int ITT_FORMAT __itt_group_sync p
void prio_push(const T &src)
const_iterator cend() const
end const iterator
continue_node(const continue_node &src)
Copy constructor.
output_type my_cached_item
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
async_node(const async_node &other)
overwrite_node(const overwrite_node &src)
Copy constructor; doesn't take anything from src; default won't work.
queue_node(graph &g)
Constructor.
graph_iterator< graph, graph_node > iterator
void spawn_put()
Spawns a task that applies the body.
buffer_node< T, A > base_type
static void fgt_node_desc(const NodeType *, const char *)
buffer_operation(op_type t)
input_ports_type & input_ports()
internal::wrap_tuple_elements< N, internal::multifunction_output, Output >::type output_ports_type
task * try_put_task(const T &v) __TBB_override
Put item to successor; return task to run the successor if possible.
bool remove_predecessor(predecessor_type &) __TBB_override
Decrements the trigger threshold.
base_type::buffer_operation queue_operation
join_node(const join_node &other)
internal::unfolded_indexer_node< InputTuple > unfolded_type
async_storage_ptr my_storage
task_list_type my_reset_task_list
internal::function_input_queue< input_type, Allocator > input_queue_type
buffer_node< T, A >::size_type size_type
bool try_put(const Output &i) __TBB_override
Implements gateway_type::try_put for an external activity to submit a message to FG.
A cache of successors that are put in a round-robin fashion.
graph & graph_reference() __TBB_override
Implements methods for a function node that takes a type Input as input and sends.
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 __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 internal_reserve(prio_operation *op) __TBB_override
void reset_node(reset_flags f) __TBB_override
static const void * to_void_ptr(const T &t)
untyped_sender predecessor_type
The predecessor type for this node.
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
virtual ~untyped_sender()
internal::async_body_base< gateway_type > async_body_base_type
graph & graph_reference() __TBB_override
internal::multifunction_input< Input, typename base_type::output_ports_type, Policy, Allocator > mfn_input_type
bool register_successor(successor_type &r) __TBB_override
Adds a new successor.
receiver< input_type >::predecessor_type predecessor_type
void reset(reset_flags f=rf_reset_protocol)
void internal_reserve(queue_operation *op) __TBB_override
sender< output_type >::successor_type successor_type
virtual task * forward_task()
This is executed by an enqueued task, the "forwarder".
void internal_consume(queue_operation *op) __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 * lock
output_ports_type & output_ports()
void internal_release(prio_operation *op) __TBB_override
const item_type & get_my_item(size_t i) const
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
static void alias_port(void *, PortsTuple &)
static task * try_put_task_wrapper_impl(receiver< T > *const this_recv, const void *p, bool is_async)
sender< output_type >::successor_type successor_type
bool try_put_impl(const Output &i)
Implements gateway_type::try_put for an external activity to submit a message to FG.
internal::unfolded_indexer_node< InputTuple > unfolded_type
internal::function_output< output_type > fOutput_type
virtual bool try_get(T &)
Request an item from the sender.
continue_node(graph &g,)
Constructor for executable node with continue_msg -> Output.
void set_ref_count(int count)
Set reference count.
void grow_my_array(size_t minimum_size)
Grows the internal array.
void __TBB_EXPORTED_METHOD reset()
Forcefully reinitializes the context after the task tree it was associated with is completed.
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)
limiter_node(const limiter_node &src)
Copy constructor.
void internal_make_edge(internal::untyped_sender &p, internal::untyped_receiver &s)
pointer operator->() const
Dereference.
GraphNodeType & reference
task * grab_forwarding_task(buffer_operation &op_data)
indexer_node(const indexer_node &other)
void deactivate_graph(graph &g)
static void alias_port(void *, PortsTuple &)
sender< output_type >::successor_type successor_type
void reset_node(reset_flags f) __TBB_override
internal::function_body< T, size_t > * my_sequencer
tbb::flow::tuple_element< N, typename MOP::output_ports_type >::type & output_port(MOP &op)
void add_visible_nodes(const NodeTypes &... n)
predecessor_cache< input_type, null_mutex > my_predecessors
bool is_continue_receiver() __TBB_override
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
bool register_successor(successor_type &r) __TBB_override
Add a new successor to this node.
sender< output_type >::successor_type successor_type
task * try_put_task(const X &t)
continue_receiver(const continue_receiver &src)
Copy constructor.
static void fgt_multioutput_node_desc(const NodeType *, const char *)
internal::source_body< output_type > * my_init_body
bool try_release() __TBB_override
Releases the reserved item.
#define __TBB_STATIC_ASSERT(condition, msg)
input_impl_type::predecessor_type predecessor_type
static void * to_void_ptr(T &t)
bool try_reserve_apply_body(output_type &v)
void internal_pop(queue_operation *op) __TBB_override
internal::aggregator< handler_type, buffer_operation > my_aggregator
void handle_operations_impl(buffer_operation *op_list, derived_type *derived)
static void fgt_make_edge(void *, void *)