tbb::flow::interface10::graph Class Reference

The graph class. More...

`#include <_flow_graph_impl.h>`

Inheritance diagram for tbb::flow::interface10::graph:
Collaboration diagram for tbb::flow::interface10::graph:

## 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...
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 (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

## Private Attributes

tbb::task * | my_root_task
tbb::task_group_context * | my_context
bool | own_context
bool | cancelled
bool | caught_exception
bool | my_is_active
task_list_type | my_reset_task_list
tbb::flow::interface11::graph_node * | my_nodes
tbb::flow::interface11::graph_node * | my_nodes_last
tbb::spin_mutex | nodelist_mutex
tbb::task_arena * | my_task_arena
tbb::flow::interface11::internal::graph_task_priority_queue_t | my_priority_queue

## 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)

## Detailed Description

The graph class.

This class serves as a handle to the graph

Definition at line 211 of file _flow_graph_impl.h.

## Member Typedef Documentation

## const_iterator

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.

## iterator

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.

## task_list_type

typedef std::list<tbb::task *> tbb::flow::interface10::graph::task_list_type

private

Definition at line 246 of file _flow_graph_impl.h.

## Constructor & Destructor Documentation

## graph() [1/2]

tbb::flow::interface10::graph::graph | ( |  | ) |

inline

Constructs a graph with isolated task_group_context.

Definition at line 766 of file flow_graph.h.

: my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
prepare_task_arena();
own_context = true;
cancelled = false;
caught_exception = false;
my_context = new task_group_context(tbb::internal::FLOW_TASKS);
my_root_task = (new (task::allocate_root(*my_context)) empty_task);
my_root_task->set_ref_count(1);
tbb::internal::fgt_graph(this);
my_is_active = true;
}

References tbb::task::allocate_root(), cancelled, caught_exception, tbb::internal::fgt_graph(), my_context, my_is_active, my_root_task, own_context, prepare_task_arena(), and tbb::task::set_ref_count().

Here is the call graph for this function:

## graph() [2/2]

tbb::flow::interface10::graph::graph | ( | tbb::task_group_context & | use_this_context | ) |

inline explicit

Constructs a graph with use_this_context as context.

Definition at line 778 of file flow_graph.h.

:
my_context(&use_this_context), my_nodes(NULL), my_nodes_last(NULL), my_task_arena(NULL) {
prepare_task_arena();
own_context = false;
cancelled = false;
caught_exception = false;
my_root_task = (new (task::allocate_root(*my_context)) empty_task);
my_root_task->set_ref_count(1);
tbb::internal::fgt_graph(this);
my_is_active = true;
}

References tbb::task::allocate_root(), cancelled, caught_exception, tbb::internal::fgt_graph(), my_context, my_is_active, my_root_task, own_context, prepare_task_arena(), and tbb::task::set_ref_count().

Here is the call graph for this function:

## ~graph()

tbb::flow::interface10::graph::~graph | ( |  | ) |

inline

Destroys the graph.

Calls wait_for_all, then destroys the root task and context.

Definition at line 790 of file flow_graph.h.

{
wait_for_all();
my_root_task->set_ref_count(0);
tbb::task::destroy(*my_root_task);
if (own_context) delete my_context;
delete my_task_arena;
}

References my_context, my_root_task, my_task_arena, own_context, tbb::task::set_ref_count(), and wait_for_all().

Here is the call graph for this function:

## Member Function Documentation

## begin() [1/2]

graph::iterator tbb::flow::interface10::graph::begin | ( |  | ) |

inline

start iterator

Definition at line 858 of file flow_graph.h.

{ return iterator(this, true); }

Referenced by reset().

Here is the caller graph for this function:

## begin() [2/2]

graph::const_iterator tbb::flow::interface10::graph::begin | ( |  | ) | const

inline

start const iterator

Definition at line 862 of file flow_graph.h.

{ return const_iterator(this, true); }

## cbegin()

graph::const_iterator tbb::flow::interface10::graph::cbegin | ( |  | ) | const

inline

start const iterator

Definition at line 866 of file flow_graph.h.

{ return const_iterator(this, true); }

## cend()

graph::const_iterator tbb::flow::interface10::graph::cend | ( |  | ) | const

inline

end const iterator

Definition at line 868 of file flow_graph.h.

{ return const_iterator(this, false); }

## decrement_wait_count()

void tbb::flow::interface10::graph::decrement_wait_count | ( |  | ) |

inline

Definition at line 299 of file _flow_graph_impl.h.

{
release_wait();
}

References release_wait().

Here is the call graph for this function:

## end() [1/2]

graph::iterator tbb::flow::interface10::graph::end | ( |  | ) |

inline

end iterator

Definition at line 860 of file flow_graph.h.

{ return iterator(this, false); }

Referenced by reset().

Here is the caller graph for this function:

## end() [2/2]

graph::const_iterator tbb::flow::interface10::graph::end | ( |  | ) | const

inline

end const iterator

Definition at line 864 of file flow_graph.h.

{ return const_iterator(this, false); }

## exception_thrown()

bool tbb::flow::interface10::graph::exception_thrown | ( |  | ) |

inline

Definition at line 402 of file _flow_graph_impl.h.

{ return caught_exception; }

References caught_exception.

## increment_wait_count()

void tbb::flow::interface10::graph::increment_wait_count | ( |  | ) |

inline

Definition at line 295 of file _flow_graph_impl.h.

{
reserve_wait();
}

References reserve_wait().

Here is the call graph for this function:

## is_cancelled()

bool tbb::flow::interface10::graph::is_cancelled | ( |  | ) |

inline

return status of graph execution

Definition at line 401 of file _flow_graph_impl.h.

{ return cancelled; }

References cancelled.

## prepare_task_arena()

void tbb::flow::interface10::graph::prepare_task_arena | ( | bool | reinit = `false` | ) |

inline private

Definition at line 265 of file _flow_graph_impl.h.

{
if (reinit) {
__TBB_ASSERT(my_task_arena, "task arena is NULL");
my_task_arena->terminate();
my_task_arena->initialize(tbb::task_arena::attach());
}
else {
__TBB_ASSERT(my_task_arena == NULL, "task arena is not NULL");
my_task_arena = new tbb::task_arena(tbb::task_arena::attach());
}
if (!my_task_arena->is_active()) // failed to attach
my_task_arena->initialize(); // create a new, default-initialized arena
__TBB_ASSERT(my_task_arena->is_active(), "task arena is not active");
}

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(), and reset().

Here is the call graph for this function:
Here is the caller graph for this function:

## register_node()

void tbb::flow::interface10::graph::register_node | ( | tbb::flow::interface11::graph_node * | n | ) |

inline private

Definition at line 812 of file flow_graph.h.

{
n->next = NULL;
{
spin_mutex::scoped_lock lock(nodelist_mutex);
n->prev = my_nodes_last;
if (my_nodes_last) my_nodes_last->next = n;
my_nodes_last = n;
if (!my_nodes) my_nodes = n;
}
}

References lock, my_nodes, my_nodes_last, tbb::flow::interface11::graph_node::next, nodelist_mutex, and tbb::flow::interface11::graph_node::prev.

Referenced by tbb::flow::interface11::graph_node::graph_node().

Here is the caller graph for this function:

## release_wait()

void tbb::flow::interface10::graph::release_wait | ( |  | ) |

inline virtual

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 805 of file flow_graph.h.

{
if (my_root_task) {
tbb::internal::fgt_release_wait(this);
my_root_task->decrement_ref_count();
}
}

References tbb::task::decrement_ref_count(), tbb::internal::fgt_release_wait(), and my_root_task.

Referenced by decrement_wait_count().

Here is the call graph for this function:
Here is the caller graph for this function:

## remove_node()

void tbb::flow::interface10::graph::remove_node | ( | tbb::flow::interface11::graph_node * | n | ) |

inline private

Definition at line 823 of file flow_graph.h.

{
{
spin_mutex::scoped_lock lock(nodelist_mutex);
__TBB_ASSERT(my_nodes && my_nodes_last, "graph::remove_node: Error: no registered nodes");
if (n->prev) n->prev->next = n->next;
if (n->next) n->next->prev = n->prev;
if (my_nodes_last == n) my_nodes_last = n->prev;
if (my_nodes == n) my_nodes = n->next;
}
n->prev = n->next = NULL;
}

References __TBB_ASSERT, lock, my_nodes, my_nodes_last, tbb::flow::interface11::graph_node::next, nodelist_mutex, and tbb::flow::interface11::graph_node::prev.

Referenced by tbb::flow::interface11::graph_node::~graph_node().

Here is the caller graph for this function:

## reserve_wait()

void tbb::flow::interface10::graph::reserve_wait | ( |  | ) |

inline virtual

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 798 of file flow_graph.h.

{
if (my_root_task) {
my_root_task->increment_ref_count();
tbb::internal::fgt_reserve_wait(this);
}
}

References tbb::internal::fgt_reserve_wait(), tbb::task::increment_ref_count(), and my_root_task.

Referenced by increment_wait_count().

Here is the call graph for this function:
Here is the caller graph for this function:

## reset()

void tbb::flow::interface10::graph::reset | ( | tbb::flow::interface11::reset_flags | f = `tbb::flow::interface11::rf_reset_protocol` | ) |

inline

Definition at line 835 of file flow_graph.h.

{
// reset context
tbb::flow::interface11::internal::deactivate_graph(*this);
if(my_context) my_context->reset();
cancelled = false;
caught_exception = false;
// reset all the nodes comprising the graph
for(iterator ii = begin(); ii != end(); ++ii) {
tbb::flow::interface11::graph_node *my_p = &(*ii);
my_p->reset_node(f);
}
// Reattach the arena. Might be useful to run the graph in a particular task_arena
// while not limiting graph lifetime to a single task_arena::execute() call.
prepare_task_arena( /*reinit=*/true );
tbb::flow::interface11::internal::activate_graph(*this);
// now spawn the tasks necessary to start the graph
for(task_list_type::iterator rti = my_reset_task_list.begin(); rti != my_reset_task_list.end(); ++rti) {
tbb::flow::interface11::internal::spawn_in_graph_arena(*this, *(*rti));
}
my_reset_task_list.clear();
}

References tbb::flow::interface11::internal::activate_graph(), begin(), cancelled, caught_exception, tbb::flow::interface11::internal::deactivate_graph(), end(), my_context, my_reset_task_list, prepare_task_arena(), tbb::task_group_context::reset(), tbb::flow::interface11::graph_node::reset_node(), and tbb::flow::interface11::internal::spawn_in_graph_arena().

Here is the call graph for this function:

## root_task()

tbb::task* tbb::flow::interface10::graph::root_task | ( |  | ) |

inline

Returns the root task of the graph.

Definition at line 374 of file _flow_graph_impl.h.

{
return my_root_task;
}

References my_root_task.

Referenced by tbb::flow::interface11::source_node< Output >::create_put_task(), tbb::flow::interface11::limiter_node< T, DecrementType >::forward_task(), tbb::flow::interface11::buffer_node< T, A >::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().

Here is the caller graph for this function:

## run() [1/2]

template<typename Body >

void tbb::flow::interface10::graph::run | ( | Body | body | ) |

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.

{
if (tbb::flow::interface11::internal::is_graph_active(*this)) {
task* rtask = new (task::allocate_additional_child_of(*root_task())) run_task< Body >(body);
my_task_arena->execute(spawn_functor(*rtask));
}
}

References tbb::interface7::task_arena::execute(), tbb::flow::interface11::internal::is_graph_active(), my_task_arena, and root_task().

Here is the call graph for this function:

## run() [2/2]

template<typename Receiver , typename Body >

void tbb::flow::interface10::graph::run | ( | Receiver & | r,
|  | Body | body
| ) |  |

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.

{
if (tbb::flow::interface11::internal::is_graph_active(*this)) {
task* rtask = new (task::allocate_additional_child_of(*root_task()))
run_and_put_task< Receiver, Body >(r, body);
my_task_arena->execute(spawn_functor(*rtask));
}
}

References tbb::interface7::task_arena::execute(), tbb::flow::interface11::internal::is_graph_active(), my_task_arena, and root_task().

Here is the call graph for this function:

## wait_for_all()

void tbb::flow::interface10::graph::wait_for_all | ( |  | ) |

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.

{
cancelled = false;
caught_exception = false;
if (my_root_task) {
#if TBB_USE_EXCEPTIONS
try {
#endif
my_task_arena->execute(wait_functor(my_root_task));
#if __TBB_TASK_GROUP_CONTEXT
cancelled = my_context->is_group_execution_cancelled();
#endif
#if TBB_USE_EXCEPTIONS
}
catch (...) {
my_root_task->set_ref_count(1);
my_context->reset();
caught_exception = true;
cancelled = true;
throw;
}
#endif
#if __TBB_TASK_GROUP_CONTEXT
// TODO: the "if" condition below is just a work-around to support the concurrent wait
// mode. The cancellation and exception mechanisms are still broken in this mode.
// Consider using task group not to re-implement the same functionality.
if (!(my_context->traits() & tbb::task_group_context::concurrent_wait)) {
my_context->reset(); // consistent with behavior in catch()
#endif
my_root_task->set_ref_count(1);
#if __TBB_TASK_GROUP_CONTEXT
}
#endif
}
}

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().

Referenced by ~graph().

Here is the call graph for this function:
Here is the caller graph for this function:

## Friends And Related Function Documentation

## tbb::flow::interface11::graph_iterator

template<typename C , typename N >

friend class tbb::flow::interface11::graph_iterator

friend

Definition at line 380 of file _flow_graph_impl.h.

## tbb::flow::interface11::graph_node

friend class tbb::flow::interface11::graph_node

friend

Definition at line 212 of file _flow_graph_impl.h.

## tbb::flow::interface11::internal::activate_graph

void tbb::flow::interface11::internal::activate_graph | ( | graph & | g | ) |

friend

## tbb::flow::interface11::internal::add_task_to_graph_reset_list

void tbb::flow::interface11::internal::add_task_to_graph_reset_list | ( | graph & | g,
|  | tbb::task * | tp
| ) |  |

friend

## tbb::flow::interface11::internal::deactivate_graph

void tbb::flow::interface11::internal::deactivate_graph | ( | graph & | g | ) |

friend

## tbb::flow::interface11::internal::enqueue_in_graph_arena

void tbb::flow::interface11::internal::enqueue_in_graph_arena | ( | graph & | g,
|  | tbb::task & | arena_task
| ) |  |

friend

## tbb::flow::interface11::internal::is_graph_active

bool tbb::flow::interface11::internal::is_graph_active | ( | graph & | g | ) |

friend

## tbb::flow::interface11::internal::prioritize_task

tbb::task& tbb::flow::interface11::internal::prioritize_task | ( | graph & | g,
|  | tbb::task & | arena_task
| ) |  |

friend

## tbb::flow::interface11::internal::spawn_in_graph_arena

void tbb::flow::interface11::internal::spawn_in_graph_arena | ( | graph & | g,
|  | tbb::task & | arena_task
| ) |  |

friend

## tbb::interface7::internal::task_arena_base

friend class tbb::interface7::internal::task_arena_base

friend

Definition at line 438 of file _flow_graph_impl.h.

## Member Data Documentation

## cancelled

bool tbb::flow::interface10::graph::cancelled

private

Definition at line 413 of file _flow_graph_impl.h.

Referenced by graph(), is_cancelled(), reset(), and wait_for_all().

## caught_exception

bool tbb::flow::interface10::graph::caught_exception

private

Definition at line 414 of file _flow_graph_impl.h.

Referenced by exception_thrown(), graph(), reset(), and wait_for_all().

## my_context

tbb::task_group_context* tbb::flow::interface10::graph::my_context

private

Definition at line 410 of file _flow_graph_impl.h.

Referenced by graph(), reset(), wait_for_all(), and ~graph().

## my_is_active

bool tbb::flow::interface10::graph::my_is_active

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(), graph(), and tbb::flow::interface11::internal::is_graph_active().

## my_nodes

tbb::flow::interface11::graph_node* tbb::flow::interface10::graph::my_nodes

private

Definition at line 418 of file _flow_graph_impl.h.

Referenced by register_node(), and remove_node().

## my_nodes_last

tbb::flow::interface11::graph_node * tbb::flow::interface10::graph::my_nodes_last

private

Definition at line 418 of file _flow_graph_impl.h.

Referenced by register_node(), and remove_node().

## my_priority_queue

tbb::flow::interface11::internal::graph_task_priority_queue_t tbb::flow::interface10::graph::my_priority_queue

private

Definition at line 427 of file _flow_graph_impl.h.

Referenced by tbb::flow::interface11::internal::prioritize_task().

## my_reset_task_list

task_list_type tbb::flow::interface10::graph::my_reset_task_list

private

Definition at line 416 of file _flow_graph_impl.h.

Referenced by tbb::flow::interface11::internal::add_task_to_graph_reset_list(), and reset().

## my_root_task

tbb::task* tbb::flow::interface10::graph::my_root_task

private

Definition at line 408 of file _flow_graph_impl.h.

Referenced by graph(), release_wait(), reserve_wait(), root_task(), wait_for_all(), and ~graph().

## my_task_arena

tbb::task_arena* tbb::flow::interface10::graph::my_task_arena

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(), wait_for_all(), and ~graph().

## nodelist_mutex

tbb::spin_mutex tbb::flow::interface10::graph::nodelist_mutex

private

Definition at line 420 of file _flow_graph_impl.h.

Referenced by register_node(), and remove_node().

## own_context

bool tbb::flow::interface10::graph::own_context

private

Definition at line 412 of file _flow_graph_impl.h.

Referenced by graph(), and ~graph().

The documentation for this class was generated from the following files:

- _flow_graph_impl.h
- flow_graph.h

tbb::flow::interface10::graph::begin
iterator begin()
start iterator
Definition: flow_graph.h:858
tbb::task::set_ref_count
void set_ref_count(int count)
Set reference count.
Definition: task.h:750
tbb::interface7::task_arena::is_active
bool is_active() const
Definition: task_arena.h:374
tbb::flow::interface11::internal::is_graph_active
bool is_graph_active(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:494
tbb::flow::interface11::internal::spawn_in_graph_arena
void spawn_in_graph_arena(tbb::flow::interface10::graph &g, tbb::task &arena_task)
Spawns a task inside graph arena.
Definition: _flow_graph_impl.h:521
tbb::flow::interface10::graph::iterator
tbb::flow::interface11::graph_iterator< graph, tbb::flow::interface11::graph_node > iterator
Definition: _flow_graph_impl.h:383
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
tbb::flow::interface10::graph::my_context
tbb::task_group_context * my_context
Definition: _flow_graph_impl.h:410
tbb::interface7::task_arena::initialize
void initialize()
Forces allocation of the resources for the task_arena as specified in constructor arguments.
Definition: task_arena.h:315
tbb::flow::interface10::graph::my_task_arena
tbb::task_arena * my_task_arena
Definition: _flow_graph_impl.h:424
tbb::interface7::task_arena::terminate
void terminate()
Definition: task_arena.h:359
tbb::task_group_context::concurrent_wait
Definition: task.h:376
tbb::flow::interface11::graph_node::next
graph_node * next
Definition: _flow_graph_impl.h:465
tbb::flow::interface10::graph::wait_for_all
void wait_for_all()
Wait until graph is idle and decrement_wait_count calls equals increment_wait_count calls.
Definition: _flow_graph_impl.h:338
tbb::flow::interface11::graph_node::reset_node
virtual void reset_node(reset_flags f=rf_reset_protocol)=0
tbb::flow::interface10::graph::my_nodes_last
tbb::flow::interface11::graph_node * my_nodes_last
Definition: _flow_graph_impl.h:418
tbb::flow::interface10::graph::prepare_task_arena
void prepare_task_arena(bool reinit=false)
Definition: _flow_graph_impl.h:265
tbb::task::decrement_ref_count
int decrement_ref_count()
Atomically decrement reference count and returns its new value.
Definition: task.h:777
tbb::interface7::task_arena::execute
internal::return_type_or_void< F >::type execute(F &f)
Definition: task_arena.h:423
tbb::flow::interface10::graph::nodelist_mutex
tbb::spin_mutex nodelist_mutex
Definition: _flow_graph_impl.h:420
tbb::flow::interface10::graph::end
iterator end()
end iterator
Definition: flow_graph.h:860
tbb::interface7::task_arena::attach
Tag class used to indicate the "attaching" constructor.
Definition: task_arena.h:304
tbb::flow::interface11::graph_node::prev
graph_node * prev
Definition: _flow_graph_impl.h:465
tbb::spin_mutex::scoped_lock
friend class scoped_lock
Definition: spin_mutex.h:179
tbb::flow::interface10::graph::cancelled
bool cancelled
Definition: _flow_graph_impl.h:413
tbb::task::increment_ref_count
void increment_ref_count()
Atomically increment reference count.
Definition: task.h:760
tbb::flow::interface11::graph_node
The base of all graph nodes.
Definition: _flow_graph_impl.h:454
tbb::flow::interface10::graph::my_nodes
tbb::flow::interface11::graph_node * my_nodes
Definition: _flow_graph_impl.h:418
tbb::task_group_context::reset
void __TBB_EXPORTED_METHOD reset()
Forcefully reinitializes the context after the task tree it was associated with is completed.
tbb::internal::fgt_reserve_wait
static void fgt_reserve_wait(void *)
Definition: _flow_graph_trace_impl.h:343
lock
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void * lock
Definition: ittnotify_static.h:121
tbb::internal::fgt_release_wait
static void fgt_release_wait(void *)
Definition: _flow_graph_trace_impl.h:344
tbb::task_group_context::is_group_execution_cancelled
bool __TBB_EXPORTED_METHOD is_group_execution_cancelled() const
Returns true if the context received cancellation request.
tbb::flow::interface10::graph::my_reset_task_list
task_list_type my_reset_task_list
Definition: _flow_graph_impl.h:416
task
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task * task
Definition: ittnotify_static.h:119
tbb::flow::interface10::graph::const_iterator
tbb::flow::interface11::graph_iterator< const graph, const tbb::flow::interface11::graph_node > const_iterator
Definition: _flow_graph_impl.h:384
tbb::task::allocate_root
static internal::allocate_root_proxy allocate_root()
Returns proxy for overloaded new that allocates a root task.
Definition: task.h:652
tbb::flow::interface10::graph::reserve_wait
void reserve_wait() __TBB_override
Used to register that an external entity may still interact with the graph.
Definition: flow_graph.h:798
tbb::flow::interface11::internal::deactivate_graph
void deactivate_graph(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:490
tbb::flow::interface11::internal::activate_graph
void activate_graph(tbb::flow::interface10::graph &g)
Definition: _flow_graph_impl.h:486
tbb::flow::interface10::graph::my_is_active
bool my_is_active
Definition: _flow_graph_impl.h:415
tbb::internal::fgt_graph
static void fgt_graph(void *)
Definition: _flow_graph_trace_impl.h:303
tbb::flow::interface10::graph::my_root_task
tbb::task * my_root_task
Definition: _flow_graph_impl.h:408
tbb::interface7::task_arena
Definition: task_arena.h:228
tbb::task_group_context::traits
uintptr_t traits() const
Returns the context's trait.
Definition: task.h:567
tbb::flow::interface10::graph::root_task
tbb::task * root_task()
Returns the root task of the graph.
Definition: _flow_graph_impl.h:374
tbb::flow::interface10::graph::release_wait
void release_wait() __TBB_override
Deregisters an external entity that may have interacted with the graph.
Definition: flow_graph.h:805
tbb::flow::interface10::graph::own_context
bool own_context
Definition: _flow_graph_impl.h:412
tbb::flow::interface10::graph::caught_exception
bool caught_exception
Definition: _flow_graph_impl.h:414

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.