Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Forwards messages only if the threshold has not been reached. More...
#include <flow_graph.h>
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 |
![]() | |
typedef T | input_type |
The input type of this receiver. More... | |
typedef internal::async_helpers< T >::filtered_type | filtered_type |
![]() | |
typedef untyped_sender | predecessor_type |
The predecessor type for this node. More... | |
![]() | |
typedef T | output_type |
The output type of this sender. More... | |
typedef internal::async_helpers< T >::filtered_type | filtered_type |
![]() | |
typedef untyped_receiver | successor_type |
The successor type for this node. More... | |
Public Member Functions | |
limiter_node (graph &g, __TBB_DEPRECATED_LIMITER_ARG2(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... | |
![]() | |
graph_node (graph &g) | |
virtual | ~graph_node () |
![]() | |
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) |
![]() | |
virtual | ~untyped_receiver () |
Destructor. More... | |
template<typename X > | |
bool | try_put (const X &t) |
Put an item to the receiver. More... | |
![]() | |
virtual bool | try_get (T &) |
Request an item from the sender. More... | |
virtual bool | try_reserve (T &) |
Reserves an item in the sender. More... | |
![]() | |
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, DecrementType >, DecrementType > | decrement |
The internal receiver< DecrementType > that decrements the count. More... | |
Protected Member Functions | |
task * | try_put_task (const T &t) __TBB_override |
Puts an item to this receiver. More... | |
graph & | graph_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 |
![]() | |
virtual task * | try_put_task_wrapper (const void *p, bool is_async) __TBB_override |
![]() | |
template<typename X > | |
task * | try_put_task (const X &t) |
virtual bool | is_continue_receiver () |
![]() | |
virtual bool | try_get_wrapper (void *p, bool is_async) __TBB_override |
virtual bool | try_reserve_wrapper (void *p, bool is_async) __TBB_override |
![]() | |
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 () |
task * | forward_task () |
void | forward () |
task * | decrement_counter (long long delta) |
void | initialize () |
Private Attributes | |
size_t | my_threshold |
size_t | my_count |
size_t | my_tries |
internal::reservable_predecessor_cache< T, spin_mutex > | my_predecessors |
spin_mutex | my_mutex |
internal::broadcast_cache< T > | my_successors |
Friends | |
class | internal::forward_task_bypass< limiter_node< T, DecrementType > > |
class | internal::decrementer< limiter_node< T, DecrementType >, DecrementType > |
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 | |
![]() | |
graph & | my_graph |
graph_node * | next |
graph_node * | prev |
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 100 of file flow_graph.h.
typedef T tbb::flow::interface11::limiter_node< T, DecrementType >::input_type |
Definition at line 2411 of file flow_graph.h.
typedef T tbb::flow::interface11::limiter_node< T, DecrementType >::output_type |
Definition at line 2412 of file flow_graph.h.
typedef receiver<input_type>::predecessor_type tbb::flow::interface11::limiter_node< T, DecrementType >::predecessor_type |
Definition at line 2413 of file flow_graph.h.
typedef sender<output_type>::successor_type tbb::flow::interface11::limiter_node< T, DecrementType >::successor_type |
Definition at line 2414 of file flow_graph.h.
|
inline |
Constructor.
Definition at line 2534 of file flow_graph.h.
|
inline |
Copy constructor.
Definition at line 2545 of file flow_graph.h.
|
inlineprivate |
Definition at line 2437 of file flow_graph.h.
References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::empty(), and tbb::flow::interface10::internal::successor_cache< T, M >::empty().
|
inlineprivate |
Definition at line 2500 of file flow_graph.h.
References lock.
|
inlineprivate |
Definition at line 2495 of file flow_graph.h.
References __TBB_ASSERT.
|
inlineprivate |
Definition at line 2442 of file flow_graph.h.
References __TBB_ASSERT, 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().
|
inlineprotectedvirtual |
Implements tbb::flow::interface10::internal::untyped_receiver.
Definition at line 2676 of file flow_graph.h.
|
inlineprivate |
Definition at line 2513 of file flow_graph.h.
References tbb::internal::fgt_node(), tbb::flow::interface10::internal::predecessor_cache< T, M >::set_owner(), and tbb::flow::interface10::internal::successor_cache< T, M >::set_owner().
|
inlinevirtual |
Adds src to the list of cached predecessors.
Reimplemented from tbb::flow::interface10::internal::untyped_receiver.
Definition at line 2626 of file flow_graph.h.
References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::add(), tbb::flow::interface10::internal::successor_cache< T, M >::empty(), tbb::flow::interface10::internal::is_graph_active(), lock, and tbb::flow::interface10::internal::spawn_in_graph_arena().
|
inlinevirtual |
Replace the current successor with this new successor.
Implements tbb::flow::interface10::internal::untyped_sender.
Definition at line 2562 of file flow_graph.h.
References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::empty(), tbb::flow::interface10::internal::successor_cache< T, M >::empty(), 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().
|
inlinevirtual |
Removes src from the list of cached predecessors.
Reimplemented from tbb::flow::interface10::internal::untyped_receiver.
Definition at line 2638 of file flow_graph.h.
References tbb::flow::interface10::internal::node_cache< untyped_sender, M >::remove().
|
inlinevirtual |
Removes a successor from this node.
r.remove_predecessor(*this) is also called.
Implements tbb::flow::interface10::internal::untyped_sender.
Definition at line 2579 of file flow_graph.h.
References tbb::flow::interface10::internal::successor_cache< T, M >::remove_successor().
|
inlineprotectedvirtual |
Implements tbb::flow::interface10::graph_node.
Definition at line 2682 of file flow_graph.h.
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(), and tbb::flow::interface10::rf_clear_edges.
|
inlineprotectedvirtual |
put receiver back in initial state
Implements tbb::flow::interface10::internal::untyped_receiver.
Definition at line 2678 of file flow_graph.h.
References __TBB_ASSERT.
|
inlineprotectedvirtual |
Puts an item to this receiver.
Implements tbb::flow::interface10::receiver< T >.
Definition at line 2649 of file flow_graph.h.
References tbb::flow::interface10::internal::is_graph_active(), lock, internal::successor_cache< T, M >::my_mutex, and internal::successor_cache< T, M >::my_successors.
|
friend |
Definition at line 2646 of file flow_graph.h.
|
friend |
Definition at line 2435 of file flow_graph.h.
|
friend |
Definition at line 2432 of file flow_graph.h.
|
friend |
Definition at line 2647 of file flow_graph.h.
|
friend |
Definition at line 2645 of file flow_graph.h.
internal::decrementer< limiter_node<T, DecrementType>, DecrementType > tbb::flow::interface11::limiter_node< T, DecrementType >::decrement |
The internal receiver< DecrementType > that decrements the count.
Definition at line 2525 of file flow_graph.h.
|
private |
Definition at line 2425 of file flow_graph.h.
|
private |
Definition at line 2428 of file flow_graph.h.
|
private |
Definition at line 2427 of file flow_graph.h.
|
private |
Definition at line 2429 of file flow_graph.h.
|
private |
Definition at line 2424 of file flow_graph.h.
|
private |
Definition at line 2426 of file flow_graph.h.