Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::flow::interface10::limiter_node< T > Class Template Reference

Forwards messages only if the threshold has not been reached. More...

#include <flow_graph.h>

Inheritance diagram for tbb::flow::interface10::limiter_node< T >:
Collaboration diagram for tbb::flow::interface10::limiter_node< T >:

Public Types

typedef T input_type
 
typedef T output_type
 
typedef receiver< input_type >::predecessor_type predecessor_type
 
typedef sender< output_type >::successor_type successor_type
 
- Public Types inherited from tbb::flow::interface10::receiver< T >
typedef T input_type
 The input type of this receiver. More...
 
typedef internal::async_helpers< T >::filtered_type filtered_type
 
- Public Types inherited from tbb::flow::interface10::internal::untyped_receiver
typedef untyped_sender predecessor_type
 The predecessor type for this node. More...
 
- Public Types inherited from tbb::flow::interface10::sender< T >
typedef T output_type
 The output type of this sender. More...
 
typedef internal::async_helpers< T >::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

 limiter_node (graph &g, size_t threshold, int num_decrement_predecessors=0)
 Constructor. More...
 
 limiter_node (const limiter_node &src)
 Copy constructor. More...
 
bool register_successor (successor_type &r) __TBB_override
 Replace the current successor with this new successor. More...
 
bool remove_successor (successor_type &r) __TBB_override
 Removes a successor from this node. More...
 
bool register_predecessor (predecessor_type &src) __TBB_override
 Adds src to the list of cached predecessors. More...
 
bool remove_predecessor (predecessor_type &src) __TBB_override
 Removes src from the list of cached predecessors. 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::receiver< T >
bool try_put (const typename internal::async_helpers< T >::filtered_type &t)
 Put an item to the receiver. More...
 
bool try_put (const typename internal::async_helpers< T >::async_type &t)
 
- Public Member Functions inherited from tbb::flow::interface10::internal::untyped_receiver
virtual ~untyped_receiver ()
 Destructor. More...
 
template<typename X >
bool try_put (const X &t)
 Put an item to the receiver. More...
 
- Public Member Functions inherited from tbb::flow::interface10::sender< T >
virtual bool try_get (T &)
 Request an item from the sender. More...
 
virtual bool try_reserve (T &)
 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...
 

Public Attributes

internal::decrementer< limiter_node< T > > decrement
 The internal receiver< continue_msg > that decrements the count. More...
 

Protected Member Functions

tasktry_put_task (const T &t) __TBB_override
 Puts an item to this receiver. More...
 
graphgraph_reference () __TBB_override
 
void reset_receiver (reset_flags) __TBB_override
 put receiver back in initial state More...
 
void reset_node (reset_flags f) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::receiver< T >
virtual tasktry_put_task_wrapper (const void *p, bool is_async) __TBB_override
 
- Protected Member Functions inherited from tbb::flow::interface10::internal::untyped_receiver
template<typename X >
tasktry_put_task (const X &t)
 
virtual bool is_continue_receiver ()
 
- Protected Member Functions inherited from tbb::flow::interface10::sender< T >
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 Member Functions

bool check_conditions ()
 
taskforward_task ()
 
void forward ()
 
taskdecrement_counter ()
 

Private Attributes

size_t my_threshold
 
size_t my_count
 
size_t my_tries
 
internal::reservable_predecessor_cache< T, spin_mutexmy_predecessors
 
spin_mutex my_mutex
 
internal::broadcast_cache< T > my_successors
 
int init_decrement_predecessors
 

Friends

class internal::forward_task_bypass< limiter_node< T > >
 
class internal::decrementer< limiter_node< T > >
 
template<typename R , typename B >
class run_and_put_task
 
template<typename X , typename Y >
class internal::broadcast_cache
 
template<typename X , typename Y >
class internal::round_robin_cache
 

Additional Inherited Members

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

Detailed Description

template<typename T>
class tbb::flow::interface10::limiter_node< T >

Forwards messages only if the threshold has not been reached.

This node forwards items until its threshold is reached. It contains no buffering. If the downstream node rejects, the message is dropped.

Definition at line 102 of file flow_graph.h.

Member Typedef Documentation

◆ input_type

template<typename T >
typedef T tbb::flow::interface10::limiter_node< T >::input_type

Definition at line 2392 of file flow_graph.h.

◆ output_type

template<typename T >
typedef T tbb::flow::interface10::limiter_node< T >::output_type

Definition at line 2393 of file flow_graph.h.

◆ predecessor_type

Definition at line 2394 of file flow_graph.h.

◆ successor_type

Definition at line 2395 of file flow_graph.h.

Constructor & Destructor Documentation

◆ limiter_node() [1/2]

template<typename T >
tbb::flow::interface10::limiter_node< T >::limiter_node ( graph g,
size_t  threshold,
int  num_decrement_predecessors = 0 
)
inline

Constructor.

Definition at line 2494 of file flow_graph.h.

2494  :
2495  graph_node(g), my_threshold(threshold), my_count(0), my_tries(0),
2496  init_decrement_predecessors(num_decrement_predecessors),
2497  decrement(num_decrement_predecessors)
2498  {
2499  my_predecessors.set_owner(this);
2500  my_successors.set_owner(this);
2501  decrement.set_owner(this);
2502  tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph,
2503  static_cast<receiver<input_type> *>(this), static_cast<receiver<continue_msg> *>(&decrement),
2504  static_cast<sender<output_type> *>(this) );
2505  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2491
static void fgt_node(string_index, void *, void *)
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410

References tbb::internal::fgt_node(), tbb::flow::interface10::internal::predecessor_cache< T, M >::set_owner(), tbb::flow::interface10::internal::successor_cache< T, M >::set_owner(), and tbb::flow::interface10::internal::decrementer< T >::set_owner().

Here is the call graph for this function:

◆ limiter_node() [2/2]

template<typename T >
tbb::flow::interface10::limiter_node< T >::limiter_node ( const limiter_node< T > &  src)
inline

Copy constructor.

Definition at line 2508 of file flow_graph.h.

2508  :
2509  graph_node(src.my_graph), receiver<T>(), sender<T>(),
2510  my_threshold(src.my_threshold), my_count(0), my_tries(0),
2511  init_decrement_predecessors(src.init_decrement_predecessors),
2512  decrement(src.init_decrement_predecessors)
2513  {
2514  my_predecessors.set_owner(this);
2515  my_successors.set_owner(this);
2516  decrement.set_owner(this);
2517  tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph,
2518  static_cast<receiver<input_type> *>(this), static_cast<receiver<continue_msg> *>(&decrement),
2519  static_cast<sender<output_type> *>(this) );
2520  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2491
static void fgt_node(string_index, void *, void *)
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410

References tbb::internal::fgt_node(), tbb::flow::interface10::internal::predecessor_cache< T, M >::set_owner(), tbb::flow::interface10::internal::successor_cache< T, M >::set_owner(), and tbb::flow::interface10::internal::decrementer< T >::set_owner().

Here is the call graph for this function:

Member Function Documentation

◆ check_conditions()

template<typename T >
bool tbb::flow::interface10::limiter_node< T >::check_conditions ( )
inlineprivate

Definition at line 2418 of file flow_graph.h.

2418  { // always called under lock
2419  return ( my_count + my_tries < my_threshold && !my_predecessors.empty() && !my_successors.empty() );
2420  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410

References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::empty(), and tbb::flow::interface10::internal::successor_cache< T, M >::empty().

Here is the call graph for this function:

◆ decrement_counter()

template<typename T >
task* tbb::flow::interface10::limiter_node< T >::decrement_counter ( )
inlineprivate

Definition at line 2481 of file flow_graph.h.

2481  {
2482  {
2484  if(my_count) --my_count;
2485  }
2486  return forward_task();
2487  }
friend class scoped_lock
Definition: spin_mutex.h:180
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 * lock

References lock.

◆ forward()

template<typename T >
void tbb::flow::interface10::limiter_node< T >::forward ( )
inlineprivate

Definition at line 2476 of file flow_graph.h.

2476  {
2477  __TBB_ASSERT(false, "Should never be called");
2478  return;
2479  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

References __TBB_ASSERT.

◆ forward_task()

template<typename T >
task* tbb::flow::interface10::limiter_node< T >::forward_task ( )
inlineprivate

Definition at line 2423 of file flow_graph.h.

2423  {
2424  input_type v;
2425  task *rval = NULL;
2426  bool reserved = false;
2427  {
2429  if ( check_conditions() )
2430  ++my_tries;
2431  else
2432  return NULL;
2433  }
2434 
2435  //SUCCESS
2436  // if we can reserve and can put, we consume the reservation
2437  // we increment the count and decrement the tries
2438  if ( (my_predecessors.try_reserve(v)) == true ){
2439  reserved=true;
2440  if ( (rval = my_successors.try_put_task(v)) != NULL ){
2441  {
2443  ++my_count;
2444  --my_tries;
2445  my_predecessors.try_consume();
2446  if ( check_conditions() ) {
2447  if ( internal::is_graph_active(this->my_graph) ) {
2448  task *rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2449  internal::forward_task_bypass< limiter_node<T> >( *this );
2451  }
2452  }
2453  }
2454  return rval;
2455  }
2456  }
2457  //FAILURE
2458  //if we can't reserve, we decrement the tries
2459  //if we can reserve but can't put, we decrement the tries and release the reservation
2460  {
2462  --my_tries;
2463  if (reserved) my_predecessors.try_release();
2464  if ( check_conditions() ) {
2465  if ( internal::is_graph_active(this->my_graph) ) {
2466  task *rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2467  internal::forward_task_bypass< limiter_node<T> >( *this );
2468  __TBB_ASSERT(!rval, "Have two tasks to handle");
2469  return rtask;
2470  }
2471  }
2472  return rval;
2473  }
2474  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
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
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2643
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
friend class scoped_lock
Definition: spin_mutex.h:180
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
A task that calls a node's forward_task function.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410
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 * lock
tbb::task * root_task()
Returns the root task of the graph.

References __TBB_ASSERT, internal::decrementer< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::internal::spawn_in_graph_arena(), tbb::flow::interface10::internal::reservable_predecessor_cache< T, M >::try_consume(), tbb::flow::interface10::internal::broadcast_cache< T, M >::try_put_task(), tbb::flow::interface10::internal::reservable_predecessor_cache< T, M >::try_release(), and tbb::flow::interface10::internal::reservable_predecessor_cache< T, M >::try_reserve().

Here is the call graph for this function:

◆ graph_reference()

template<typename T >
graph& tbb::flow::interface10::limiter_node< T >::graph_reference ( )
inlineprotectedvirtual

Implements tbb::flow::interface10::internal::untyped_receiver.

Definition at line 2643 of file flow_graph.h.

2643  {
2644  return my_graph;
2645  }

◆ register_predecessor()

template<typename T >
bool tbb::flow::interface10::limiter_node< T >::register_predecessor ( predecessor_type src)
inlinevirtual

Adds src to the list of cached predecessors.

Reimplemented from tbb::flow::interface10::internal::untyped_receiver.

Definition at line 2593 of file flow_graph.h.

2593  {
2595  my_predecessors.add( src );
2597  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2598  internal::forward_task_bypass < limiter_node<T> >( *this );
2600  }
2601  return true;
2602  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
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
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2643
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
friend class scoped_lock
Definition: spin_mutex.h:180
A task that calls a node's forward_task function.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410
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 * lock
tbb::task * root_task()
Returns the root task of the graph.

References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::add(), tbb::flow::interface10::internal::successor_cache< T, M >::empty(), internal::decrementer< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, and tbb::flow::interface10::internal::spawn_in_graph_arena().

Here is the call graph for this function:

◆ register_successor()

template<typename T >
bool tbb::flow::interface10::limiter_node< T >::register_successor ( successor_type r)
inlinevirtual

Replace the current successor with this new successor.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 2529 of file flow_graph.h.

2529  {
2531  bool was_empty = my_successors.empty();
2533  //spawn a forward task if this is the only successor
2534  if ( was_empty && !my_predecessors.empty() && my_count + my_tries < my_threshold ) {
2535  if ( internal::is_graph_active(this->my_graph) ) {
2536  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2537  internal::forward_task_bypass < limiter_node<T> >( *this );
2539  }
2540  }
2541  return true;
2542  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
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
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2643
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
friend class scoped_lock
Definition: spin_mutex.h:180
A task that calls a node's forward_task function.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410
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 * lock
tbb::task * root_task()
Returns the root task of the graph.

References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::empty(), tbb::flow::interface10::internal::successor_cache< T, M >::empty(), internal::decrementer< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::internal::successor_cache< T, M >::register_successor(), and tbb::flow::interface10::internal::spawn_in_graph_arena().

Here is the call graph for this function:

◆ remove_predecessor()

template<typename T >
bool tbb::flow::interface10::limiter_node< T >::remove_predecessor ( predecessor_type src)
inlinevirtual

Removes src from the list of cached predecessors.

Reimplemented from tbb::flow::interface10::internal::untyped_receiver.

Definition at line 2605 of file flow_graph.h.

2605  {
2606  my_predecessors.remove( src );
2607  return true;
2608  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408

References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::remove().

Here is the call graph for this function:

◆ remove_successor()

template<typename T >
bool tbb::flow::interface10::limiter_node< T >::remove_successor ( successor_type r)
inlinevirtual

Removes a successor from this node.

r.remove_predecessor(*this) is also called.

Implements tbb::flow::interface10::internal::untyped_sender.

Definition at line 2546 of file flow_graph.h.

2546  {
2547  r.remove_predecessor(*this);
2549  return true;
2550  }
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410

References tbb::flow::interface10::internal::successor_cache< T, M >::remove_successor().

Here is the call graph for this function:

◆ reset_node()

template<typename T >
void tbb::flow::interface10::limiter_node< T >::reset_node ( reset_flags  f)
inlineprotectedvirtual

Implements tbb::flow::interface10::graph_node.

Definition at line 2651 of file flow_graph.h.

2651  {
2652  my_count = 0;
2653  if(f & rf_clear_edges) {
2654  my_predecessors.clear();
2655  my_successors.clear();
2656  }
2657  else
2658  {
2659  my_predecessors.reset( );
2660  }
2661  decrement.reset_receiver(f);
2662  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2408
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2491
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410

References tbb::flow::interface10::internal::reservable_predecessor_cache< T, M >::clear(), internal::successor_cache< T, M >::my_successors, tbb::flow::interface10::internal::reservable_predecessor_cache< T, M >::reset(), tbb::flow::interface10::continue_receiver::reset_receiver(), and tbb::flow::interface10::rf_clear_edges.

Here is the call graph for this function:

◆ reset_receiver()

template<typename T >
void tbb::flow::interface10::limiter_node< T >::reset_receiver ( reset_flags  f)
inlineprotectedvirtual

put receiver back in initial state

Implements tbb::flow::interface10::internal::untyped_receiver.

Definition at line 2647 of file flow_graph.h.

2647  {
2648  __TBB_ASSERT(false,NULL); // should never be called
2649  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169

References __TBB_ASSERT.

◆ try_put_task()

template<typename T >
task* tbb::flow::interface10::limiter_node< T >::try_put_task ( const T &  t)
inlineprotectedvirtual

Puts an item to this receiver.

Implements tbb::flow::interface10::receiver< T >.

Definition at line 2616 of file flow_graph.h.

2616  {
2617  {
2619  if ( my_count + my_tries >= my_threshold )
2620  return NULL;
2621  else
2622  ++my_tries;
2623  }
2624 
2625  task * rtask = my_successors.try_put_task(t);
2626 
2627  if ( !rtask ) { // try_put_task failed.
2629  --my_tries;
2631  rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2632  internal::forward_task_bypass< limiter_node<T> >( *this );
2633  }
2634  }
2635  else {
2637  ++my_count;
2638  --my_tries;
2639  }
2640  return rtask;
2641  }
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
friend class scoped_lock
Definition: spin_mutex.h:180
A task that calls a node's forward_task function.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2410
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 * lock
tbb::task * root_task()
Returns the root task of the graph.

References tbb::flow::interface10::internal::is_graph_active(), lock, internal::successor_cache< T, M >::my_mutex, and internal::successor_cache< T, M >::my_successors.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ internal::broadcast_cache

template<typename T >
template<typename X , typename Y >
friend class internal::broadcast_cache
friend

Definition at line 2613 of file flow_graph.h.

◆ internal::decrementer< limiter_node< T > >

template<typename T >
friend class internal::decrementer< limiter_node< T > >
friend

Definition at line 2416 of file flow_graph.h.

◆ internal::forward_task_bypass< limiter_node< T > >

template<typename T >
friend class internal::forward_task_bypass< limiter_node< T > >
friend

Definition at line 2413 of file flow_graph.h.

◆ internal::round_robin_cache

template<typename T >
template<typename X , typename Y >
friend class internal::round_robin_cache
friend

Definition at line 2614 of file flow_graph.h.

◆ run_and_put_task

template<typename T >
template<typename R , typename B >
friend class run_and_put_task
friend

Definition at line 2612 of file flow_graph.h.

Member Data Documentation

◆ decrement

template<typename T >
internal::decrementer< limiter_node<T> > tbb::flow::interface10::limiter_node< T >::decrement

The internal receiver< continue_msg > that decrements the count.

Definition at line 2491 of file flow_graph.h.

◆ init_decrement_predecessors

template<typename T >
int tbb::flow::interface10::limiter_node< T >::init_decrement_predecessors
private

Definition at line 2411 of file flow_graph.h.

◆ my_count

template<typename T >
size_t tbb::flow::interface10::limiter_node< T >::my_count
private

Definition at line 2406 of file flow_graph.h.

◆ my_mutex

template<typename T >
spin_mutex tbb::flow::interface10::limiter_node< T >::my_mutex
private

Definition at line 2409 of file flow_graph.h.

◆ my_predecessors

template<typename T >
internal::reservable_predecessor_cache< T, spin_mutex > tbb::flow::interface10::limiter_node< T >::my_predecessors
private

Definition at line 2408 of file flow_graph.h.

◆ my_successors

template<typename T >
internal::broadcast_cache< T > tbb::flow::interface10::limiter_node< T >::my_successors
private

Definition at line 2410 of file flow_graph.h.

◆ my_threshold

template<typename T >
size_t tbb::flow::interface10::limiter_node< T >::my_threshold
private

Definition at line 2405 of file flow_graph.h.

◆ my_tries

template<typename T >
size_t tbb::flow::interface10::limiter_node< T >::my_tries
private

Definition at line 2407 of file flow_graph.h.


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

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