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 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
bool | remove_successor (successor_type &r) __TBB_override
bool | try_get (output_type &v) __TBB_override

## Protected Member Functions

void | reset_node (reset_flags f) __TBB_override

## 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_operation > | handler_type

## Private Member Functions

void | handle_operations (join_node_base_operation *op_list)
task * | forward_task ()

## Private Attributes

bool | forwarder_busy
aggregator< handler_type, join_node_base_operation > | my_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 > >

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

{ reg_succ, rem_succ, try__get, do_fwrd, do_fwrd_bypass
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
, add_blt_succ, del_blt_succ, blt_succ_cnt, blt_succ_cpy
#endif
};

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

: graph_node(g), input_ports_type(g), forwarder_busy(false) {
my_successors.set_owner(this);
input_ports_type::set_my_node(this);
my_aggregator.initialize_handler(handler_type(this));
}

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.

:
graph_node(other.graph_node::my_graph), input_ports_type(other),
sender<OutputTuple>(), forwarder_busy(false), my_successors() {
my_successors.set_owner(this);
input_ports_type::set_my_node(this);
my_aggregator.initialize_handler(handler_type(this));
}

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.

: graph_node(g), input_ports_type(g, f), forwarder_busy(false) {
my_successors.set_owner(this);
input_ports_type::set_my_node(this);
my_aggregator.initialize_handler(handler_type(this));
}

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 | ( |  | ) |

inline private

Definition at line 1478 of file _flow_graph_join_impl.h.

{
join_node_base_operation op_data(do_fwrd_bypass);
my_aggregator.execute(&op_data);
return op_data.bypass_t;
}

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

inline private

Definition at line 1315 of file _flow_graph_join_impl.h.

{
join_node_base_operation *current;
while(op_list) {
current = op_list;
op_list = op_list->next;
switch(current->type) {
case reg_succ: {
my_successors.register_successor(*(current->my_succ));
if(tuple_build_may_succeed() && !forwarder_busy && internal::is_graph_active(my_graph)) {
task *rtask = new ( task::allocate_additional_child_of(*(my_graph.root_task())) )
forward_task_bypass
<join_node_base<JP,InputTuple,OutputTuple> >(*this);
internal::spawn_in_graph_arena(my_graph, *rtask);
forwarder_busy = true;
}
__TBB_store_with_release(current->status, SUCCEEDED);
}
break;
case rem_succ:
my_successors.remove_successor(*(current->my_succ));
__TBB_store_with_release(current->status, SUCCEEDED);
break;
case try__get:
if(tuple_build_may_succeed()) {
if(try_to_make_tuple(*(current->my_arg))) {
tuple_accepted();
__TBB_store_with_release(current->status, SUCCEEDED);
}
else __TBB_store_with_release(current->status, FAILED);
}
else __TBB_store_with_release(current->status, FAILED);
break;
case do_fwrd_bypass: {
bool build_succeeded;
task *last_task = NULL;
output_type out;
if(tuple_build_may_succeed()) { // checks output queue of FE
do {
build_succeeded = try_to_make_tuple(out); // fetch front_end of queue
if(build_succeeded) {
task *new_task = my_successors.try_put_task(out);
last_task = combine_tasks(my_graph, last_task, new_task);
if(new_task) {
tuple_accepted();
}
else {
tuple_rejected();
build_succeeded = false;
}
}
} while(build_succeeded);
}
current->bypass_t = last_task;
__TBB_store_with_release(current->status, SUCCEEDED);
forwarder_busy = false;
}
break;
#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
case add_blt_succ:
my_successors.internal_add_built_successor(*(current->my_succ));
__TBB_store_with_release(current->status, SUCCEEDED);
break;
case del_blt_succ:
my_successors.internal_delete_built_successor(*(current->my_succ));
__TBB_store_with_release(current->status, SUCCEEDED);
break;
case blt_succ_cnt:
current->cnt_val = my_successors.successor_count();
__TBB_store_with_release(current->status, SUCCEEDED);
break;
case blt_succ_cpy:
my_successors.copy_successors(*(current->slist));
__TBB_store_with_release(current->status, SUCCEEDED);
break;
#endif /* TBB_DEPRECATED_FLOW_NODE_EXTRACTION */
}
}
}

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

inline

Definition at line 1416 of file _flow_graph_join_impl.h.

{
join_node_base_operation op_data(r, reg_succ);
my_aggregator.execute(&op_data);
return op_data.status == SUCCEEDED;
}

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

inline

Definition at line 1422 of file _flow_graph_join_impl.h.

{
join_node_base_operation op_data(r, rem_succ);
my_aggregator.execute(&op_data);
return op_data.status == SUCCEEDED;
}

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

inline protected

Definition at line 1469 of file _flow_graph_join_impl.h.

{
input_ports_type::reset(f);
if(f & rf_clear_edges) my_successors.clear();
}

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 & | v | ) |

inline

Definition at line 1428 of file _flow_graph_join_impl.h.

{
join_node_base_operation op_data(v, try__get);
my_aggregator.execute(&op_data);
return op_data.status == SUCCEEDED;
}

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:

- _flow_graph_join_impl.h

internal::join_node_base::handler_type
internal::aggregating_functor< class_type, join_node_base_operation > handler_type
Definition: _flow_graph_join_impl.h:1310
internal::SUCCEEDED
Definition: _flow_graph_types_impl.h:719
tbb::flow::interface11::internal::is_graph_active
bool is_graph_active(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:494
tbb::flow::interface11::internal::spawn_in_graph_arena
void spawn_in_graph_arena(tbb::flow::interface10::graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
Definition: _flow_graph_impl.h:521
internal::join_node_base::rem_succ
Definition: _flow_graph_join_impl.h:1284
internal::successor_cache::set_owner
void set_owner(owner_type *owner)
Definition: _flow_graph_cache_impl.h:326
internal::successor_cache::remove_successor
void remove_successor(successor_type &r)
Definition: _flow_graph_cache_impl.h:335
internal::successor_cache::register_successor
void register_successor(successor_type &r)
Definition: _flow_graph_cache_impl.h:330
tbb::flow::interface11::combine_tasks
static tbb::task * combine_tasks(graph &g, tbb::task *left, tbb::task *right)
Definition: flow_graph.h:191
internal::join_node_base::reg_succ
Definition: _flow_graph_join_impl.h:1284
internal::join_node_base::output_type
OutputTuple output_type
Definition: _flow_graph_join_impl.h:1269
internal::join_node_base::try__get
Definition: _flow_graph_join_impl.h:1284
internal::join_node_base::my_aggregator
aggregator< handler_type, join_node_base_operation > my_aggregator
Definition: _flow_graph_join_impl.h:1313
internal::join_node_base::forwarder_busy
bool forwarder_busy
Definition: _flow_graph_join_impl.h:1312
tbb::internal::__TBB_store_with_release
void __TBB_store_with_release(volatile T &location, V value)
Definition: tbb_machine.h:716
internal::join_node_base::my_successors
broadcast_cache< output_type, null_rw_mutex > my_successors
Definition: _flow_graph_join_impl.h:1475
internal::join_node_base::input_ports_type
join_node_FE< JP, InputTuple, OutputTuple > input_ports_type
Definition: _flow_graph_join_impl.h:1272
internal::broadcast_cache::try_put_task
task * try_put_task(const T &t) __TBB_override
Definition: _flow_graph_cache_impl.h:478
task
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
Definition: ittnotify_static.h:119
tbb::flow::interface11::rf_clear_edges
Definition: _flow_graph_impl.h:161
internal::successor_cache::clear
void clear()
Definition: _flow_graph_cache_impl.h:351
internal::FAILED
Definition: _flow_graph_types_impl.h:719
internal::join_node_base::do_fwrd
Definition: _flow_graph_join_impl.h:1284
internal::join_node_base::do_fwrd_bypass
Definition: _flow_graph_join_impl.h:1284

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.