|
Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
Forwards messages in arbitrary order. More...
#include <flow_graph.h>
Classes | |
| class | buffer_operation |
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 buffer_node< T, Allocator > | class_type |
Public Types inherited from internal::item_buffer< T, cache_aligned_allocator< T > > | |
| enum | buffer_item_state |
| typedef T | item_type |
Public Member Functions | |
| __TBB_STATIC_ASSERT ((tbb::internal::is_same_type< Allocator, null_type >::value), "Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface.") | |
| __TBB_NOINLINE_SYM | buffer_node (graph &g) |
| Constructor. More... | |
| __TBB_NOINLINE_SYM | buffer_node (const buffer_node &src) |
| Copy constructor. More... | |
| bool | register_successor (successor_type &r) __TBB_override |
| Adds a new successor. More... | |
| bool | remove_successor (successor_type &r) __TBB_override |
| Removes a successor. More... | |
| bool | try_get (T &v) __TBB_override |
| Request an item from the buffer_node. More... | |
| bool | try_reserve (T &v) __TBB_override |
| Reserves an item. More... | |
| bool | try_release () __TBB_override |
| Release a reserved item. More... | |
| bool | try_consume () __TBB_override |
| Consumes a reserved item. More... | |
Public Member Functions inherited from tbb::flow::interface11::graph_node | |
| graph_node (graph &g) | |
| virtual | ~graph_node () |
Public Member Functions inherited from internal::reservable_item_buffer< T, cache_aligned_allocator< T > > | |
| reservable_item_buffer () | |
| void | reset () |
Public Member Functions inherited from internal::item_buffer< T, cache_aligned_allocator< T > > | |
| item_buffer () | |
| Constructor. More... | |
| ~item_buffer () | |
| void | reset () |
Public Member Functions inherited from tbb::flow::interface11::receiver< T > | |
| virtual | ~receiver () |
| Destructor. More... | |
| bool | try_put (const T &t) |
| Put an item to the receiver. More... | |
| virtual __TBB_DEPRECATED bool | register_predecessor (predecessor_type &) |
| Add a predecessor to the node. More... | |
| virtual __TBB_DEPRECATED bool | remove_predecessor (predecessor_type &) |
| Remove a predecessor from the node. More... | |
Public Member Functions inherited from tbb::flow::interface11::sender< T > | |
| virtual | ~sender () |
| virtual __TBB_DEPRECATED bool | register_successor (successor_type &r)=0 |
| Add a new successor to this node. More... | |
| virtual __TBB_DEPRECATED bool | remove_successor (successor_type &r)=0 |
| Removes a successor from this node. More... | |
Protected Types | |
| enum | op_type { reg_succ, rem_succ, req_item, res_item, rel_res, con_res, put_item, try_fwd_task } |
| typedef size_t | size_type |
| typedef internal::aggregating_functor< class_type, buffer_operation > | handler_type |
Protected Types inherited from internal::item_buffer< T, cache_aligned_allocator< T > > | |
| typedef size_t | size_type |
| typedef aligned_pair< item_type, buffer_item_state >::type | buffer_item_type |
| typedef tbb::internal::allocator_rebind< cache_aligned_allocator< T >, buffer_item_type >::type | allocator_type |
Protected Attributes | |
| internal::round_robin_cache< T, null_rw_mutex > | my_successors |
| bool | forwarder_busy |
| internal::aggregator< handler_type, buffer_operation > | my_aggregator |
Protected Attributes inherited from tbb::flow::interface11::graph_node | |
| graph & | my_graph |
| graph_node * | next |
| graph_node * | prev |
Protected Attributes inherited from internal::reservable_item_buffer< T, cache_aligned_allocator< T > > | |
| bool | my_reserved |
Protected Attributes inherited from internal::item_buffer< T, cache_aligned_allocator< T > > | |
| buffer_item_type * | my_array |
| size_type | my_array_size |
| size_type | my_head |
| size_type | my_tail |
Private Types | |
| typedef cache_aligned_allocator< T > | internals_allocator |
Private Member Functions | |
| void | order () |
| bool | is_item_valid () |
| void | try_put_and_add_task (task *&last_task) |
Friends | |
| class | internal::forward_task_bypass< class_type > |
| class | internal::aggregating_functor< class_type, buffer_operation > |
| 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 | |
Public Attributes inherited from tbb::flow::interface11::receiver< T > | |
| __TBB_DEPRECATED typedef T | input_type |
| The input type of this receiver. More... | |
| __TBB_DEPRECATED typedef sender< T > | predecessor_type |
| The predecessor type for this node. More... | |
Public Attributes inherited from tbb::flow::interface11::sender< T > | |
| __TBB_DEPRECATED typedef T | output_type |
| The output type of this sender. More... | |
| __TBB_DEPRECATED typedef receiver< T > | successor_type |
| The successor type for this node. More... | |
Static Protected Attributes inherited from internal::item_buffer< T, cache_aligned_allocator< T > > | |
| static const size_type | initial_buffer_size |
Forwards messages in arbitrary order.
Definition at line 2036 of file flow_graph.h.
| typedef buffer_node<T, Allocator> tbb::flow::interface11::buffer_node< T, Allocator >::class_type |
Definition at line 2054 of file flow_graph.h.
|
protected |
Definition at line 2117 of file flow_graph.h.
| typedef T tbb::flow::interface11::buffer_node< T, Allocator >::input_type |
Definition at line 2050 of file flow_graph.h.
|
private |
Definition at line 2047 of file flow_graph.h.
| typedef T tbb::flow::interface11::buffer_node< T, Allocator >::output_type |
Definition at line 2051 of file flow_graph.h.
| typedef receiver<input_type>::predecessor_type tbb::flow::interface11::buffer_node< T, Allocator >::predecessor_type |
Definition at line 2052 of file flow_graph.h.
|
protected |
Definition at line 2068 of file flow_graph.h.
| typedef sender<output_type>::successor_type tbb::flow::interface11::buffer_node< T, Allocator >::successor_type |
Definition at line 2053 of file flow_graph.h.
|
protected |
| Enumerator | |
|---|---|
| reg_succ | |
| rem_succ | |
| req_item | |
| res_item | |
| rel_res | |
| con_res | |
| put_item | |
| try_fwd_task | |
Definition at line 2077 of file flow_graph.h.
|
inlineexplicit |
|
inline |
| tbb::flow::interface11::buffer_node< T, Allocator >::__TBB_STATIC_ASSERT | ( | (tbb::internal::is_same_type< Allocator, null_type >::value) | , |
| "Allocator template parameter for flow graph nodes is deprecated and will be removed. " "Specify TBB_DEPRECATED_FLOW_NODE_ALLOCATOR to temporary enable the deprecated interface." | |||
| ) |
|
inlineprotected |
Definition at line 2178 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::register_successor(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::remove_successor(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_consume(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_get(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_release(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_reserve().
|
inlineprotectedvirtual |
This is executed by an enqueued task, the "forwarder".
Definition at line 2188 of file flow_graph.h.
|
inlineprotected |
Definition at line 2174 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::enqueue_forwarding_task(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_put_task().
|
inlineprotectedvirtual |
Implements tbb::flow::interface11::receiver< T >.
Definition at line 2530 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::enqueue_forwarding_task(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_put_task().
|
inlineprotectedvirtual |
Definition at line 2121 of file flow_graph.h.
|
inlineprotected |
Definition at line 2126 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations().
|
inlineprotectedvirtual |
Definition at line 2339 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Tries to forward valid items to successors.
Definition at line 2286 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotected |
Definition at line 2291 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::internal_forward_task().
|
inlineprotectedvirtual |
Definition at line 2321 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Definition at line 2315 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Register successor.
Definition at line 2205 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Definition at line 2344 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Remove successor.
Definition at line 2211 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprotectedvirtual |
Definition at line 2330 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl().
|
inlineprivate |
Definition at line 2270 of file flow_graph.h.
|
inlineprivate |
Definition at line 2268 of file flow_graph.h.
|
inline |
Adds a new successor.
Adds successor r to the list of successors; may forward tasks.
Definition at line 2391 of file flow_graph.h.
|
inline |
Removes a successor.
Removes successor r from the list of successors. It also calls r.remove_predecessor(*this) to remove this node as a predecessor.
Definition at line 2453 of file flow_graph.h.
|
inlineprotectedvirtual |
Implements tbb::flow::interface11::graph_node.
Reimplemented in tbb::flow::interface11::queue_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >.
Definition at line 2545 of file flow_graph.h.
Referenced by tbb::flow::interface11::queue_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::reset_node(), and tbb::flow::interface11::priority_queue_node< T, Compare, Allocator >::reset_node().
|
inlineprotectedvirtual |
put receiver back in initial state
Implements tbb::flow::interface11::receiver< T >.
Definition at line 2534 of file flow_graph.h.
|
inlinevirtual |
Consumes a reserved item.
true = item is removed from sender and reservation removed
Reimplemented from tbb::flow::interface11::sender< T >.
Definition at line 2498 of file flow_graph.h.
|
inlinevirtual |
Request an item from the buffer_node.
true = v contains the returned item
false = no item has been returned
Reimplemented from tbb::flow::interface11::sender< T >.
Definition at line 2468 of file flow_graph.h.
|
inlineprivate |
Definition at line 2274 of file flow_graph.h.
|
inlineprotectedvirtual |
receive an item, return a task *if possible
Implements tbb::flow::interface11::receiver< T >.
Definition at line 2511 of file flow_graph.h.
|
inlinevirtual |
Release a reserved item.
true = item has been released and so remains in sender
Reimplemented from tbb::flow::interface11::sender< T >.
Definition at line 2489 of file flow_graph.h.
|
inlinevirtual |
Reserves an item.
false = no item can be reserved
true = an item is reserved
Reimplemented from tbb::flow::interface11::sender< T >.
Definition at line 2479 of file flow_graph.h.
|
friend |
Definition at line 2118 of file flow_graph.h.
|
friend |
Definition at line 2508 of file flow_graph.h.
|
friend |
Definition at line 2075 of file flow_graph.h.
|
friend |
Definition at line 2509 of file flow_graph.h.
|
friend |
Definition at line 2507 of file flow_graph.h.
|
protected |
Definition at line 2116 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::handle_operations_impl(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::internal_forward_task_impl(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::reset_node().
|
protected |
Definition at line 2119 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::buffer_node(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::forward_task(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::register_successor(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::remove_successor(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_consume(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_get(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_put_task(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_release(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_reserve().
|
protected |
Definition at line 2069 of file flow_graph.h.
Referenced by tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::buffer_node(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::internal_forward_task_impl(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::internal_reg_succ(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::internal_rem_succ(), tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::reset_node(), and tbb::flow::interface11::buffer_node< T, __TBB_DEFAULT_NODE_ALLOCATOR(T) >::try_put_and_add_task().