Intel Threading Building Blocks 2.1 for Open Source

Public Member Functions | Friends

tbb::task_list Class Reference
[Task Scheduling]

A list of children. More...

#include <task.h>

Inheritance diagram for tbb::task_list:
Inheritance graph
[legend]

List of all members.

Public Member Functions

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

Friends

class interface5::internal::task_base
class task

Detailed Description

Used for method task::spawn_children

Definition at line 745 of file task.h.


Constructor & Destructor Documentation

tbb::task_list::task_list (  )  [inline]

Definition at line 753 of file task.h.

: first(NULL), next_ptr(&first) {}

tbb::task_list::~task_list (  )  [inline]

Definition at line 756 of file task.h.

{}


Member Function Documentation

void tbb::task_list::clear (  )  [inline]

Definition at line 778 of file task.h.

Referenced by tbb::task::spawn_root_and_wait().

                 {
        first=NULL;
        next_ptr=&first;
    }

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

Definition at line 759 of file task.h.

Referenced by pop_front().

{return !first;}

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

Definition at line 769 of file task.h.

References empty().

                      {
        __TBB_ASSERT( !empty(), "attempt to pop item from empty task_list" );
        task* result = first;
        first = result->prefix().next;
        if( !first ) next_ptr = &first;
        return *result;
    }

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

Definition at line 762 of file task.h.

Referenced by ConcurrentHashSerialFib(), SimpleSumTask::execute(), and ParallelQueueFib().

                                 {
        task.prefix().next = NULL;
        *next_ptr = &task;
        next_ptr = &task.prefix().next;
    }


Friends And Related Function Documentation

friend class interface5::internal::task_base [friend]

Definition at line 750 of file task.h.

friend class task [friend]

Definition at line 749 of file task.h.


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

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

Licensed under the GNU General Public License 2 with the runtime exception.

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.