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

Private Types

enum  op_type {
  reg_succ, rem_succ, try__get, do_fwrd,
  do_fwrd_bypass
}
 
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 > >
 

Additional Inherited Members

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

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 860 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 1281 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 1302 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 1264 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 1261 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 1263 of file flow_graph.h.

Member Enumeration Documentation

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

1277  : graph_node(g)
1278  {
1279  tbb::internal::fgt_multioutput_node<N>(tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1280  static_cast<receiver<input_type> *>(this), this->output_ports());

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

1387  {
1388  input_impl_type::my_built_predecessors.receiver_extract(*this);
1389  successors().built_successors().sender_extract(*this);
1390  }
1391 #endif

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

1393  :
1394  template< typename R, typename B > friend class run_and_put_task;
1395  template<typename X, typename Y> friend class internal::broadcast_cache;
1396  template<typename X, typename Y> friend class internal::round_robin_cache;
1397  using input_impl_type::try_put_task;
1398  internal::broadcast_cache<output_type> &successors () __TBB_override { return fOutput_type::my_successors; }
1399 
#define __TBB_override
Definition: tbb_stddef.h:240
A cache of successors that are broadcast to.
A cache of successors that are put in a round-robin fashion.

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

1409  : public graph_node, public receiver<T>, public sender<T> {

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

References __TBB_override.

1473  {
1474  return my_successors.successor_count();
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1467

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

1308  {}
1309  graph& graph_reference() __TBB_override {
1310  return my_graph;
1311  }
1312 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1313 private:
1314  void extract() __TBB_override {}
1315 
1317  void internal_add_built_predecessor(predecessor_type&) __TBB_override {}
1318 
1320  void internal_delete_built_predecessor(predecessor_type&) __TBB_override {}
1321 
1322  size_t predecessor_count() __TBB_override { return 0; }
1323 
1324  void copy_predecessors(predecessor_list_type&) __TBB_override {}
1325 
1326  built_predecessors_type &built_predecessors() __TBB_override { return my_predessors; }
1327 
1329  built_predecessors_type my_predessors;
1330 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
1331 
1332 private:
1333  output_ports_type my_output_ports;
1334 };
1335 
1337 template <typename Output, typename Policy = internal::Policy<void> >
1338 class continue_node : public graph_node, public internal::continue_input<Output, Policy>,
1339  public internal::function_output<Output> {
1340 public:
1341  typedef continue_msg input_type;
1342  typedef Output output_type;
1343  typedef internal::continue_input<Output, Policy> input_impl_type;
1344  typedef internal::function_output<output_type> fOutput_type;
1345  typedef typename input_impl_type::predecessor_type predecessor_type;
1346  typedef typename fOutput_type::successor_type successor_type;
1347 
1349  template <typename Body >
1350  continue_node(
1351  graph &g,
1353  ) : graph_node(g), input_impl_type( g, __TBB_FLOW_GRAPH_PRIORITY_ARG1(body, priority) ) {
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  template <typename Body >
1361  continue_node(
1362  graph &g, int number_of_predecessors,
1364  ) : graph_node(g)
1365  , input_impl_type(g, number_of_predecessors, __TBB_FLOW_GRAPH_PRIORITY_ARG1(body, priority)) {
1366  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1367  static_cast<receiver<input_type> *>(this),
1368  static_cast<sender<output_type> *>(this), this->my_body );
1369  }
1370 
1372  continue_node( const continue_node& src ) :
1373  graph_node(src.my_graph), input_impl_type(src),
1374  internal::function_output<Output>() {
1375  tbb::internal::fgt_node_with_body( tbb::internal::FLOW_CONTINUE_NODE, &this->my_graph,
1376  static_cast<receiver<input_type> *>(this),
1377  static_cast<sender<output_type> *>(this), this->my_body );
1378  }
1379 
1380 #if TBB_PREVIEW_FLOW_GRAPH_TRACE
1381  void set_name( const char *name ) __TBB_override {
1383  }
1384 #endif
#define __TBB_override
Definition: tbb_stddef.h:240
unsigned int node_priority_t
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
sender< output_type >::successor_type successor_type
Definition: flow_graph.h:1263
#define __TBB_FLOW_GRAPH_PRIORITY_ARG1(arg1, priority)
static const node_priority_t no_priority
Implements methods for both executable and function nodes that puts Output to its successors...
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 1408 of file flow_graph.h.

1409  : public graph_node, public receiver<T>, public sender<T> {
1410 public:
1411  typedef T input_type;
1412  typedef T output_type;

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

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

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

References __TBB_override.

1463  { return my_successors.built_successors(); }
1464 
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: flow_graph.h:1467

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

1425  :
1426 

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 1469 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 1303 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 1304 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 1305 of file flow_graph.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 1467 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.