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.

1289 {

◆ 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.

1286  { return my_output_ports; }
1287 
1288 protected:

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.

1397  : public graph_node, public receiver<T>, public sender<T> {
1398 public:
1399  typedef T input_type;
1400  typedef T output_type;

◆ 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.

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

◆ 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.

1413  :
1414 
1415  explicit broadcast_node(graph& g) : graph_node(g) {

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.

1483  {

◆ 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 
1318  built_predecessors_type &built_predecessors() __TBB_override { return my_predessors; }
1319 
1321  built_predecessors_type my_predessors;
1322 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
1323 
1324 private:
1325  output_ports_type my_output_ports;
1326 };
1327 
1329 template <typename Output, typename Policy = internal::Policy<void> >
1330 class continue_node : public graph_node, public internal::continue_input<Output, Policy>,
1331  public internal::function_output<Output> {
1332 public:
1333  typedef continue_msg input_type;
1334  typedef Output output_type;
1335  typedef internal::continue_input<Output, Policy> input_impl_type;
1336  typedef internal::function_output<output_type> fOutput_type;
1337  typedef typename input_impl_type::predecessor_type predecessor_type;
1338  typedef typename fOutput_type::successor_type successor_type;
1339 
1341  template <typename Body >
1342  continue_node( graph &g, Body body ) :
1343  graph_node(g), input_impl_type( g, body ) {
1344  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1345  static_cast<receiver<input_type> *>(this),
1346  static_cast<sender<output_type> *>(this), this->my_body );
1347  }
1348 
1349 
1351  template <typename Body >
1352  continue_node( graph &g, int number_of_predecessors, Body body ) :
1353  graph_node(g), input_impl_type( g, number_of_predecessors, body ) {
1354  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1355  static_cast<receiver<input_type> *>(this),
1356  static_cast<sender<output_type> *>(this), this->my_body );
1357  }
1358 
1360  continue_node( const continue_node& src ) :
1361  graph_node(src.my_graph), input_impl_type(src),
1362  internal::function_output<Output>() {
1363  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1364  static_cast<receiver<input_type> *>(this),
1365  static_cast<sender<output_type> *>(this), this->my_body );
1366  }
1367 
1368 #if TBB_PREVIEW_FLOW_GRAPH_TRACE
1369  void set_name( const char *name ) __TBB_override {
1371  }
1372 #endif
1373 
1374 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1375  void extract() __TBB_override {
1376  input_impl_type::my_built_predecessors.receiver_extract(*this);
1377  successors().built_successors().sender_extract(*this);
1378  }
1379 #endif
1380 
1381 protected:
1382  template< typename R, typename B > friend class run_and_put_task;
1383  template<typename X, typename Y> friend class internal::broadcast_cache;
1384  template<typename X, typename Y> friend class internal::round_robin_cache;
1385  using input_impl_type::try_put_task;
1386  internal::broadcast_cache<output_type> &successors () __TBB_override { return fOutput_type::my_successors; }
1387 
1389  input_impl_type::reset_receiver(f);
1390  if(f & rf_clear_edges)successors().clear();
1391  __TBB_ASSERT(!(f & rf_clear_edges) || successors().empty(), "continue_node not reset");
1392  }
1393 }; // continue_node
void reset_node(reset_flags f) __TBB_override
Definition: flow_graph.h:1470
Implements methods for an executable node that takes continue_msg as input.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
#define __TBB_override
Definition: tbb_stddef.h:244
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.
A cache of successors that are put in a round-robin fashion.
static void fgt_node_with_body(string_index, void *, void *, void *)
static void fgt_node_desc(const NodeType *, const char *)
A cache of successors that are broadcast to.
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name

◆ 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.

1422  :
1423  graph_node(src.my_graph), receiver<T>(), sender<T>()

◆ 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.

1424  {
1425  my_successors.set_owner( this );
1426  tbb::internal::fgt_node( tbb::internal::FLOW_BROADCAST_NODE, &this->my_graph,
1427  static_cast<receiver<input_type> *>(this), static_cast<sender<output_type> *>(this) );
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(), and tbb::flow::interface10::internal::successor_cache< T, M >::set_owner().

Here is the call graph for this function:

◆ 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  { return my_built_predecessors; }
1472 
1473  void internal_add_built_predecessor( predecessor_type &p) __TBB_override {
#define __TBB_override
Definition: tbb_stddef.h:244
void const char const char int ITT_FORMAT __itt_group_sync p

◆ 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.

1431  {
1433  }
static void fgt_node_desc(const NodeType *, const char *)
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name

References tbb::internal::fgt_node_desc(), and name.

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 355 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-2018 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.