Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
internal::join_node_base< JP, InputTuple, OutputTuple > Class Template Reference

join_node_base More...

#include <_flow_graph_join_impl.h>

Inheritance diagram for internal::join_node_base< JP, InputTuple, OutputTuple >:
Collaboration diagram for 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::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_mutex > my_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
 

Detailed Description

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

join_node_base

Definition at line 868 of file _flow_graph_join_impl.h.

Member Typedef Documentation

◆ class_type

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

Definition at line 1289 of file _flow_graph_join_impl.h.

◆ handler_type

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

Definition at line 1310 of file _flow_graph_join_impl.h.

◆ input_ports_type

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

Definition at line 1272 of file _flow_graph_join_impl.h.

◆ output_type

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

Definition at line 1269 of file _flow_graph_join_impl.h.

◆ successor_type

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

Definition at line 1271 of file _flow_graph_join_impl.h.

Member Enumeration Documentation

◆ op_type

template<typename JP , typename InputTuple , typename OutputTuple >
enum 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_join_impl.h.

Constructor & Destructor Documentation

◆ join_node_base() [1/3]

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

Definition at line 1395 of file _flow_graph_join_impl.h.

1395  : graph_node(g), input_ports_type(g), forwarder_busy(false) {
1396  my_successors.set_owner(this);
1397  input_ports_type::set_my_node(this);
1398  my_aggregator.initialize_handler(handler_type(this));
1399  }
broadcast_cache< output_type, null_rw_mutex > my_successors
void set_owner(owner_type *owner)
join_node_FE< JP, InputTuple, OutputTuple > input_ports_type
internal::aggregating_functor< class_type, join_node_base_operation > handler_type
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::initialize_handler().

Here is the call graph for this function:

◆ join_node_base() [2/3]

template<typename JP , typename InputTuple , typename OutputTuple >
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_join_impl.h.

1401  :
1402  graph_node(other.graph_node::my_graph), input_ports_type(other),
1403  sender<OutputTuple>(), forwarder_busy(false), my_successors() {
1404  my_successors.set_owner(this);
1405  input_ports_type::set_my_node(this);
1406  my_aggregator.initialize_handler(handler_type(this));
1407  }
broadcast_cache< output_type, null_rw_mutex > my_successors
void set_owner(owner_type *owner)
join_node_FE< JP, InputTuple, OutputTuple > input_ports_type
internal::aggregating_functor< class_type, join_node_base_operation > handler_type
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::initialize_handler().

Here is the call graph for this function:

◆ join_node_base() [3/3]

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

Definition at line 1410 of file _flow_graph_join_impl.h.

1410  : graph_node(g), input_ports_type(g, f), forwarder_busy(false) {
1411  my_successors.set_owner(this);
1412  input_ports_type::set_my_node(this);
1413  my_aggregator.initialize_handler(handler_type(this));
1414  }
broadcast_cache< output_type, null_rw_mutex > my_successors
void set_owner(owner_type *owner)
join_node_FE< JP, InputTuple, OutputTuple > input_ports_type
internal::aggregating_functor< class_type, join_node_base_operation > handler_type
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::initialize_handler().

Here is the call graph for this function:

Member Function Documentation

◆ forward_task()

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

Definition at line 1478 of file _flow_graph_join_impl.h.

1478  {
1479  join_node_base_operation op_data(do_fwrd_bypass);
1480  my_aggregator.execute(&op_data);
1481  return op_data.bypass_t;
1482  }
aggregator< handler_type, join_node_base_operation > my_aggregator

References internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::bypass_t, and tbb::interface6::internal::aggregator< handler_type, operation_type >::execute().

Here is the call graph for this function:

◆ handle_operations()

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

Definition at line 1315 of file _flow_graph_join_impl.h.

1315  {
1316  join_node_base_operation *current;
1317  while(op_list) {
1318  current = op_list;
1319  op_list = op_list->next;
1320  switch(current->type) {
1321  case reg_succ: {
1322  my_successors.register_successor(*(current->my_succ));
1323  if(tuple_build_may_succeed() && !forwarder_busy && internal::is_graph_active(my_graph)) {
1324  task *rtask = new ( task::allocate_additional_child_of(*(my_graph.root_task())) )
1325  forward_task_bypass
1326  <join_node_base<JP,InputTuple,OutputTuple> >(*this);
1327  internal::spawn_in_graph_arena(my_graph, *rtask);
1328  forwarder_busy = true;
1329  }
1330  __TBB_store_with_release(current->status, SUCCEEDED);
1331  }
1332  break;
1333  case rem_succ:
1334  my_successors.remove_successor(*(current->my_succ));
1335  __TBB_store_with_release(current->status, SUCCEEDED);
1336  break;
1337  case try__get:
1338  if(tuple_build_may_succeed()) {
1339  if(try_to_make_tuple(*(current->my_arg))) {
1340  tuple_accepted();
1341  __TBB_store_with_release(current->status, SUCCEEDED);
1342  }
1343  else __TBB_store_with_release(current->status, FAILED);
1344  }
1345  else __TBB_store_with_release(current->status, FAILED);
1346  break;
1347  case do_fwrd_bypass: {
1348  bool build_succeeded;
1349  task *last_task = NULL;
1350  output_type out;
1351  if(tuple_build_may_succeed()) { // checks output queue of FE
1352  do {
1353  build_succeeded = try_to_make_tuple(out); // fetch front_end of queue
1354  if(build_succeeded) {
1355  task *new_task = my_successors.try_put_task(out);
1356  last_task = combine_tasks(my_graph, last_task, new_task);
1357  if(new_task) {
1358  tuple_accepted();
1359  }
1360  else {
1361  tuple_rejected();
1362  build_succeeded = false;
1363  }
1364  }
1365  } while(build_succeeded);
1366  }
1367  current->bypass_t = last_task;
1368  __TBB_store_with_release(current->status, SUCCEEDED);
1369  forwarder_busy = false;
1370  }
1371  break;
1372 #if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1373  case add_blt_succ:
1374  my_successors.internal_add_built_successor(*(current->my_succ));
1375  __TBB_store_with_release(current->status, SUCCEEDED);
1376  break;
1377  case del_blt_succ:
1378  my_successors.internal_delete_built_successor(*(current->my_succ));
1379  __TBB_store_with_release(current->status, SUCCEEDED);
1380  break;
1381  case blt_succ_cnt:
1382  current->cnt_val = my_successors.successor_count();
1383  __TBB_store_with_release(current->status, SUCCEEDED);
1384  break;
1385  case blt_succ_cpy:
1386  my_successors.copy_successors(*(current->slist));
1387  __TBB_store_with_release(current->status, SUCCEEDED);
1388  break;
1389 #endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
1390  }
1391  }
1392  }
void spawn_in_graph_arena(tbb::flow::interface10::graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
broadcast_cache< output_type, null_rw_mutex > my_successors
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:713
bool is_graph_active(tbb::flow::interface10::graph &g)
task * try_put_task(const T &t) __TBB_override
void remove_successor(successor_type &r)
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
void register_successor(successor_type &r)
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
Definition: flow_graph.h:199

References tbb::internal::__TBB_store_with_release(), internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::bypass_t, tbb::flow::interface11::combine_tasks(), internal::FAILED, tbb::flow::interface11::internal::is_graph_active(), internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::my_arg, internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::my_succ, tbb::interface6::internal::aggregated_operation< Derived >::next, tbb::flow::interface11::internal::spawn_in_graph_arena(), tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, task, and internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::type.

Here is the call graph for this function:

◆ register_successor()

template<typename JP , typename InputTuple , typename OutputTuple >
bool 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_join_impl.h.

1416  {
1417  join_node_base_operation op_data(r, reg_succ);
1418  my_aggregator.execute(&op_data);
1419  return op_data.status == SUCCEEDED;
1420  }
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::execute(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Here is the call graph for this function:

◆ remove_successor()

template<typename JP , typename InputTuple , typename OutputTuple >
bool 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_join_impl.h.

1422  {
1423  join_node_base_operation op_data(r, rem_succ);
1424  my_aggregator.execute(&op_data);
1425  return op_data.status == SUCCEEDED;
1426  }
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::execute(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

Here is the call graph for this function:

◆ reset_node()

template<typename JP , typename InputTuple , typename OutputTuple >
void internal::join_node_base< JP, InputTuple, OutputTuple >::reset_node ( reset_flags  f)
inlineprotected

Definition at line 1469 of file _flow_graph_join_impl.h.

1469  {
1470  input_ports_type::reset(f);
1472  }
broadcast_cache< output_type, null_rw_mutex > my_successors

References tbb::flow::interface11::rf_clear_edges.

◆ try_get()

template<typename JP , typename InputTuple , typename OutputTuple >
bool 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_join_impl.h.

1428  {
1429  join_node_base_operation op_data(v, try__get);
1430  my_aggregator.execute(&op_data);
1431  return op_data.status == SUCCEEDED;
1432  }
aggregator< handler_type, join_node_base_operation > my_aggregator

References tbb::interface6::internal::aggregator< handler_type, operation_type >::execute(), tbb::interface6::internal::aggregated_operation< Derived >::status, and internal::SUCCEEDED.

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 1477 of file _flow_graph_join_impl.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_join_impl.h.

Member Data Documentation

◆ forwarder_busy

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

Definition at line 1312 of file _flow_graph_join_impl.h.

◆ my_aggregator

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

Definition at line 1313 of file _flow_graph_join_impl.h.

◆ my_successors

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

Definition at line 1475 of file _flow_graph_join_impl.h.


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

Copyright © 2005-2020 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.