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

◆ output_type

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

Definition at line 2407 of file flow_graph.h.

◆ predecessor_type

Definition at line 2408 of file flow_graph.h.

◆ successor_type

Definition at line 2409 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 2508 of file flow_graph.h.

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

References tbb::flow::interface10::limiter_node< T >::decrement, tbb::internal::fgt_node(), tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, and tbb::flow::interface10::internal::successor_cache< T, M >::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 2522 of file flow_graph.h.

2522  :
2523  graph_node(src.my_graph), receiver<T>(), sender<T>(),
2524  my_threshold(src.my_threshold), my_count(0), my_tries(0),
2525  init_decrement_predecessors(src.init_decrement_predecessors),
2526  decrement(src.init_decrement_predecessors)
2527  {
2528  my_predecessors.set_owner(this);
2529  my_successors.set_owner(this);
2530  decrement.set_owner(this);
2531  tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph,
2532  static_cast<receiver<input_type> *>(this), static_cast<receiver<continue_msg> *>(&decrement),
2533  static_cast<sender<output_type> *>(this) );
2534  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2505
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424
static void fgt_node(string_index, void *, void *)

References tbb::flow::interface10::limiter_node< T >::decrement, tbb::internal::fgt_node(), tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, and tbb::flow::interface10::internal::successor_cache< T, M >::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

◆ decrement_counter()

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

Definition at line 2495 of file flow_graph.h.

2495  {
2496  {
2498  if(my_count) --my_count;
2499  }
2500  return forward_task();
2501  }
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 tbb::flow::interface10::limiter_node< T >::forward_task(), lock, tbb::flow::interface10::limiter_node< T >::my_count, and tbb::flow::interface10::limiter_node< T >::my_mutex.

Here is the call graph for this function:

◆ forward()

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

Definition at line 2490 of file flow_graph.h.

2490  {
2491  __TBB_ASSERT(false, "Should never be called");
2492  return;
2493  }
#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 2437 of file flow_graph.h.

2437  {
2438  input_type v;
2439  task *rval = NULL;
2440  bool reserved = false;
2441  {
2443  if ( check_conditions() )
2444  ++my_tries;
2445  else
2446  return NULL;
2447  }
2448 
2449  //SUCCESS
2450  // if we can reserve and can put, we consume the reservation
2451  // we increment the count and decrement the tries
2452  if ( (my_predecessors.try_reserve(v)) == true ){
2453  reserved=true;
2454  if ( (rval = my_successors.try_put_task(v)) != NULL ){
2455  {
2457  ++my_count;
2458  --my_tries;
2459  my_predecessors.try_consume();
2460  if ( check_conditions() ) {
2461  if ( internal::is_graph_active(this->my_graph) ) {
2462  task *rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2463  internal::forward_task_bypass< limiter_node<T> >( *this );
2465  }
2466  }
2467  }
2468  return rval;
2469  }
2470  }
2471  //FAILURE
2472  //if we can't reserve, we decrement the tries
2473  //if we can reserve but can't put, we decrement the tries and release the reservation
2474  {
2476  --my_tries;
2477  if (reserved) my_predecessors.try_release();
2478  if ( check_conditions() ) {
2479  if ( internal::is_graph_active(this->my_graph) ) {
2480  task *rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2481  internal::forward_task_bypass< limiter_node<T> >( *this );
2482  __TBB_ASSERT(!rval, "Have two tasks to handle");
2483  return rtask;
2484  }
2485  }
2486  return rval;
2487  }
2488  }
A task that calls a node's forward_task function.
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2657
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422
tbb::task * root_task()
Returns the root task of the graph.
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
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
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.

References __TBB_ASSERT, tbb::flow::interface10::limiter_node< T >::check_conditions(), tbb::flow::interface10::limiter_node< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::limiter_node< T >::my_count, tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_mutex, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, tbb::flow::interface10::limiter_node< T >::my_tries, tbb::flow::interface10::graph::root_task(), tbb::flow::interface10::internal::spawn_in_graph_arena(), and tbb::flow::interface10::internal::broadcast_cache< T, M >::try_put_task().

Referenced by tbb::flow::interface10::limiter_node< T >::decrement_counter().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ graph_reference()

◆ 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 2607 of file flow_graph.h.

2607  {
2609  my_predecessors.add( src );
2611  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2612  internal::forward_task_bypass < limiter_node<T> >( *this );
2614  }
2615  return true;
2616  }
A task that calls a node's forward_task function.
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2657
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422
tbb::task * root_task()
Returns the root task of the graph.
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
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
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.

References tbb::flow::interface10::internal::successor_cache< T, M >::empty(), tbb::flow::interface10::limiter_node< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::limiter_node< T >::my_count, tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_mutex, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, tbb::flow::interface10::limiter_node< T >::my_threshold, tbb::flow::interface10::limiter_node< T >::my_tries, tbb::flow::interface10::graph::root_task(), 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 2543 of file flow_graph.h.

2543  {
2545  bool was_empty = my_successors.empty();
2547  //spawn a forward task if this is the only successor
2548  if ( was_empty && !my_predecessors.empty() && my_count + my_tries < my_threshold ) {
2549  if ( internal::is_graph_active(this->my_graph) ) {
2550  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2551  internal::forward_task_bypass < limiter_node<T> >( *this );
2553  }
2554  }
2555  return true;
2556  }
A task that calls a node's forward_task function.
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2657
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422
tbb::task * root_task()
Returns the root task of the graph.
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
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
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.

References tbb::flow::interface10::internal::successor_cache< T, M >::empty(), tbb::flow::interface10::limiter_node< T >::graph_reference(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::limiter_node< T >::my_count, tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_mutex, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, tbb::flow::interface10::limiter_node< T >::my_threshold, tbb::flow::interface10::limiter_node< T >::my_tries, tbb::flow::interface10::internal::successor_cache< T, M >::register_successor(), tbb::flow::interface10::graph::root_task(), 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 2619 of file flow_graph.h.

2619  {
2620  my_predecessors.remove( src );
2621  return true;
2622  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422

References tbb::flow::interface10::limiter_node< T >::my_predecessors.

◆ 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 2560 of file flow_graph.h.

2560  {
2561  r.remove_predecessor(*this);
2563  return true;
2564  }
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424

References tbb::flow::interface10::limiter_node< T >::my_successors, and 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 2665 of file flow_graph.h.

2665  {
2666  my_count = 0;
2667  if(f & rf_clear_edges) {
2668  my_predecessors.clear();
2669  my_successors.clear();
2670  }
2671  else
2672  {
2673  my_predecessors.reset( );
2674  }
2675  decrement.reset_receiver(f);
2676  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2422
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2505
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424

References tbb::flow::interface10::internal::successor_cache< T, M >::clear(), tbb::flow::interface10::limiter_node< T >::decrement, tbb::flow::interface10::limiter_node< T >::my_count, tbb::flow::interface10::limiter_node< T >::my_predecessors, tbb::flow::interface10::limiter_node< T >::my_successors, 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 2661 of file flow_graph.h.

2661  {
2662  __TBB_ASSERT(false,NULL); // should never be called
2663  }
#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 2630 of file flow_graph.h.

2630  {
2631  {
2633  if ( my_count + my_tries >= my_threshold )
2634  return NULL;
2635  else
2636  ++my_tries;
2637  }
2638 
2639  task * rtask = my_successors.try_put_task(t);
2640 
2641  if ( !rtask ) { // try_put_task failed.
2643  --my_tries;
2645  rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2646  internal::forward_task_bypass< limiter_node<T> >( *this );
2647  }
2648  }
2649  else {
2651  ++my_count;
2652  --my_tries;
2653  }
2654  return rtask;
2655  }
A task that calls a node's forward_task function.
tbb::task * root_task()
Returns the root task of the graph.
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
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
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2424

References tbb::flow::interface10::limiter_node< T >::check_conditions(), tbb::flow::interface10::internal::is_graph_active(), lock, tbb::flow::interface10::limiter_node< T >::my_count, tbb::flow::interface10::graph_node::my_graph, tbb::flow::interface10::limiter_node< T >::my_mutex, tbb::flow::interface10::limiter_node< T >::my_successors, tbb::flow::interface10::limiter_node< T >::my_threshold, tbb::flow::interface10::limiter_node< T >::my_tries, tbb::flow::interface10::graph::root_task(), and tbb::flow::interface10::internal::broadcast_cache< T, M >::try_put_task().

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

◆ internal::decrementer< limiter_node< T > >

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

Definition at line 2430 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 2427 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 2628 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 2626 of file flow_graph.h.

Member Data Documentation

◆ decrement

◆ init_decrement_predecessors

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

Definition at line 2425 of file flow_graph.h.

◆ my_count

◆ my_mutex

◆ my_predecessors

◆ my_successors

◆ my_threshold

◆ my_tries


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.