Intel(R) Threading Building Blocks Doxygen Documentation version 4.2.3
|
Forwards messages in FIFO order. 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 |
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 |
![]() | |
enum | buffer_item_state { no_item =0 , has_item =1 , reserved_item =2 } |
typedef T | item_type |
![]() | |
typedef untyped_sender | predecessor_type |
The predecessor type for this node. | |
![]() | |
typedef untyped_receiver | successor_type |
The successor type for this node. | |
Public Member Functions | |
__TBB_NOINLINE_SYM | queue_node (graph &g) |
Constructor. | |
__TBB_NOINLINE_SYM | queue_node (const queue_node &src) |
Copy constructor. | |
![]() | |
__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. | |
__TBB_NOINLINE_SYM | buffer_node (const buffer_node &src) |
Copy constructor. | |
bool | register_successor (successor_type &r) __TBB_override |
Adds a new successor. | |
bool | remove_successor (successor_type &r) __TBB_override |
Removes a successor. | |
bool | try_get (T &v) __TBB_override |
Request an item from the buffer_node. | |
bool | try_reserve (T &v) __TBB_override |
Reserves an item. | |
bool | try_release () __TBB_override |
Release a reserved item. | |
bool | try_consume () __TBB_override |
Consumes a reserved item. | |
![]() | |
graph_node (graph &g) | |
virtual | ~graph_node () |
![]() | |
reservable_item_buffer () | |
void | reset () |
![]() | |
item_buffer () | |
Constructor. | |
~item_buffer () | |
void | reset () |
![]() | |
bool | try_put (const typename internal::async_helpers< T >::filtered_type &t) |
Put an item to the receiver. | |
bool | try_put (const typename internal::async_helpers< T >::async_type &t) |
![]() | |
virtual | ~untyped_receiver () |
Destructor. | |
template<typename X > | |
bool | try_put (const X &t) |
Put an item to the receiver. | |
virtual bool | register_predecessor (predecessor_type &) |
Add a predecessor to the node. | |
virtual bool | remove_predecessor (predecessor_type &) |
Remove a predecessor from the node. | |
virtual bool | try_get (T &) |
Request an item from the sender. | |
virtual bool | try_reserve (T &) |
Reserves an item in the sender. | |
![]() | |
virtual | ~untyped_sender () |
virtual bool | register_successor (successor_type &r)=0 |
Add a new successor to this node. | |
virtual bool | remove_successor (successor_type &r)=0 |
Removes a successor from this node. | |
virtual bool | try_release () |
Releases the reserved item. | |
virtual bool | try_consume () |
Consumes the reserved item. | |
Protected Types | |
typedef buffer_node< T, Allocator > | base_type |
typedef base_type::size_type | size_type |
typedef base_type::buffer_operation | queue_operation |
typedef queue_node | class_type |
![]() | |
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 |
![]() | |
typedef size_t | size_type |
typedef aligned_pair< item_type, buffer_item_state >::type | buffer_item_type |
typedef tbb::internal::allocator_rebind< A, buffer_item_type >::type | allocator_type |
Private 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.") | |
bool | is_item_valid () |
void | try_put_and_add_task (task *&last_task) |
Friends | |
template<typename , typename > | |
class | buffer_node |
Forwards messages in FIFO order.
Definition at line 2568 of file flow_graph.h.
|
protected |
Definition at line 2577 of file flow_graph.h.
|
protected |
Definition at line 2580 of file flow_graph.h.
typedef T tbb::flow::interface11::queue_node< T, Allocator >::input_type |
Definition at line 2628 of file flow_graph.h.
typedef T tbb::flow::interface11::queue_node< T, Allocator >::output_type |
Definition at line 2629 of file flow_graph.h.
typedef receiver<input_type>::predecessor_type tbb::flow::interface11::queue_node< T, Allocator >::predecessor_type |
Definition at line 2630 of file flow_graph.h.
|
protected |
Definition at line 2579 of file flow_graph.h.
|
protected |
Definition at line 2578 of file flow_graph.h.
typedef sender<output_type>::successor_type tbb::flow::interface11::queue_node< T, Allocator >::successor_type |
Definition at line 2631 of file flow_graph.h.
|
inlineexplicit |
Constructor.
Definition at line 2634 of file flow_graph.h.
References CODEPTR, tbb::internal::fgt_node(), and tbb::flow::interface11::graph_node::my_graph.
|
inline |
Copy constructor.
Definition at line 2648 of file flow_graph.h.
References CODEPTR, tbb::internal::fgt_node(), and tbb::flow::interface11::graph_node::my_graph.
|
private |
|
inlineprotectedvirtual |
Reimplemented from tbb::flow::interface11::buffer_node< T, Allocator >.
Definition at line 2622 of file flow_graph.h.
References tbb::internal::__TBB_store_with_release(), internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::consume_front(), and internal::SUCCEEDED.
|
inlineprotectedvirtual |
Tries to forward valid items to successors.
Reimplemented from tbb::flow::interface11::buffer_node< T, Allocator >.
Definition at line 2600 of file flow_graph.h.
References tbb::flow::interface11::buffer_node< T, Allocator >::internal_forward_task_impl().
|
inlineprotectedvirtual |
Reimplemented from tbb::flow::interface11::buffer_node< T, Allocator >.
Definition at line 2604 of file flow_graph.h.
References tbb::internal::__TBB_store_with_release(), internal::FAILED, internal::item_buffer< T, A >::my_head, internal::item_buffer< T, A >::my_item_valid(), internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::my_reserved, internal::item_buffer< T, A >::pop_front(), and internal::SUCCEEDED.
|
inlineprotectedvirtual |
Reimplemented from tbb::flow::interface11::buffer_node< T, Allocator >.
Definition at line 2613 of file flow_graph.h.
References tbb::internal::__TBB_store_with_release(), internal::FAILED, internal::item_buffer< T, A >::my_head, internal::item_buffer< T, A >::my_item_valid(), internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::my_reserved, internal::reservable_item_buffer< T, cache_aligned_allocator< T > >::reserve_front(), and internal::SUCCEEDED.
|
inlineprivate |
Definition at line 2585 of file flow_graph.h.
References internal::item_buffer< T, A >::my_head, and internal::item_buffer< T, A >::my_item_valid().
|
inlineprotectedvirtual |
Reimplemented from tbb::flow::interface11::buffer_node< T, Allocator >.
Definition at line 2661 of file flow_graph.h.
References tbb::flow::interface11::buffer_node< T, Allocator >::reset_node().
|
inlineprivate |
Definition at line 2589 of file flow_graph.h.
References tbb::flow::interface11::combine_tasks(), internal::item_buffer< T, A >::destroy_front(), internal::item_buffer< T, A >::front(), and tbb::flow::interface11::buffer_node< T, Allocator >::graph_reference().
|
friend |
Definition at line 2583 of file flow_graph.h.