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) |
![]() | |
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) |
![]() | |
no_copy () | |
Allow default construction. More... | |
Friends | |
class | graph_node |
template<typename C , typename N > | |
class | graph_iterator |
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) |
tbb::task & | internal::prioritize_task (graph &g, tbb::task &arena_task) |
void | internal::spawn_in_graph_arena (graph &g, tbb::task &arena_task) |
void | internal::enqueue_in_graph_arena (graph &g, tbb::task &arena_task) |
void | internal::add_task_to_graph_reset_list (graph &g, tbb::task *tp) |
The graph class.
This class serves as a handle to the graph
Definition at line 207 of file _flow_graph_impl.h.
typedef graph_iterator<const graph, const graph_node> tbb::flow::interface10::graph::const_iterator |
Definition at line 374 of file _flow_graph_impl.h.
Definition at line 373 of file _flow_graph_impl.h.
|
private |
Definition at line 242 of file _flow_graph_impl.h.
|
inline |
Constructs a graph with isolated task_group_context.
Definition at line 743 of file flow_graph.h.
References cancelled, caught_exception, own_context, and prepare_task_arena().
|
inlineexplicit |
Constructs a graph with use_this_context as context.
Definition at line 755 of file flow_graph.h.
References tbb::task::allocate_root(), tbb::internal::fgt_graph(), my_context, my_is_active, my_root_task, own_context, prepare_task_arena(), and tbb::task::set_ref_count().
|
inline |
Destroys the graph.
Calls wait_for_all, then destroys the root task and context.
Definition at line 765 of file flow_graph.h.
References my_root_task, tbb::task::set_ref_count(), and wait_for_all().
|
inline |
start iterator
Definition at line 833 of file flow_graph.h.
Referenced by reset().
|
inline |
start const iterator
Definition at line 837 of file flow_graph.h.
|
inline |
start const iterator
Definition at line 841 of file flow_graph.h.
|
inline |
end const iterator
Definition at line 843 of file flow_graph.h.
|
inline |
Definition at line 295 of file _flow_graph_impl.h.
References __TBB_override.
|
inline |
end iterator
Definition at line 835 of file flow_graph.h.
Referenced by reset().
|
inline |
end const iterator
Definition at line 839 of file flow_graph.h.
|
inline |
Definition at line 392 of file _flow_graph_impl.h.
References tbb::flow::interface10::rf_reset_protocol.
|
inline |
Definition at line 291 of file _flow_graph_impl.h.
|
inline |
|
inlineprivate |
Definition at line 261 of file _flow_graph_impl.h.
References __TBB_ASSERT, and name.
Referenced by graph(), and reset().
|
inlineprivate |
Definition at line 787 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 780 of file flow_graph.h.
|
inlineprivate |
Definition at line 798 of file flow_graph.h.
References __TBB_ASSERT, lock, my_nodes, my_nodes_last, tbb::flow::interface10::graph_node::next, nodelist_mutex, and tbb::flow::interface10::graph_node::prev.
|
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 773 of file flow_graph.h.
References my_root_task.
|
inline |
Definition at line 810 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, prepare_task_arena(), tbb::task_group_context::reset(), and tbb::flow::interface10::graph_node::reset_node().
|
inline |
Returns the root task of the graph.
Definition at line 364 of file _flow_graph_impl.h.
|
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 313 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 325 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 334 of file _flow_graph_impl.h.
References tbb::task_group_context::concurrent_wait.
Referenced by ~graph().
|
friend |
Definition at line 370 of file _flow_graph_impl.h.
|
friend |
Definition at line 208 of file _flow_graph_impl.h.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
Definition at line 426 of file _flow_graph_impl.h.
|
private |
Definition at line 401 of file _flow_graph_impl.h.
|
private |
Definition at line 402 of file _flow_graph_impl.h.
|
private |
Definition at line 399 of file _flow_graph_impl.h.
|
private |
Definition at line 403 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::activate_graph(), tbb::flow::interface10::internal::deactivate_graph(), graph(), and tbb::flow::interface10::internal::is_graph_active().
|
private |
Definition at line 406 of file _flow_graph_impl.h.
Referenced by remove_node().
|
private |
Definition at line 406 of file _flow_graph_impl.h.
Referenced by remove_node().
|
private |
Definition at line 415 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::prioritize_task().
|
private |
Definition at line 404 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::add_task_to_graph_reset_list(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::reset_port().
|
private |
Definition at line 398 of file _flow_graph_impl.h.
Referenced by graph(), reserve_wait(), ~graph(), and tbb::flow::interface10::internal::key_matching_port< TraitsType >::~key_matching_port().
|
private |
Definition at line 412 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface10::internal::enqueue_in_graph_arena(), and tbb::flow::interface10::internal::spawn_in_graph_arena().
|
private |
Definition at line 408 of file _flow_graph_impl.h.
Referenced by remove_node().
|
private |
Definition at line 400 of file _flow_graph_impl.h.
Referenced by graph().