Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
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 164 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.

35  {
36  internal::generic_scheduler* v = governor::local_scheduler_weak();
37  __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" );
38 #if __TBB_TASK_GROUP_CONTEXT
39  task_prefix& p = v->my_innermost_running_task->prefix();
40 
41  ITT_STACK_CREATE(p.context->itt_caller);
42 #endif
43  // New root task becomes part of the currently running task's cancellation context
44  return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) );
45 }
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)
void const char const char int ITT_FORMAT __itt_group_sync p
#define ITT_STACK_CREATE(obj)
Definition: itt_notify.h:117
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:134
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
Memory prefix to a task object.
Definition: task.h:203

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.

47  {
48  internal::generic_scheduler* v = governor::local_scheduler_weak();
49  __TBB_ASSERT( v, "thread does not have initialized task_scheduler_init object?" );
50 #if __TBB_TASK_GROUP_CONTEXT
51  // No need to do anything here as long as there is no context -> task connection
52 #endif /* __TBB_TASK_GROUP_CONTEXT */
53  v->free_task<local_task>( task );
54 }
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
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

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:

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.