Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::task_list Class Reference

A list of children. More...

#include <task.h>

Inheritance diagram for tbb::task_list:
Collaboration diagram for tbb::task_list:

Public Member Functions

 task_list ()
 Construct empty list. More...
 
 ~task_list ()
 Destroys the list, but does not destroy the task objects. More...
 
bool empty () const
 True if list if empty; false otherwise. More...
 
void push_back (task &task)
 Push task onto back of list. More...
 
taskpop_front ()
 Pop the front task from the list. More...
 
void clear ()
 Clear the list. More...
 

Private Attributes

taskfirst
 
task ** next_ptr
 

Friends

class task
 
class interface5::internal::task_base
 

Additional Inherited Members

- Private Member Functions inherited from tbb::internal::no_copy
 no_copy ()
 Allow default construction. More...
 

Detailed Description

A list of children.

Used for method task::spawn_children

Definition at line 958 of file task.h.

Constructor & Destructor Documentation

◆ task_list()

tbb::task_list::task_list ( )
inline

Construct empty list.

Definition at line 966 of file task.h.

966 : first(NULL), next_ptr(&first) {}
task * first
Definition: task.h:960
task ** next_ptr
Definition: task.h:961

◆ ~task_list()

tbb::task_list::~task_list ( )
inline

Destroys the list, but does not destroy the task objects.

Definition at line 969 of file task.h.

969 {}

Member Function Documentation

◆ clear()

void tbb::task_list::clear ( )
inline

Clear the list.

Definition at line 1002 of file task.h.

1002  {
1003  first=NULL;
1004  next_ptr=&first;
1005  }
task * first
Definition: task.h:960
task ** next_ptr
Definition: task.h:961

References first, and next_ptr.

Referenced by tbb::interface5::internal::task_base::spawn(), tbb::task::spawn_and_wait_for_all(), and tbb::task::spawn_root_and_wait().

Here is the caller graph for this function:

◆ empty()

bool tbb::task_list::empty ( ) const
inline

True if list if empty; false otherwise.

Definition at line 972 of file task.h.

972 {return !first;}
task * first
Definition: task.h:960

References first.

◆ pop_front()

task& tbb::task_list::pop_front ( )
inline

Pop the front task from the list.

Definition at line 993 of file task.h.

993  {
994  __TBB_ASSERT( !empty(), "attempt to pop item from empty task_list" );
995  task* result = first;
996  first = result->prefix().next;
997  if( !first ) next_ptr = &first;
998  return *result;
999  }
friend class task
Definition: task.h:962
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
task * first
Definition: task.h:960
bool empty() const
True if list if empty; false otherwise.
Definition: task.h:972
task ** next_ptr
Definition: task.h:961
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:920

◆ push_back()

void tbb::task_list::push_back ( task task)
inline

Push task onto back of list.

Definition at line 975 of file task.h.

975  {
976  task.prefix().next = NULL;
977  *next_ptr = &task;
978  next_ptr = &task.prefix().next;
979  }
friend class task
Definition: task.h:962
task ** next_ptr
Definition: task.h:961

References next_ptr, tbb::task::prefix(), and task.

Referenced by tbb::internal::while_group_task< Body >::execute(), tbb::interface9::internal::do_group_task_forward< Iterator, Body, Item >::execute(), tbb::interface9::internal::do_group_task_input< Body, Item >::execute(), and tbb::interface9::internal::do_task_iter< Iterator, Body, Item >::run_for_random_access_iterator().

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

Friends And Related Function Documentation

◆ interface5::internal::task_base

friend class interface5::internal::task_base
friend

Definition at line 963 of file task.h.

◆ task

friend class task
friend

Definition at line 962 of file task.h.

Referenced by push_back().

Member Data Documentation

◆ first

◆ next_ptr


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

Copyright © 2005-2018 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.