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 &)
 

Detailed Description

Definition at line 149 of file task.h.

Member Function Documentation

◆ allocate()

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

Definition at line 39 of file task.cpp.

References __TBB_ASSERT, __TBB_CONTEXT_ARG, tbb::internal::task_prefix::context, tbb::task_group_context::itt_caller, ITT_STACK_CREATE, tbb::internal::governor::local_scheduler_weak(), and p.

Referenced by operator new().

39  {
40  internal::generic_scheduler* v = governor::local_scheduler_weak();
41  __TBB_ASSERT( v, "thread did not activate a task_scheduler_init object?" );
42 #if __TBB_TASK_GROUP_CONTEXT
43  task_prefix& p = v->my_innermost_running_task->prefix();
44 
46 #endif
47  // New root task becomes part of the currently running task's cancellation context
48  return v->allocate_task( size, __TBB_CONTEXT_ARG(NULL, p.context) );
49 }
#define __TBB_CONTEXT_ARG(arg1, context)
Memory prefix to a task object.
Definition: task.h:188
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:169
void const char const char int ITT_FORMAT __itt_group_sync p
__itt_caller itt_caller
Used to set and maintain stack stitching point for Intel Performance Tools.
Definition: task.h:395
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
task_group_context * context
Shared context that is used to communicate asynchronous state changes.
Definition: task.h:215
static generic_scheduler * local_scheduler_weak()
Definition: governor.h:131
#define ITT_STACK_CREATE(obj)
Definition: itt_notify.h:125
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 51 of file task.cpp.

References __TBB_ASSERT, tbb::internal::__TBB_load_relaxed(), tbb::internal::__TBB_store_relaxed(), tbb::internal::allocate_root_with_context_proxy::allocate(), tbb::task_group_context::binding_required, tbb::task_group_context::fp_settings, tbb::internal::allocate_root_with_context_proxy::free(), tbb::task_group_context::isolated, ITT_STACK_CREATE, tbb::internal::governor::local_scheduler_weak(), tbb::internal::local_task, s, size, and task.

Referenced by operator delete().

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