tbb::internal::allocate_root_proxy Class Reference

`#include <task.h>`

Inheritance diagram for tbb::internal::allocate_root_proxy:
Collaboration diagram for tbb::internal::allocate_root_proxy:

## Static Public Member Functions

static task &__TBB_EXPORTED_FUNC | allocate (size_t size)
static void __TBB_EXPORTED_FUNC | free (task &)

## 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 153 of file task.h.

## Member Function Documentation

## allocate()

task & tbb::internal::allocate_root_proxy::allocate | ( | size_t | size | ) |

static

Definition at line 35 of file task.cpp.

{
internal::generic_scheduler* v = governor::local_scheduler_weak();
__TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" );
#if __TBB_TASK_GROUP_CONTEXT
task_prefix& p = v->my_innermost_running_task->prefix();
ITT_STACK_CREATE(p.context->itt_caller);
#endif
// New root task becomes part of the currently running task's cancellation context
return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) );
}

References __TBB_ASSERT, __TBB_CONTEXT_ARG, tbb::internal::generic_scheduler::allocate_task(), ITT_STACK_CREATE, tbb::internal::governor::local_scheduler_weak(), tbb::internal::scheduler_state::my_innermost_running_task, p, tbb::task::prefix(), and size.

Referenced by operator new().

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

## free()

void tbb::internal::allocate_root_proxy::free | ( | task & | task | ) |

static

Definition at line 47 of file task.cpp.

{
internal::generic_scheduler* v = governor::local_scheduler_weak();
__TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" );
#if __TBB_TASK_GROUP_CONTEXT
// No need to do anything here as long as there is no context -> task connection
#endif /* __TBB_TASK_GROUP_CONTEXT */
v->free_task<local_task>( task );
}

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

Referenced by operator delete().

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

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

- task.h
- task.cpp

__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
size
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
Definition: ittnotify_static.h:109
ITT_STACK_CREATE
#define ITT_STACK_CREATE(obj)
Definition: itt_notify.h:117
tbb::internal::task_prefix
Memory prefix to a task object.
Definition: task.h:192
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::internal::local_task
Task is known to have been allocated by this scheduler.
Definition: scheduler_common.h:190
tbb::internal::governor::local_scheduler_weak
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:134
p
void const char const char int ITT_FORMAT __itt_group_sync p
Definition: ittnotify_static.h:91
__TBB_CONTEXT_ARG
#define __TBB_CONTEXT_ARG(arg1, context)
Definition: scheduler_common.h:60

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.