|
Intel(R) Threading Building Blocks Doxygen Documentation
version 4.2.3
|
The graph class. More...
#include <_flow_graph_impl.h>
Classes | |
| class | run_and_put_task |
| class | run_task |
| class | spawn_functor |
| A functor that spawns a task. More... | |
| class | wait_functor |
Public Types | |
| typedef graph_iterator< graph, graph_node > | iterator |
| typedef graph_iterator< const graph, const graph_node > | const_iterator |
Public Member Functions | |
| graph () | |
| Constructs a graph with isolated task_group_context. More... | |
| graph (tbb::task_group_context &use_this_context) | |
| Constructs a graph with use_this_context as context. More... | |
| ~graph () | |
| Destroys the graph. More... | |
| void | increment_wait_count () |
| void | decrement_wait_count () |
| void | reserve_wait () __TBB_override |
| Used to register that an external entity may still interact with the graph. More... | |
| void | release_wait () __TBB_override |
| Deregisters an external entity that may have interacted with the graph. More... | |
| template<typename Receiver , typename Body > | |
| void | run (Receiver &r, Body body) |
| Spawns a task that runs a body and puts its output to a specific receiver. More... | |
| template<typename Body > | |
| void | run (Body body) |
| Spawns a task that runs a function object. More... | |
| void | wait_for_all () |
| Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls. More... | |
| tbb::task * | root_task () |
| Returns the root task of the graph. More... | |
| iterator | begin () |
| start iterator More... | |
| iterator | end () |
| end iterator More... | |
| const_iterator | begin () const |
| start const iterator More... | |
| const_iterator | end () const |
| end const iterator More... | |
| const_iterator | cbegin () const |
| start const iterator More... | |
| const_iterator | cend () const |
| end const iterator More... | |
| bool | is_cancelled () |
| return status of graph execution More... | |
| bool | exception_thrown () |
| void | reset (reset_flags f=rf_reset_protocol) |
Public Member Functions inherited from tbb::flow::interface10::graph_proxy | |
| virtual | ~graph_proxy () |
Private Types | |
| typedef std::list< tbb::task * > | task_list_type |
Private Member Functions | |
| void | prepare_task_arena (bool reinit=false) |
| void | register_node (graph_node *n) |
| void | remove_node (graph_node *n) |
Private Member Functions inherited from tbb::internal::no_copy | |
| no_copy () | |
| Allow default construction. More... | |
Friends | |
| class | graph_node |
| template<typename C , typename N > | |
| class | graph_iterator |
| template<typename Input , typename Output , typename Policy , typename Allocator > | |
| class | async_node |
| class | tbb::interface7::internal::task_arena_base |
| void | internal::activate_graph (graph &g) |
| void | internal::deactivate_graph (graph &g) |
| bool | internal::is_graph_active (graph &g) |
| void | internal::spawn_in_graph_arena (graph &g, tbb::task &arena_task) |
| void | internal::add_task_to_graph_reset_list (graph &g, tbb::task *tp) |
| template<typename F > | |
| void | internal::execute_in_graph_arena (graph &g, F &f) |
The graph class.
This class serves as a handle to the graph
Definition at line 200 of file _flow_graph_impl.h.
| typedef graph_iterator<const graph, const graph_node> tbb::flow::interface10::graph::const_iterator |
Definition at line 367 of file _flow_graph_impl.h.
Definition at line 366 of file _flow_graph_impl.h.
|
private |
Definition at line 235 of file _flow_graph_impl.h.
|
inline |
Constructs a graph with isolated task_group_context.
Definition at line 745 of file flow_graph.h.
|
inlineexplicit |
Constructs a graph with use_this_context as context.
Definition at line 757 of file flow_graph.h.
|
inline |
Destroys the graph.
Calls wait_for_all, then destroys the root task and context.
Definition at line 767 of file flow_graph.h.
References my_root_task, tbb::task::set_ref_count(), and wait_for_all().
|
inline |
start iterator
Definition at line 835 of file flow_graph.h.
Referenced by reset().
|
inline |
start const iterator
Definition at line 839 of file flow_graph.h.
|
inline |
start const iterator
Definition at line 843 of file flow_graph.h.
|
inline |
end const iterator
Definition at line 845 of file flow_graph.h.
|
inline |
Definition at line 288 of file _flow_graph_impl.h.
References __TBB_override.
|
inline |
end iterator
Definition at line 837 of file flow_graph.h.
Referenced by reset().
|
inline |
end const iterator
Definition at line 841 of file flow_graph.h.
|
inline |
Definition at line 385 of file _flow_graph_impl.h.
References tbb::flow::interface10::rf_reset_protocol.
|
inline |
Definition at line 284 of file _flow_graph_impl.h.
|
inline |
|
inlineprivate |
Definition at line 254 of file _flow_graph_impl.h.
References __TBB_ASSERT, and name.
Referenced by reset(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task().
|
inlineprivate |
Definition at line 789 of file flow_graph.h.
|
inlinevirtual |
Deregisters an external entity that may have interacted with the graph.
The graph will not return from wait_for_all until all the number of decrement_wait_count calls matches the number of increment_wait_count calls.
Implements tbb::flow::interface10::graph_proxy.
Definition at line 782 of file flow_graph.h.
|
inlineprivate |
Definition at line 800 of file flow_graph.h.
|
inlinevirtual |
Used to register that an external entity may still interact with the graph.
The graph will not return from wait_for_all until a matching number of decrement_wait_count calls is made.
Implements tbb::flow::interface10::graph_proxy.
Definition at line 775 of file flow_graph.h.
|
inline |
Definition at line 812 of file flow_graph.h.
References tbb::flow::interface10::internal::activate_graph(), begin(), cancelled, caught_exception, tbb::flow::interface10::internal::deactivate_graph(), end(), my_context, my_reset_task_list, prepare_task_arena(), tbb::task_group_context::reset(), tbb::flow::interface10::graph_node::reset_node(), and tbb::flow::interface10::internal::spawn_in_graph_arena().
|
inline |
Returns the root task of the graph.
Definition at line 357 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::source_node< Output >::create_put_task(), tbb::flow::interface10::limiter_node< T >::forward_task(), tbb::flow::interface10::limiter_node< T >::register_predecessor(), tbb::flow::interface10::limiter_node< T >::register_successor(), tbb::flow::interface10a::overwrite_node< T >::register_successor(), and tbb::flow::interface10::limiter_node< T >::try_put_task().
|
inline |
Spawns a task that runs a body and puts its output to a specific receiver.
The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.
Definition at line 306 of file _flow_graph_impl.h.
References tbb::flow::interface10::graph::run_and_put_task< Receiver, Body >::execute(), tbb::flow::interface10::internal::is_graph_active(), and tbb::interface9::internal::root_task.
|
inline |
Spawns a task that runs a function object.
The task is spawned as a child of the graph. This is useful for running tasks that need to block a wait_for_all() on the graph. For example a one-off source.
Definition at line 318 of file _flow_graph_impl.h.
References tbb::flow::interface10::graph::run_task< Body >::execute(), tbb::flow::interface10::internal::is_graph_active(), and tbb::interface9::internal::root_task.
|
inline |
Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.
The waiting thread will go off and steal work while it is block in the wait_for_all.
Definition at line 327 of file _flow_graph_impl.h.
References tbb::task_group_context::concurrent_wait.
Referenced by ~graph().
|
friend |
Definition at line 419 of file _flow_graph_impl.h.
|
friend |
Definition at line 363 of file _flow_graph_impl.h.
|
friend |
Definition at line 201 of file _flow_graph_impl.h.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 422 of file _flow_graph_impl.h.
|
private |
Definition at line 394 of file _flow_graph_impl.h.
Referenced by reset().
|
private |
Definition at line 395 of file _flow_graph_impl.h.
Referenced by reset().
|
private |
Definition at line 392 of file _flow_graph_impl.h.
Referenced by reset(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task().
|
private |
Definition at line 396 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::activate_graph(), tbb::flow::interface10::internal::deactivate_graph(), tbb::flow::interface10::internal::is_graph_active(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task().
|
private |
Definition at line 399 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::function_output< Output >::register_successor().
|
private |
Definition at line 399 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::function_output< Output >::register_successor().
|
private |
Definition at line 408 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::spawn_in_graph_arena().
|
private |
Definition at line 397 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::add_task_to_graph_reset_list(), and reset().
|
private |
Definition at line 391 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::key_matching_port< TraitsType >::key_matching_port(), tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task(), and ~graph().
|
private |
Definition at line 405 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::execute_in_graph_arena().
|
private |
Definition at line 401 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::function_output< Output >::register_successor(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::set_join_node_pointer().
|
private |
Definition at line 393 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::key_matching_port< TraitsType >::try_put_task().