| 
    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 tbb::flow::interface11::graph_iterator< graph, tbb::flow::interface11::graph_node > | iterator | 
| typedef tbb::flow::interface11::graph_iterator< const graph, const tbb::flow::interface11::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... | |
| __TBB_DEPRECATED void | increment_wait_count () | 
| __TBB_DEPRECATED 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 > | |
| __TBB_DEPRECATED 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 > | |
| __TBB_DEPRECATED 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_DEPRECATED 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 (tbb::flow::interface11::reset_flags f=tbb::flow::interface11::rf_reset_protocol) | 
  Public Member Functions inherited from tbb::flow::interface11::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 (tbb::flow::interface11::graph_node *n) | 
| void | remove_node (tbb::flow::interface11::graph_node *n) | 
  Private Member Functions inherited from tbb::internal::no_copy | |
| no_copy (const no_copy &)=delete | |
| no_copy ()=default | |
Friends | |
| class | tbb::flow::interface11::graph_node | 
| template<typename C , typename N > | |
| class | tbb::flow::interface11::graph_iterator | 
| class | tbb::interface7::internal::task_arena_base | 
| void | tbb::flow::interface11::internal::activate_graph (graph &g) | 
| void | tbb::flow::interface11::internal::deactivate_graph (graph &g) | 
| bool | tbb::flow::interface11::internal::is_graph_active (graph &g) | 
| tbb::task & | tbb::flow::interface11::internal::prioritize_task (graph &g, tbb::task &arena_task) | 
| void | tbb::flow::interface11::internal::spawn_in_graph_arena (graph &g, tbb::task &arena_task) | 
| void | tbb::flow::interface11::internal::enqueue_in_graph_arena (graph &g, tbb::task &arena_task) | 
| void | tbb::flow::interface11::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 211 of file _flow_graph_impl.h.
| typedef tbb::flow::interface11::graph_iterator<const graph, const tbb::flow::interface11::graph_node> tbb::flow::interface10::graph::const_iterator | 
Definition at line 384 of file _flow_graph_impl.h.
| typedef tbb::flow::interface11::graph_iterator<graph, tbb::flow::interface11::graph_node> tbb::flow::interface10::graph::iterator | 
Definition at line 383 of file _flow_graph_impl.h.
      
  | 
  private | 
Definition at line 246 of file _flow_graph_impl.h.
      
  | 
  inline | 
Constructs a graph with isolated task_group_context.
Definition at line 774 of file flow_graph.h.
References own_context, and prepare_task_arena().
      
  | 
  inlineexplicit | 
Constructs a graph with use_this_context as context.
Definition at line 786 of file flow_graph.h.
      
  | 
  inline | 
Destroys the graph.
Calls wait_for_all, then destroys the root task and context.
Definition at line 798 of file flow_graph.h.
      
  | 
  inline | 
start iterator
Definition at line 866 of file flow_graph.h.
      
  | 
  inline | 
start const iterator
Definition at line 870 of file flow_graph.h.
      
  | 
  inline | 
start const iterator
Definition at line 874 of file flow_graph.h.
      
  | 
  inline | 
end const iterator
Definition at line 876 of file flow_graph.h.
      
  | 
  inline | 
Definition at line 299 of file _flow_graph_impl.h.
References release_wait().
      
  | 
  inline | 
end iterator
Definition at line 868 of file flow_graph.h.
      
  | 
  inline | 
end const iterator
Definition at line 872 of file flow_graph.h.
      
  | 
  inline | 
Definition at line 402 of file _flow_graph_impl.h.
References caught_exception.
      
  | 
  inline | 
Definition at line 295 of file _flow_graph_impl.h.
References reserve_wait().
      
  | 
  inline | 
return status of graph execution
Definition at line 401 of file _flow_graph_impl.h.
References cancelled.
      
  | 
  inlineprivate | 
Definition at line 265 of file _flow_graph_impl.h.
References __TBB_ASSERT, tbb::interface7::task_arena::initialize(), tbb::interface7::task_arena::is_active(), my_task_arena, and tbb::interface7::task_arena::terminate().
Referenced by graph().
      
  | 
  inlineprivate | 
Definition at line 820 of file flow_graph.h.
References lock, tbb::flow::interface11::graph_node::next, and tbb::flow::interface11::graph_node::prev.
Referenced by tbb::flow::interface11::graph_node::graph_node().
      
  | 
  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::interface11::graph_proxy.
Definition at line 813 of file flow_graph.h.
Referenced by decrement_wait_count().
      
  | 
  inlineprivate | 
Definition at line 831 of file flow_graph.h.
References __TBB_ASSERT, and lock.
Referenced by tbb::flow::interface11::graph_node::~graph_node().
      
  | 
  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::interface11::graph_proxy.
Definition at line 806 of file flow_graph.h.
Referenced by increment_wait_count().
      
  | 
  inline | 
Definition at line 843 of file flow_graph.h.
References tbb::flow::interface11::internal::deactivate_graph().
      
  | 
  inline | 
Returns the root task of the graph.
Definition at line 374 of file _flow_graph_impl.h.
References my_root_task.
Referenced by tbb::flow::interface11::input_node< Output >::create_put_task(), tbb::flow::interface11::limiter_node< T, DecrementType >::forward_task(), tbb::flow::interface11::buffer_node< T, Allocator >::handle_operations_impl(), tbb::flow::interface11::limiter_node< T, DecrementType >::register_predecessor(), tbb::flow::interface11::limiter_node< T, DecrementType >::register_successor(), run(), and tbb::flow::interface11::limiter_node< T, DecrementType >::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 317 of file _flow_graph_impl.h.
References tbb::interface7::task_arena::execute(), tbb::flow::interface11::internal::is_graph_active(), my_task_arena, and 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 329 of file _flow_graph_impl.h.
References tbb::interface7::task_arena::execute(), tbb::flow::interface11::internal::is_graph_active(), my_task_arena, and 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 338 of file _flow_graph_impl.h.
References cancelled, caught_exception, tbb::task_group_context::concurrent_wait, tbb::interface7::task_arena::execute(), tbb::task_group_context::is_group_execution_cancelled(), my_context, my_root_task, my_task_arena, tbb::task_group_context::reset(), tbb::task::set_ref_count(), and tbb::task_group_context::traits().
      
  | 
  friend | 
Definition at line 380 of file _flow_graph_impl.h.
      
  | 
  friend | 
Definition at line 212 of file _flow_graph_impl.h.
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
      
  | 
  friend | 
Definition at line 438 of file _flow_graph_impl.h.
      
  | 
  private | 
Definition at line 413 of file _flow_graph_impl.h.
Referenced by is_cancelled(), and wait_for_all().
      
  | 
  private | 
Definition at line 414 of file _flow_graph_impl.h.
Referenced by exception_thrown(), and wait_for_all().
      
  | 
  private | 
Definition at line 410 of file _flow_graph_impl.h.
Referenced by wait_for_all().
      
  | 
  private | 
Definition at line 415 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface11::internal::activate_graph(), tbb::flow::interface11::internal::deactivate_graph(), and tbb::flow::interface11::internal::is_graph_active().
      
  | 
  private | 
Definition at line 418 of file _flow_graph_impl.h.
      
  | 
  private | 
Definition at line 418 of file _flow_graph_impl.h.
      
  | 
  private | 
Definition at line 427 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface11::internal::prioritize_task().
      
  | 
  private | 
Definition at line 416 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface11::internal::add_task_to_graph_reset_list().
      
  | 
  private | 
Definition at line 408 of file _flow_graph_impl.h.
Referenced by root_task(), and wait_for_all().
      
  | 
  private | 
Definition at line 424 of file _flow_graph_impl.h.
Referenced by tbb::flow::interface11::internal::enqueue_in_graph_arena(), prepare_task_arena(), run(), tbb::flow::interface11::internal::spawn_in_graph_arena(), and wait_for_all().
      
  | 
  private | 
Definition at line 420 of file _flow_graph_impl.h.
      
  | 
  private | 
Definition at line 412 of file _flow_graph_impl.h.
Referenced by graph().