Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple > Class Template Reference

join_node_base More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >:
Collaboration diagram for tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >:

Classes

class  join_node_base_operation
 

Public Types

typedef OutputTuple output_type
 
typedef sender< output_type >::successor_type successor_type
 
typedef join_node_FE< JP, InputTuple, OutputTuple > input_ports_type
 
- Public Types inherited from tbb::flow::interface10::sender< OutputTuple >
typedef OutputTuple output_type
 The output type of this sender. More...
 
typedef internal::async_helpers< OutputTuple >::filtered_type filtered_type
 
- Public Types inherited from tbb::flow::interface10::internal::untyped_sender
typedef untyped_receiver successor_type
 The successor type for this node. More...
 

Public Member Functions

 join_node_base (graph &g)
 
 join_node_base (const join_node_base &other)
 
template<typename FunctionTuple >
 join_node_base (graph &g, FunctionTuple f)
 
bool register_successor (successor_type &r) __TBB_override
 Add a new successor to this node. More...
 
bool remove_successor (successor_type &r) __TBB_override
 Removes a successor from this node. More...
 
bool try_get (output_type &v) __TBB_override
 Request an item from the sender. More...
 
- Public Member Functions inherited from tbb::flow::interface10::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface10::sender< OutputTuple >
virtual bool try_reserve (OutputTuple &)
 Reserves an item in the sender. More...
 
- Public Member Functions inherited from tbb::flow::interface10::internal::untyped_sender
virtual ~untyped_sender ()
 
virtual bool try_release ()
 Releases the reserved item. More...
 
virtual bool try_consume ()
 Consumes the reserved item. More...
 

Protected Member Functions

void reset_node (reset_flags f) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::sender< OutputTuple >
virtual bool try_get_wrapper (void *p, bool is_async) __TBB_override
 
virtual bool try_reserve_wrapper (void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::internal::untyped_sender
template<typename X >
bool try_get (X &t)
 Request an item from the sender. More...
 
template<typename X >
bool try_reserve (X &t)
 Reserves an item in the sender. More...
 

Protected Attributes

graphmy_graph
 
- Protected Attributes inherited from tbb::flow::interface10::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 

Private Types

enum  op_type {
  reg_succ, rem_succ, try__get, do_fwrd,
  do_fwrd_bypass
}
 
enum  op_stat { WAIT =0, SUCCEEDED, FAILED }
 
typedef join_node_base< JP, InputTuple, OutputTuple > class_type
 
typedef internal::aggregating_functor< class_type, join_node_base_operationhandler_type
 

Private Member Functions

void handle_operations (join_node_base_operation *op_list)
 
taskforward_task ()
 

Private Attributes

bool forwarder_busy
 
aggregator< handler_type, join_node_base_operationmy_aggregator
 
broadcast_cache< output_type, null_rw_mutexmy_successors
 

Friends

class internal::aggregating_functor< class_type, join_node_base_operation >
 
class forward_task_bypass< join_node_base< JP, InputTuple, OutputTuple > >
 

Detailed Description

template<typename JP, typename InputTuple, typename OutputTuple>
class tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >

join_node_base

Definition at line 867 of file flow_graph.h.

Member Typedef Documentation

◆ class_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef join_node_base<JP,InputTuple,OutputTuple> tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::class_type
private

Definition at line 1290 of file flow_graph.h.

◆ handler_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef internal::aggregating_functor<class_type, join_node_base_operation> tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::handler_type
private

Definition at line 1311 of file flow_graph.h.

◆ input_ports_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef join_node_FE<JP, InputTuple, OutputTuple> tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::input_ports_type

Definition at line 1272 of file flow_graph.h.

◆ output_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef OutputTuple tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::output_type

Definition at line 1269 of file flow_graph.h.

◆ successor_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef sender<output_type>::successor_type tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::successor_type

Definition at line 1271 of file flow_graph.h.

Member Enumeration Documentation

◆ op_stat

template<typename JP , typename InputTuple , typename OutputTuple >
enum tbb::flow::interface10::internal::join_node_base::op_stat
private
Enumerator
WAIT 
SUCCEEDED 
FAILED 

Definition at line 1289 of file flow_graph.h.

1291 {

◆ op_type

template<typename JP , typename InputTuple , typename OutputTuple >
enum tbb::flow::interface10::internal::join_node_base::op_type
private
Enumerator
reg_succ 
rem_succ 
try__get 
do_fwrd 
do_fwrd_bypass 

Definition at line 1284 of file flow_graph.h.

1284  : graph_node(other.my_graph), base_type(other)
1285  {
1286  tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1287  static_cast<receiver<input_type> *>(this), this->output_ports());
1288  }

Constructor & Destructor Documentation

◆ join_node_base() [1/3]

template<typename JP , typename InputTuple , typename OutputTuple >
tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base ( graph g)
inline

Definition at line 1396 of file flow_graph.h.

1400  { return fOutput_type::my_successors; }

◆ join_node_base() [2/3]

template<typename JP , typename InputTuple , typename OutputTuple >
tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base ( const join_node_base< JP, InputTuple, OutputTuple > &  other)
inline

Definition at line 1402 of file flow_graph.h.

1402  {
1403  input_impl_type::reset_receiver(f);
1404  if(f & rf_clear_edges)successors().clear();
1405  __TBB_ASSERT(!(f & rf_clear_edges) || successors().empty(), "continue_node not reset");
1406  }
1407 }; // continue_node
1408 
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

◆ join_node_base() [3/3]

template<typename JP , typename InputTuple , typename OutputTuple >
template<typename FunctionTuple >
tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base ( graph g,
FunctionTuple  f 
)
inline

Definition at line 1411 of file flow_graph.h.

1411  : public graph_node, public receiver<T>, public sender<T> {
1412 public:
1413  typedef T input_type;
1414  typedef T output_type;
1415  typedef typename receiver<input_type>::predecessor_type predecessor_type;
untyped_sender predecessor_type
The predecessor type for this node.
Definition: flow_graph.h:343

Member Function Documentation

◆ forward_task()

template<typename JP , typename InputTuple , typename OutputTuple >
task* tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::forward_task ( )
inlineprivate

Definition at line 1479 of file flow_graph.h.

1479  {
1480  my_successors.copy_successors(v);
1481  }
1482 
1483  typedef typename receiver<T>::built_predecessors_type built_predecessors_type;
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1476

References tbb::flow::interface10::broadcast_node< T >::my_successors.

◆ handle_operations()

template<typename JP , typename InputTuple , typename OutputTuple >
void tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::handle_operations ( join_node_base_operation op_list)
inlineprivate

Definition at line 1316 of file flow_graph.h.

1316  {}
1317 
1319  void internal_add_built_predecessor(predecessor_type&) __TBB_override {}
1320 
1322  void internal_delete_built_predecessor(predecessor_type&) __TBB_override {}
1323 
1324  size_t predecessor_count() __TBB_override { return 0; }
1325 
1326  void copy_predecessors(predecessor_list_type&) __TBB_override {}
1327 
1328  built_predecessors_type &built_predecessors() __TBB_override { return my_predessors; }
1329 
1331  built_predecessors_type my_predessors;
1332 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
1333 
1334 private:
1335  output_ports_type my_output_ports;
1336 };
1337 
1339 template <typename Output, typename Policy = internal::Policy<void> >
1340 class continue_node : public graph_node, public internal::continue_input<Output, Policy>,
1341  public internal::function_output<Output> {
1342 public:
1343  typedef continue_msg input_type;
1344  typedef Output output_type;
1345  typedef internal::continue_input<Output, Policy> input_impl_type;
1346  typedef internal::function_output<output_type> fOutput_type;
1347  typedef typename input_impl_type::predecessor_type predecessor_type;
1348  typedef typename fOutput_type::successor_type successor_type;
1349 
1351  template <typename Body >
1352  continue_node(
1353  graph &g,
1355  ) : graph_node(g), input_impl_type( g, __TBB_FLOW_GRAPH_PRIORITY_ARG1(body, priority) ) {
1356  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1357  static_cast<receiver<input_type> *>(this),
1358  static_cast<sender<output_type> *>(this), this->my_body );
1359  }
1360 
1362  template <typename Body >
1363  continue_node(
1364  graph &g, int number_of_predecessors,
1366  ) : graph_node(g)
1367  , input_impl_type(g, number_of_predecessors, __TBB_FLOW_GRAPH_PRIORITY_ARG1(body, priority)) {
1368  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1369  static_cast<receiver<input_type> *>(this),
1370  static_cast<sender<output_type> *>(this), this->my_body );
1371  }
1372 
1374  continue_node( const continue_node& src ) :
1375  graph_node(src.my_graph), input_impl_type(src),
1376  internal::function_output<Output>() {
1377  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1378  static_cast<receiver<input_type> *>(this),
1379  static_cast<sender<output_type> *>(this), this->my_body );
1380  }
1381 
1382 #if TBB_PREVIEW_FLOW_GRAPH_TRACE
1383  void set_name( const char *name ) __TBB_override {
1385  }
1386 #endif
1387 
1388 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1389  void extract() __TBB_override {
1390  input_impl_type::my_built_predecessors.receiver_extract(*this);
1391  successors().built_successors().sender_extract(*this);
1392  }
1393 #endif
#define __TBB_override
Definition: tbb_stddef.h:244
static const node_priority_t no_priority
unsigned int node_priority_t
sender< output_type >::successor_type successor_type
Definition: flow_graph.h:1271
Implements methods for both executable and function nodes that puts Output to its successors.
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
static void fgt_node_with_body(string_index, void *, void *, void *)
Implements methods for an executable node that takes continue_msg as input.
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
static void fgt_node_desc(const NodeType *, const char *)

◆ register_successor()

template<typename JP , typename InputTuple , typename OutputTuple >
bool tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::register_successor ( successor_type r)
inlinevirtual

Add a new successor to this node.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 1417 of file flow_graph.h.

1421  :
A cache of successors that are broadcast to.
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1476

◆ remove_successor()

template<typename JP , typename InputTuple , typename OutputTuple >
bool tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::remove_successor ( successor_type r)
inlinevirtual

Removes a successor from this node.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 1423 of file flow_graph.h.

1427  :
1428 

◆ reset_node()

template<typename JP , typename InputTuple , typename OutputTuple >
void tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::reset_node ( reset_flags  f)
inlineprotectedvirtual

Implements tbb::flow::interface10::graph_node.

Definition at line 1470 of file flow_graph.h.

1471  {
1472  my_successors.internal_delete_built_successor(r);
1473  }
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1476

References tbb::flow::interface10::broadcast_node< T >::my_successors.

◆ try_get()

template<typename JP , typename InputTuple , typename OutputTuple >
bool tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::try_get ( output_type )
inlinevirtual

Request an item from the sender.

Reimplemented from tbb::flow::interface10::sender< OutputTuple >.

Definition at line 1429 of file flow_graph.h.

1429  : graph_node(g) {
1430  my_successors.set_owner( this );
1431  tbb::internal::fgt_node( tbb::internal::FLOW_BROADCAST_NODE, &this->my_graph,
1432  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );
1433  }
void set_owner(owner_type *owner)
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1476
static void fgt_node(string_index, void *, void *)

References tbb::internal::fgt_node(), tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::broadcast_node< T >::my_successors, and tbb::flow::interface10::internal::successor_cache< T, M >::set_owner().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ forward_task_bypass< join_node_base< JP, InputTuple, OutputTuple > >

template<typename JP , typename InputTuple , typename OutputTuple >
friend class forward_task_bypass< join_node_base< JP, InputTuple, OutputTuple > >
friend

Definition at line 1478 of file flow_graph.h.

◆ internal::aggregating_functor< class_type, join_node_base_operation >

template<typename JP , typename InputTuple , typename OutputTuple >
friend class internal::aggregating_functor< class_type, join_node_base_operation >
friend

Definition at line 1312 of file flow_graph.h.

Member Data Documentation

◆ forwarder_busy

template<typename JP , typename InputTuple , typename OutputTuple >
bool tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::forwarder_busy
private

Definition at line 1313 of file flow_graph.h.

◆ my_aggregator

template<typename JP , typename InputTuple , typename OutputTuple >
aggregator<handler_type, join_node_base_operation> tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::my_aggregator
private

Definition at line 1314 of file flow_graph.h.

◆ my_graph

template<typename JP , typename InputTuple , typename OutputTuple >
graph& tbb::flow::interface10::graph_node::my_graph
protected

Definition at line 432 of file _flow_graph_impl.h.

◆ my_successors

template<typename JP , typename InputTuple , typename OutputTuple >
broadcast_cache<output_type, null_rw_mutex> tbb::flow::interface10::internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors
private

Definition at line 1476 of file flow_graph.h.


The documentation for this class was generated from the following file:

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.