Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
An executable node that acts as a source, i.e. it has no predecessors. More...
#include <flow_graph.h>
Public Types | |
typedef Output | output_type |
The type of the output message, which is complete. More... | |
typedef sender< output_type >::successor_type | successor_type |
The type of successors of this node. More... | |
typedef null_type | input_type |
Public Member Functions | |
template<typename Body > | |
__TBB_NOINLINE_SYM | input_node (graph &g, Body body) |
Constructor for a node with a successor. More... | |
__TBB_NOINLINE_SYM | input_node (const input_node &src) |
Copy constructor. More... | |
~input_node () | |
The destructor. More... | |
bool | register_successor (successor_type &r) __TBB_override |
Add a new successor to this node. More... | |
bool | remove_successor (successor_type &r) __TBB_override |
Removes a successor from this node. More... | |
bool | try_get (output_type &v) __TBB_override |
Request an item from the node. More... | |
bool | try_reserve (output_type &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... | |
void | activate () |
Activates a node that was created in the inactive state. More... | |
template<typename Body > | |
Body | copy_function_object () |
![]() | |
graph_node (graph &g) | |
virtual | ~graph_node () |
![]() | |
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 Member Functions | |
void | reset_node (reset_flags f) __TBB_override |
resets the source_node to its initial state More... | |
Private Member Functions | |
bool | try_reserve_apply_body (output_type &v) |
task * | create_put_task () |
void | spawn_put () |
Spawns a task that applies the body. More... | |
task * | apply_body_bypass () |
Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it. More... | |
Private Attributes | |
spin_mutex | my_mutex |
bool | my_active |
internal::source_body< output_type > * | my_body |
internal::source_body< output_type > * | my_init_body |
internal::broadcast_cache< output_type > | my_successors |
bool | my_reserved |
bool | my_has_cached_item |
output_type | my_cached_item |
Friends | |
class | internal::source_task_bypass< input_node< output_type > > |
Additional Inherited Members | |
![]() | |
__TBB_DEPRECATED typedef Output | output_type |
The output type of this sender. More... | |
__TBB_DEPRECATED typedef receiver< Output > | successor_type |
The successor type for this node. More... | |
![]() | |
graph & | my_graph |
graph_node * | next |
graph_node * | prev |
An executable node that acts as a source, i.e. it has no predecessors.
Definition at line 903 of file flow_graph.h.
typedef null_type tbb::flow::interface11::input_node< Output >::input_type |
Definition at line 912 of file flow_graph.h.
typedef Output tbb::flow::interface11::input_node< Output >::output_type |
The type of the output message, which is complete.
Definition at line 906 of file flow_graph.h.
typedef sender<output_type>::successor_type tbb::flow::interface11::input_node< Output >::successor_type |
The type of successors of this node.
Definition at line 909 of file flow_graph.h.
|
inline |
Constructor for a node with a successor.
Definition at line 921 of file flow_graph.h.
References CODEPTR, tbb::internal::fgt_node_with_body(), tbb::flow::interface11::input_node< Output >::my_body, tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::input_node< Output >::my_successors.
|
inline |
Copy constructor.
Definition at line 941 of file flow_graph.h.
References CODEPTR, tbb::internal::fgt_node_with_body(), tbb::flow::interface11::input_node< Output >::my_body, tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::input_node< Output >::my_successors.
|
inline |
The destructor.
Definition at line 953 of file flow_graph.h.
References tbb::flow::interface11::input_node< Output >::my_body, and tbb::flow::interface11::input_node< Output >::my_init_body.
|
inline |
Activates a node that was created in the inactive state.
Definition at line 1060 of file flow_graph.h.
References lock, tbb::flow::interface11::input_node< Output >::my_active, tbb::flow::interface11::input_node< Output >::my_mutex, tbb::flow::interface11::input_node< Output >::my_successors, and tbb::flow::interface11::input_node< Output >::spawn_put().
|
inlineprivate |
Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it.
Definition at line 1145 of file flow_graph.h.
References tbb::flow::interface11::input_node< Output >::my_successors, tbb::flow::interface11::input_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_release(), and tbb::flow::interface11::input_node< Output >::try_reserve_apply_body().
|
inline |
Definition at line 1068 of file flow_graph.h.
References tbb::flow::interface11::input_node< Output >::my_body.
|
inlineprivate |
Definition at line 1131 of file flow_graph.h.
References tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface10::graph::root_task().
Referenced by tbb::flow::interface11::input_node< Output >::spawn_put().
|
inline |
Add a new successor to this node.
Definition at line 962 of file flow_graph.h.
References lock, tbb::flow::interface11::input_node< Output >::my_active, tbb::flow::interface11::input_node< Output >::my_mutex, tbb::flow::interface11::input_node< Output >::my_successors, and tbb::flow::interface11::input_node< Output >::spawn_put().
|
inline |
Removes a successor from this node.
Definition at line 971 of file flow_graph.h.
References lock, tbb::flow::interface11::input_node< Output >::my_mutex, and tbb::flow::interface11::input_node< Output >::my_successors.
|
inlineprotectedvirtual |
resets the source_node to its initial state
Implements tbb::flow::interface11::graph_node.
Definition at line 1085 of file flow_graph.h.
References internal::source_body< Output >::clone(), tbb::flow::interface11::input_node< Output >::my_active, tbb::flow::interface11::input_node< Output >::my_body, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_init_body, tbb::flow::interface11::input_node< Output >::my_reserved, tbb::flow::interface11::input_node< Output >::my_successors, tbb::flow::interface11::rf_clear_edges, and tbb::flow::interface11::rf_reset_bodies.
|
inlineprivate |
Spawns a task that applies the body.
Definition at line 1137 of file flow_graph.h.
References tbb::flow::interface11::input_node< Output >::create_put_task(), tbb::flow::interface11::internal::is_graph_active(), tbb::flow::interface11::graph_node::my_graph, and tbb::flow::interface11::internal::spawn_in_graph_arena().
Referenced by tbb::flow::interface11::input_node< Output >::activate(), tbb::flow::interface11::input_node< Output >::register_successor(), tbb::flow::interface11::input_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_get(), and tbb::flow::interface11::input_node< Output >::try_release().
|
inlinevirtual |
Consumes a reserved item.
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1048 of file flow_graph.h.
References __TBB_ASSERT, lock, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_mutex, tbb::flow::interface11::input_node< Output >::my_reserved, tbb::flow::interface11::input_node< Output >::my_successors, and tbb::flow::interface11::input_node< Output >::spawn_put().
Referenced by tbb::flow::interface11::input_node< Output >::apply_body_bypass().
|
inlinevirtual |
Request an item from the node.
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1003 of file flow_graph.h.
References lock, tbb::flow::interface11::input_node< Output >::my_active, tbb::flow::interface11::input_node< Output >::my_cached_item, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_mutex, tbb::flow::interface11::input_node< Output >::my_reserved, and tbb::flow::interface11::input_node< Output >::spawn_put().
|
inlinevirtual |
Release a reserved item.
true = item has been released and so remains in sender, dest must request or reserve future items
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1038 of file flow_graph.h.
References __TBB_ASSERT, lock, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_mutex, tbb::flow::interface11::input_node< Output >::my_reserved, tbb::flow::interface11::input_node< Output >::my_successors, and tbb::flow::interface11::input_node< Output >::spawn_put().
Referenced by tbb::flow::interface11::input_node< Output >::apply_body_bypass().
|
inlinevirtual |
Reserves an item.
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1021 of file flow_graph.h.
References lock, tbb::flow::interface11::input_node< Output >::my_cached_item, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_mutex, and tbb::flow::interface11::input_node< Output >::my_reserved.
|
inlineprivate |
Definition at line 1109 of file flow_graph.h.
References tbb::internal::fgt_begin_body(), tbb::internal::fgt_end_body(), lock, tbb::flow::interface11::input_node< Output >::my_body, tbb::flow::interface11::input_node< Output >::my_cached_item, tbb::flow::interface11::input_node< Output >::my_has_cached_item, tbb::flow::interface11::input_node< Output >::my_mutex, and tbb::flow::interface11::input_node< Output >::my_reserved.
Referenced by tbb::flow::interface11::input_node< Output >::apply_body_bypass().
|
friend |
Definition at line 1143 of file flow_graph.h.
|
private |
Definition at line 1100 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::activate(), tbb::flow::interface11::input_node< Output >::register_successor(), tbb::flow::interface11::input_node< Output >::reset_node(), and tbb::flow::interface11::input_node< Output >::try_get().
|
private |
Definition at line 1101 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::copy_function_object(), tbb::flow::interface11::input_node< Output >::input_node(), tbb::flow::interface11::input_node< Output >::reset_node(), tbb::flow::interface11::input_node< Output >::try_reserve_apply_body(), and tbb::flow::interface11::input_node< Output >::~input_node().
|
private |
Definition at line 1106 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::try_get(), tbb::flow::interface11::input_node< Output >::try_reserve(), and tbb::flow::interface11::input_node< Output >::try_reserve_apply_body().
|
private |
Definition at line 1105 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::reset_node(), tbb::flow::interface11::input_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_get(), tbb::flow::interface11::input_node< Output >::try_release(), tbb::flow::interface11::input_node< Output >::try_reserve(), and tbb::flow::interface11::input_node< Output >::try_reserve_apply_body().
|
private |
Definition at line 1102 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::reset_node(), and tbb::flow::interface11::input_node< Output >::~input_node().
|
private |
Definition at line 1099 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::activate(), tbb::flow::interface11::input_node< Output >::register_successor(), tbb::flow::interface11::input_node< Output >::remove_successor(), tbb::flow::interface11::input_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_get(), tbb::flow::interface11::input_node< Output >::try_release(), tbb::flow::interface11::input_node< Output >::try_reserve(), and tbb::flow::interface11::input_node< Output >::try_reserve_apply_body().
|
private |
Definition at line 1104 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::reset_node(), tbb::flow::interface11::input_node< Output >::try_consume(), tbb::flow::interface11::input_node< Output >::try_get(), tbb::flow::interface11::input_node< Output >::try_release(), tbb::flow::interface11::input_node< Output >::try_reserve(), and tbb::flow::interface11::input_node< Output >::try_reserve_apply_body().
|
private |
Definition at line 1103 of file flow_graph.h.
Referenced by tbb::flow::interface11::input_node< Output >::activate(), tbb::flow::interface11::input_node< Output >::apply_body_bypass(), tbb::flow::interface11::input_node< Output >::input_node(), tbb::flow::interface11::input_node< Output >::register_successor(), tbb::flow::interface11::input_node< Output >::remove_successor(), tbb::flow::interface11::input_node< Output >::reset_node(), tbb::flow::interface11::input_node< Output >::try_consume(), and tbb::flow::interface11::input_node< Output >::try_release().