Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
Loading...
Searching...
No Matches
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_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 > >
 

Detailed Description

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

join_node_base

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

1285#if TBB_DEPRECATED_FLOW_NODE_EXTRACTION
1286 , add_blt_succ, del_blt_succ, blt_succ_cnt, blt_succ_cpy
1287#endif
1288 };

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) {
1397 input_ports_type::set_my_node(this);
1398 my_aggregator.initialize_handler(handler_type(this));
1399 }
void set_owner(owner_type *owner)
aggregator< handler_type, join_node_base_operation > my_aggregator
broadcast_cache< output_type, null_rw_mutex > my_successors
internal::aggregating_functor< class_type, join_node_base_operation > handler_type
join_node_FE< JP, InputTuple, OutputTuple > input_ports_type

References internal::join_node_base< JP, InputTuple, OutputTuple >::my_aggregator, internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors, and internal::successor_cache< T, M >::set_owner().

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() {
1405 input_ports_type::set_my_node(this);
1406 my_aggregator.initialize_handler(handler_type(this));
1407 }

References internal::join_node_base< JP, InputTuple, OutputTuple >::my_aggregator, internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors, and internal::successor_cache< T, M >::set_owner().

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) {
1412 input_ports_type::set_my_node(this);
1413 my_aggregator.initialize_handler(handler_type(this));
1414 }

References internal::join_node_base< JP, InputTuple, OutputTuple >::my_aggregator, internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors, and internal::successor_cache< T, M >::set_owner().

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

◆ 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 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 __TBB_store_with_release(volatile T &location, V value)
void register_successor(successor_type &r)
void remove_successor(successor_type &r)
task * try_put_task(const T &t) __TBB_override

References internal::join_node_base< JP, InputTuple, OutputTuple >::join_node_base_operation::bypass_t, internal::join_node_base< JP, InputTuple, OutputTuple >::do_fwrd_bypass, internal::FAILED, internal::join_node_base< JP, InputTuple, OutputTuple >::forwarder_busy, 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, internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors, tbb::interface6::internal::aggregated_operation< Derived >::next, internal::join_node_base< JP, InputTuple, OutputTuple >::reg_succ, internal::successor_cache< T, M >::register_successor(), internal::join_node_base< JP, InputTuple, OutputTuple >::rem_succ, internal::successor_cache< T, M >::remove_successor(), tbb::interface6::internal::aggregated_operation< Derived >::status, internal::SUCCEEDED, task, internal::join_node_base< JP, InputTuple, OutputTuple >::try__get, internal::broadcast_cache< T, M >::try_put_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

◆ remove_successor()

template<typename JP , typename InputTuple , typename OutputTuple >
bool internal::join_node_base< JP, InputTuple, OutputTuple >::remove_successor ( successor_type r)
inline

◆ 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);
1471 if(f & rf_clear_edges) my_successors.clear();
1472 }

References internal::successor_cache< T, M >::clear(), and internal::join_node_base< JP, InputTuple, OutputTuple >::my_successors.

Here is the call graph for this function:

◆ try_get()

template<typename JP , typename InputTuple , typename OutputTuple >
bool internal::join_node_base< JP, InputTuple, OutputTuple >::try_get ( output_type v)
inline

Friends And Related Symbol 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 1475 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 1310 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

◆ my_aggregator

◆ my_successors


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.