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 |
![]() | |
typedef untyped_receiver | successor_type |
The successor type for this node. More... | |
Public Member Functions | |
template<typename Body > | |
__TBB_NOINLINE_SYM | source_node (graph &g, Body body, bool is_active=true) |
Constructor for a node with a successor. More... | |
__TBB_NOINLINE_SYM | source_node (const source_node &src) |
Copy constructor. More... | |
~source_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 | ~untyped_sender () |
Protected Member Functions | |
void | reset_node (reset_flags f) __TBB_override |
resets the source_node to its initial state More... | |
![]() | |
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 | 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 |
bool | init_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< source_node< output_type > > |
Additional Inherited Members | |
![]() | |
__TBB_DEPRECATED typedef Output | output_type |
The output type of this sender. More... | |
__TBB_DEPRECATED typedef internal::async_helpers< Output >::filtered_type | filtered_type |
![]() | |
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 1187 of file flow_graph.h.
typedef null_type tbb::flow::interface11::source_node< Output >::input_type |
Definition at line 1198 of file flow_graph.h.
typedef Output tbb::flow::interface11::source_node< Output >::output_type |
The type of the output message, which is complete.
Definition at line 1192 of file flow_graph.h.
typedef sender<output_type>::successor_type tbb::flow::interface11::source_node< Output >::successor_type |
The type of successors of this node.
Definition at line 1195 of file flow_graph.h.
|
inline |
Constructor for a node with a successor.
Definition at line 1207 of file flow_graph.h.
|
inline |
Copy constructor.
Definition at line 1227 of file flow_graph.h.
References CODEPTR, tbb::internal::fgt_node_with_body(), and tbb::flow::interface11::internal::successor_cache< T, M >::set_owner().
|
inline |
The destructor.
Definition at line 1239 of file flow_graph.h.
|
inline |
Activates a node that was created in the inactive state.
Definition at line 1345 of file flow_graph.h.
References tbb::flow::interface11::internal::successor_cache< T, M >::empty(), and lock.
|
inlineprivate |
Applies the body. Returning SUCCESSFULLY_ENQUEUED okay; forward_task_bypass will handle it.
Definition at line 1438 of file flow_graph.h.
References tbb::flow::interface11::internal::broadcast_cache< T, M >::try_put_task().
|
inline |
Definition at line 1353 of file flow_graph.h.
|
inlineprivate |
Definition at line 1424 of file flow_graph.h.
|
inlinevirtual |
Add a new successor to this node.
Implements tbb::flow::interface11::internal::untyped_sender.
Definition at line 1248 of file flow_graph.h.
References lock.
|
inlinevirtual |
Removes a successor from this node.
Implements tbb::flow::interface11::internal::untyped_sender.
Definition at line 1257 of file flow_graph.h.
|
inlineprotectedvirtual |
resets the source_node to its initial state
Implements tbb::flow::interface11::graph_node.
Definition at line 1370 of file flow_graph.h.
References tbb::flow::interface11::internal::add_task_to_graph_reset_list(), tbb::flow::interface11::internal::successor_cache< T, M >::clear(), tbb::flow::interface11::internal::input_body< Output >::clone(), tbb::flow::interface11::rf_clear_edges, and tbb::flow::interface11::rf_reset_bodies.
|
inlineprivate |
Spawns a task that applies the body.
Definition at line 1430 of file flow_graph.h.
References tbb::flow::interface11::internal::is_graph_active(), and tbb::flow::interface11::internal::spawn_in_graph_arena().
|
inlinevirtual |
Consumes a reserved item.
Reimplemented from tbb::flow::interface11::internal::untyped_sender.
Definition at line 1333 of file flow_graph.h.
References __TBB_ASSERT, tbb::flow::interface11::internal::successor_cache< T, M >::empty(), and lock.
|
inlinevirtual |
Request an item from the node.
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1289 of file flow_graph.h.
References lock.
|
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::internal::untyped_sender.
Definition at line 1323 of file flow_graph.h.
References __TBB_ASSERT, tbb::flow::interface11::internal::successor_cache< T, M >::empty(), and lock.
|
inlinevirtual |
Reserves an item.
Reimplemented from tbb::flow::interface11::sender< Output >.
Definition at line 1306 of file flow_graph.h.
|
inlineprivate |
Definition at line 1398 of file flow_graph.h.
References lock.
|
friend |
Definition at line 1436 of file flow_graph.h.
|
private |
Definition at line 1389 of file flow_graph.h.
|
private |
Definition at line 1388 of file flow_graph.h.
|
private |
Definition at line 1390 of file flow_graph.h.
|
private |
Definition at line 1395 of file flow_graph.h.
|
private |
Definition at line 1394 of file flow_graph.h.
|
private |
Definition at line 1391 of file flow_graph.h.
|
private |
Definition at line 1387 of file flow_graph.h.
|
private |
Definition at line 1393 of file flow_graph.h.
|
private |
Definition at line 1392 of file flow_graph.h.