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

join_node_base More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface11::internal::join_node_base< JP, InputTuple, OutputTuple >:
Collaboration diagram for tbb::flow::interface11::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::interface11::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::interface11::graph_node
 graph_node (graph &g)
 
virtual ~graph_node ()
 
- Public Member Functions inherited from tbb::flow::interface11::sender< OutputTuple >
virtual bool try_reserve (OutputTuple &)
 Reserves an item in the sender. More...
 
- Public Member Functions inherited from tbb::flow::interface11::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::interface11::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::interface11::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

- Public Attributes inherited from tbb::flow::interface11::sender< OutputTuple >
__TBB_DEPRECATED typedef OutputTuple output_type
 The output type of this sender. More...
 
__TBB_DEPRECATED typedef internal::async_helpers< OutputTuple >::filtered_type filtered_type
 
- Protected Attributes inherited from tbb::flow::interface11::graph_node
graphmy_graph
 
graph_nodenext
 
graph_nodeprev
 

Detailed Description

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

join_node_base

Definition at line 868 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::interface11::internal::join_node_base< JP, InputTuple, OutputTuple >::class_type
private

Definition at line 1289 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::interface11::internal::join_node_base< JP, InputTuple, OutputTuple >::handler_type
private

Definition at line 1310 of file flow_graph.h.

◆ input_ports_type

template<typename JP , typename InputTuple , typename OutputTuple >
typedef join_node_FE<JP, InputTuple, OutputTuple> tbb::flow::interface11::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::interface11::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::interface11::internal::join_node_base< JP, InputTuple, OutputTuple >::successor_type

Definition at line 1271 of file flow_graph.h.

Member Enumeration Documentation

◆ op_type

template<typename JP , typename InputTuple , typename OutputTuple >
enum tbb::flow::interface11::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.

Constructor & Destructor Documentation

◆ join_node_base() [1/3]

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

Definition at line 1395 of file flow_graph.h.

1395  { return my_output_ports; }
1396 
1397 protected:
1398  task *try_put_task(const TupleType& t) __TBB_override {
1399  // Sending split messages in parallel is not justified, as overheads would prevail.
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 * task
#define __TBB_override
Definition: tbb_stddef.h:240

◆ join_node_base() [2/3]

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

Definition at line 1401 of file flow_graph.h.

1403  {
1404  if (f & rf_clear_edges)
1405  internal::clear_element<N>::clear_this(my_output_ports);
1406 
1407  __TBB_ASSERT(!(f & rf_clear_edges) || internal::clear_element<N>::this_empty(my_output_ports), "split_node reset failed");
#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::interface11::internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base ( graph g,
FunctionTuple  f 
)
inline

Definition at line 1410 of file flow_graph.h.

References __TBB_override.

1410  {
1411  return my_graph;
1412  }
1413 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1414 private:

Member Function Documentation

◆ forward_task()

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

Definition at line 1478 of file flow_graph.h.

1482  : continue_node(nodes, body, Policy(), priority) {}

◆ handle_operations()

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

Definition at line 1315 of file flow_graph.h.

1316  : multifunction_node(nodes, concurrency, body, Policy(), priority) {}
1317 #endif // __TBB_PREVIEW_FLOW_GRAPH_PRIORITIES
1318 #endif // __TBB_PREVIEW_FLOW_GRAPH_NODE_SET
1319 
1320  __TBB_NOINLINE_SYM multifunction_node( const multifunction_node &other) :
1321  graph_node(other.my_graph), base_type(other) {
1322  tbb::internal::fgt_multioutput_node_with_body<N>( CODEPTR(), tbb::internal::FLOW_MULTIFUNCTION_NODE,
1323  &this->my_graph, static_cast<receiver<input_type> *>(this),
1324  this->output_ports(), this->my_body );
1325  }
1326 
1327 #if TBB_PREVIEW_FLOW_GRAPH_TRACE
1328  void set_name( const char *name ) __TBB_override {
1330  }
1331 #endif
1332 
1333 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1334  void extract( ) __TBB_override {
1335  my_predecessors.built_predecessors().receiver_extract(*this);
1336  base_type::extract();
1337  }
1338 #endif
1339  // all the guts are in multifunction_input...
1340 protected:
1341  void reset_node(reset_flags f) __TBB_override { base_type::reset(f); }
1342 }; // multifunction_node
1343 
1345 // successors. The node has unlimited concurrency, so it does not reject inputs.
1346 template<typename TupleType, typename Allocator=cache_aligned_allocator<TupleType> >
1347 class split_node : public graph_node, public receiver<TupleType> {
1348  static const int N = tbb::flow::tuple_size<TupleType>::value;
1349  typedef receiver<TupleType> base_type;
1350 public:
1351  typedef TupleType input_type;
1352  typedef Allocator allocator_type;
1353 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1354  typedef typename base_type::predecessor_type predecessor_type;
1355  typedef typename base_type::predecessor_list_type predecessor_list_type;
1356  typedef internal::predecessor_cache<input_type, null_mutex > predecessor_cache_type;
1357  typedef typename predecessor_cache_type::built_predecessors_type built_predecessors_type;
1358 #endif
1359 
1360  typedef typename internal::wrap_tuple_elements<
1361  N, // #elements in tuple
1362  internal::multifunction_output, // wrap this around each element
1363  TupleType // the tuple providing the types
1364  >::type output_ports_type;
1365 
1366  __TBB_NOINLINE_SYM explicit split_node(graph &g)
1367  : graph_node(g),
1368  my_output_ports(internal::init_output_ports<output_ports_type>::call(g, my_output_ports))
1369  {
1370  tbb::internal::fgt_multioutput_node<N>(CODEPTR(), tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1371  static_cast<receiver<input_type> *>(this), this->output_ports());
1372  }
1373 
1374 #if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET
1375  template <typename... Args>
1376  __TBB_NOINLINE_SYM split_node(const node_set<Args...>& nodes) : split_node(nodes.graph_reference()) {
1377  make_edges_in_order(nodes, *this);
1378  }
1379 #endif
1380 
1381  __TBB_NOINLINE_SYM split_node(const split_node& other)
1382  : graph_node(other.my_graph), base_type(other),
1383  my_output_ports(internal::init_output_ports<output_ports_type>::call(other.my_graph, my_output_ports))
1384  {
1385  tbb::internal::fgt_multioutput_node<N>(CODEPTR(), tbb::internal::FLOW_SPLIT_NODE, &this->my_graph,
1386  static_cast<receiver<input_type> *>(this), this->output_ports());
1387  }
1388 
1389 #if TBB_PREVIEW_FLOW_GRAPH_TRACE
1390  void set_name( const char *name ) __TBB_override {
1392  }
#define __TBB_NOINLINE_SYM
Definition: flow_graph.h:45
concurrency
An enumeration the provides the two most common concurrency levels: unlimited and serial...
Definition: flow_graph.h:98
void call(F &&f, Pack &&p)
Calls the given function with arguments taken from a stored_pack.
#define __TBB_override
Definition: tbb_stddef.h:240
void const char const char int ITT_FORMAT __itt_group_sync x void const char * name
static void fgt_multioutput_node_desc(const NodeType *, const char *)
#define CODEPTR()
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 reset_node(reset_flags f) __TBB_override
Definition: flow_graph.h:1469
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

◆ register_successor()

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

Add a new successor to this node.

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 1416 of file flow_graph.h.

References __TBB_override.

1418  {}
1419 

◆ remove_successor()

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

Removes a successor from this node.

Implements tbb::flow::interface11::internal::untyped_sender.

Definition at line 1422 of file flow_graph.h.

References __TBB_override.

1423  { return 0; }
1424 
1425  void copy_predecessors(predecessor_list_type&) __TBB_override {}
1426 
#define __TBB_override
Definition: tbb_stddef.h:240

◆ reset_node()

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

Implements tbb::flow::interface11::graph_node.

Definition at line 1469 of file flow_graph.h.

1469  : continue_node(g, body, Policy(), priority) {}
1470 #endif
1471 
1472 #if __TBB_PREVIEW_FLOW_GRAPH_NODE_SET

◆ try_get()

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

Request an item from the sender.

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

Definition at line 1428 of file flow_graph.h.

1433  :
1434  output_ports_type my_output_ports;

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

Member Data Documentation

◆ forwarder_busy

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

Definition at line 1312 of file flow_graph.h.

◆ my_aggregator

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

Definition at line 1313 of file flow_graph.h.

◆ my_successors

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

Definition at line 1475 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.