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 863 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 1286 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 1307 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 1268 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 1265 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 1267 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 1285 of file flow_graph.h.

1287 {

◆ 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 1280 of file flow_graph.h.

1280  : graph_node(other.my_graph), base_type(other)
1281  {
1282  tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1283  static_cast<receiver<input_type> *>(this), this->output_ports());
1284  }

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 1392 of file flow_graph.h.

1396  { 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 1398 of file flow_graph.h.

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

◆ 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 1407 of file flow_graph.h.

1407  : public graph_node, public receiver<T>, public sender<T> {
1408 public:
1409  typedef T input_type;
1410  typedef T output_type;
1411  typedef typename receiver<input_type>::predecessor_type predecessor_type;
untyped_sender predecessor_type
The predecessor type for this node.
Definition: flow_graph.h:339

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 1475 of file flow_graph.h.

1475  {
1476  my_successors.copy_successors(v);
1477  }
1478 
1479  typedef typename receiver<T>::built_predecessors_type built_predecessors_type;
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1472

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 1312 of file flow_graph.h.

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

◆ 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 1413 of file flow_graph.h.

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

◆ 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 1419 of file flow_graph.h.

1423  :
1424 

◆ 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 1466 of file flow_graph.h.

1467  {
1468  my_successors.internal_delete_built_successor(r);
1469  }
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1472

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 1425 of file flow_graph.h.

1425  : graph_node(g) {
1426  my_successors.set_owner( this );
1427  tbb::internal::fgt_node( tbb::internal::FLOW_BROADCAST_NODE, &this->my_graph,
1428  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );
1429  }
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1472
void set_owner(owner_type *owner)
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 1474 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 1308 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 1309 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 1310 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 428 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 1472 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.