Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::allocate_additional_child_of_proxy Class Reference

#include <task.h>

Inheritance diagram for tbb::internal::allocate_additional_child_of_proxy:
Collaboration diagram for tbb::internal::allocate_additional_child_of_proxy:

Public Member Functions

 allocate_additional_child_of_proxy (task &parent_)
 
task &__TBB_EXPORTED_METHOD allocate (size_t size) const
 
void __TBB_EXPORTED_METHOD free (task &) const
 

Private Attributes

taskself
 No longer used, but retained for binary layout compatibility. Always NULL. More...
 
taskparent
 

Additional Inherited Members

- Private Member Functions inherited from tbb::internal::no_assign
void operator= (const no_assign &)=delete
 
 no_assign (const no_assign &)=default
 
 no_assign ()=default
 

Detailed Description

Definition at line 57 of file task.h.

Constructor & Destructor Documentation

◆ allocate_additional_child_of_proxy()

tbb::internal::allocate_additional_child_of_proxy::allocate_additional_child_of_proxy ( task parent_)
inlineexplicit

Definition at line 62 of file task.h.

62  : self(NULL), parent(parent_) {
64  }
void suppress_unused_warning(const T1 &)
Utility template function to prevent "unused" warnings by various compilers.
Definition: tbb_stddef.h:398

References tbb::internal::suppress_unused_warning().

Here is the call graph for this function:

Member Function Documentation

◆ allocate()

task & tbb::internal::allocate_additional_child_of_proxy::allocate ( size_t  size) const

Definition at line 128 of file task.cpp.

128  {
131  return s->allocate_task( size, __TBB_CONTEXT_ARG(&parent, parent.prefix().context) );
132 }
Work stealing task scheduler.
Definition: scheduler.h:137
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:1002
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:230
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 size
#define __TBB_CONTEXT_ARG(arg1, context)
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:134
void const char const char int ITT_FORMAT __itt_group_sync s
void increment_ref_count()
Atomically increment reference count.
Definition: task.h:771

References __TBB_CONTEXT_ARG, tbb::internal::task_prefix::context, tbb::task::increment_ref_count(), tbb::internal::governor::local_scheduler_weak(), parent, tbb::task::prefix(), s, and size.

Here is the call graph for this function:

◆ free()

void tbb::internal::allocate_additional_child_of_proxy::free ( task task) const

Definition at line 134 of file task.cpp.

134  {
135  // Undo the increment. We do not check the result of the fetch-and-decrement.
136  // We could consider be spawning the task if the fetch-and-decrement returns 1.
137  // But we do not know that was the programmer's intention.
138  // Furthermore, if it was the programmer's intention, the program has a fundamental
139  // race condition (that we warn about in Reference manual), because the
140  // reference count might have become zero before the corresponding call to
141  // allocate_additional_child_of_proxy::allocate.
144 }
void free_task(task &t)
Put task on free list.
Definition: scheduler.h:730
Task is known to have been allocated by this scheduler.
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
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:134
internal::reference_count __TBB_EXPORTED_METHOD internal_decrement_ref_count()
Decrement reference count and return its new value.
Definition: task.cpp:192

References tbb::internal::generic_scheduler::free_task(), tbb::task::internal_decrement_ref_count(), tbb::internal::governor::local_scheduler_weak(), tbb::internal::local_task, parent, and task.

Here is the call graph for this function:

Member Data Documentation

◆ parent

task& tbb::internal::allocate_additional_child_of_proxy::parent
private

Definition at line 60 of file task.h.

Referenced by allocate(), and free().

◆ self

task* tbb::internal::allocate_additional_child_of_proxy::self
private

No longer used, but retained for binary layout compatibility. Always NULL.

Definition at line 59 of file task.h.


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

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.