Logo Search packages:      
Sourcecode: tbb version File versions  Download package

ConcurrentHashSerialFibTask Class Reference

Inheritance diagram for ConcurrentHashSerialFibTask:

tbb::task

List of all members.


Detailed Description

task for serial method using shared concurrent_hash_map

Definition at line 188 of file Fibonacci.cpp.


Public Types

enum  state_type {
  executing, reexecute, ready, allocated,
  freed, recycle
}
 Enumeration of task states that the scheduler considers. More...

Public Member Functions

internal::allocate_additional_child_of_proxy allocate_additional_child_of (task &t)
 Like allocate_child, except that task's parent becomes "t", not this.
internal::allocate_child_proxy & allocate_child ()
 Returns proxy for overloaded new that allocates a child task of *this.
internal::allocate_continuation_proxy & allocate_continuation ()
 Returns proxy for overloaded new that allocates a continuation task of *this.
 ConcurrentHashSerialFibTask (NumbersTable &cht, int n)
 constructor
void destroy (task &victim)
 Destroy a task.
taskexecute ()
 executing task
void recycle_as_child_of (task &new_parent)
 Change this to be a child of new_parent.
void recycle_as_continuation ()
 Change this to be a continuation of its former self.
void recycle_as_safe_continuation ()
 Recommended to use, safe variant of recycle_as_continuation.
void recycle_to_reexecute ()
 Schedule this for reexecution after current execute() returns.

Static Public Member Functions

static
internal::allocate_root_proxy 
allocate_root ()
 Returns proxy for overloaded new that allocates a root task.

Package Functions

void add_to_depth (int delta)
 Change scheduling depth by given amount.
depth_type depth () const
 Scheduling depth.
bool is_owned_by_current_thread () const
 True if this task is owned by the calling thread; false otherwise.
bool is_stolen_task () const
 True if task is owned by different thread than thread that owns its parent.
task * parent () const
 task on whose behalf this task is working, or NULL if this is a root.
int ref_count () const
 The internal reference count.
void set_depth (depth_type new_depth)
 Set scheduling depth to given value.
void set_ref_count (int count)
 Set reference count.
void spawn (task_list &list)
 Spawn multiple tasks and clear list.
void spawn (task &child)
 Schedule task for execution when a worker becomes available.
void spawn_and_wait_for_all (task_list &list)
 Similar to spawn followed by wait_for_all, but more efficient.
void spawn_and_wait_for_all (task &child)
 Similar to spawn followed by wait_for_all, but more efficient.
state_type state () const
 Current execution state.
void wait_for_all ()
 Wait for reference count to become one, and set reference count to zero.

Static Package Functions

static task & self ()
 The task() current being run by this thread.
static void spawn_root_and_wait (task_list &root_list)
 Spawn root tasks on list and wait for all of them to finish.
static void spawn_root_and_wait (task &root)
 Spawn task allocated by allocate_root, wait for it to complete, and deallocate it.

Package Attributes

 __pad0__:intptr depth_type
 A scheduling depth.

Private Attributes

NumbersTableFib
int my_n

Friends

class internal::allocate_additional_child_of_proxy
class internal::allocate_child_proxy
class internal::allocate_continuation_proxy
class internal::allocate_root_proxy
class internal::scheduler

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

Generated by  Doxygen 1.6.0   Back to index