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

◆ output_type

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

Definition at line 2403 of file flow_graph.h.

◆ predecessor_type

Definition at line 2404 of file flow_graph.h.

◆ successor_type

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

2504  :
2505  graph_node(g), my_threshold(threshold), my_count(0), my_tries(0),
2506  init_decrement_predecessors(num_decrement_predecessors),
2507  decrement(num_decrement_predecessors)
2508  {
2509  my_predecessors.set_owner(this);
2510  my_successors.set_owner(this);
2511  decrement.set_owner(this);
2512  tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph,
2513  static_cast<receiver<input_type> *>(this), static_cast<receiver<continue_msg> *>(&decrement),
2514  static_cast<sender<output_type> *>(this) );
2515  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2501
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420
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 2518 of file flow_graph.h.

2518  :
2519  graph_node(src.my_graph), receiver<T>(), sender<T>(),
2520  my_threshold(src.my_threshold), my_count(0), my_tries(0),
2521  init_decrement_predecessors(src.init_decrement_predecessors),
2522  decrement(src.init_decrement_predecessors)
2523  {
2524  my_predecessors.set_owner(this);
2525  my_successors.set_owner(this);
2526  decrement.set_owner(this);
2527  tbb::internal::fgt_node( tbb::internal::FLOW_LIMITER_NODE, &this->my_graph,
2528  static_cast<receiver<input_type> *>(this), static_cast<receiver<continue_msg> *>(&decrement),
2529  static_cast<sender<output_type> *>(this) );
2530  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2501
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420
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 2491 of file flow_graph.h.

2491  {
2492  {
2494  if(my_count) --my_count;
2495  }
2496  return forward_task();
2497  }
friend class scoped_lock
Definition: spin_mutex.h:176
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 2486 of file flow_graph.h.

2486  {
2487  __TBB_ASSERT(false, "Should never be called");
2488  return;
2489  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT.

◆ forward_task()

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

Definition at line 2433 of file flow_graph.h.

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

2603  {
2605  my_predecessors.add( src );
2607  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2608  internal::forward_task_bypass < limiter_node<T> >( *this );
2610  }
2611  return true;
2612  }
A task that calls a node's forward_task function.
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::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418
tbb::task * root_task()
Returns the root task of the graph.
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420
friend class scoped_lock
Definition: spin_mutex.h:176
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2653
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::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 2539 of file flow_graph.h.

2539  {
2541  bool was_empty = my_successors.empty();
2543  //spawn a forward task if this is the only successor
2544  if ( was_empty && !my_predecessors.empty() && my_count + my_tries < my_threshold ) {
2545  if ( internal::is_graph_active(this->my_graph) ) {
2546  task* task = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2547  internal::forward_task_bypass < limiter_node<T> >( *this );
2549  }
2550  }
2551  return true;
2552  }
A task that calls a node's forward_task function.
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::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418
tbb::task * root_task()
Returns the root task of the graph.
void spawn_in_graph_arena(graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420
friend class scoped_lock
Definition: spin_mutex.h:176
graph & graph_reference() __TBB_override
Definition: flow_graph.h:2653
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::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 2615 of file flow_graph.h.

2615  {
2616  my_predecessors.remove( src );
2617  return true;
2618  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418

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

2556  {
2557  r.remove_predecessor(*this);
2559  return true;
2560  }
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420

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

2661  {
2662  my_count = 0;
2663  if(f & rf_clear_edges) {
2664  my_predecessors.clear();
2665  my_successors.clear();
2666  }
2667  else
2668  {
2669  my_predecessors.reset( );
2670  }
2671  decrement.reset_receiver(f);
2672  }
internal::reservable_predecessor_cache< T, spin_mutex > my_predecessors
Definition: flow_graph.h:2418
internal::decrementer< limiter_node< T > > decrement
The internal receiver< continue_msg > that decrements the count.
Definition: flow_graph.h:2501
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420

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

2657  {
2658  __TBB_ASSERT(false,NULL); // should never be called
2659  }
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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

2626  {
2627  {
2629  if ( my_count + my_tries >= my_threshold )
2630  return NULL;
2631  else
2632  ++my_tries;
2633  }
2634 
2635  task * rtask = my_successors.try_put_task(t);
2636 
2637  if ( !rtask ) { // try_put_task failed.
2639  --my_tries;
2641  rtask = new ( task::allocate_additional_child_of( *(this->my_graph.root_task()) ) )
2642  internal::forward_task_bypass< limiter_node<T> >( *this );
2643  }
2644  }
2645  else {
2647  ++my_count;
2648  --my_tries;
2649  }
2650  return rtask;
2651  }
A task that calls a node's forward_task function.
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
tbb::task * root_task()
Returns the root task of the graph.
internal::broadcast_cache< T > my_successors
Definition: flow_graph.h:2420
friend class scoped_lock
Definition: spin_mutex.h:176
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 >::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 2623 of file flow_graph.h.

◆ internal::decrementer< limiter_node< T > >

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

Definition at line 2426 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 2423 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 2624 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 2622 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 2421 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.