tbb::internal::auto_empty_task Class Reference

Smart holder for the empty task class with automatic destruction. More...

`#include <scheduler_utility.h>`

Collaboration diagram for tbb::internal::auto_empty_task:

## Public Member Functions

| auto_empty_task (__TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context *context))
| ~auto_empty_task ()
| operator task & ()
task * | operator& ()
task_prefix & | prefix ()

## Private Attributes

task * | my_task
generic_scheduler * | my_scheduler

## Detailed Description

Smart holder for the empty task class with automatic destruction.

Definition at line 30 of file scheduler_utility.h.

## Constructor & Destructor Documentation

## auto_empty_task()

tbb::internal::auto_empty_task::auto_empty_task | ( | __TBB_CONTEXT_ARG(generic_scheduler *s, task_group_context *context) |  | ) |

inline

Definition at line 34 of file scheduler_utility.h.

: my_task( new(&s->allocate_task(sizeof(empty_task), __TBB_CONTEXT_ARG(NULL, context))) empty_task )
, my_scheduler(s)
{}

## ~auto_empty_task()

tbb::internal::auto_empty_task::~auto_empty_task | ( |  | ) |

inline

Definition at line 39 of file scheduler_utility.h.

{ my_scheduler->free_task<small_local_task>(*my_task); }

References tbb::internal::generic_scheduler::free_task(), my_scheduler, and tbb::internal::small_local_task.

Here is the call graph for this function:

## Member Function Documentation

## operator task &()

tbb::internal::auto_empty_task::operator task & | ( |  | ) |

inline

Definition at line 41 of file scheduler_utility.h.

{ return *my_task; }

References my_task.

## operator&()

task* tbb::internal::auto_empty_task::operator& | ( |  | ) |

inline

Definition at line 42 of file scheduler_utility.h.

{ return my_task; }

References my_task.

## prefix()

task_prefix& tbb::internal::auto_empty_task::prefix | ( |  | ) |

inline

Definition at line 43 of file scheduler_utility.h.

{ return my_task->prefix(); }

References my_task, and tbb::task::prefix().

Referenced by tbb::internal::generic_scheduler::local_spawn_root_and_wait().

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

## Member Data Documentation

## my_scheduler

generic_scheduler* tbb::internal::auto_empty_task::my_scheduler

private

Definition at line 32 of file scheduler_utility.h.

Referenced by ~auto_empty_task().

## my_task

task* tbb::internal::auto_empty_task::my_task

private

Definition at line 31 of file scheduler_utility.h.

Referenced by operator task &(), operator&(), and prefix().

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

- scheduler_utility.h

tbb::task::prefix
internal::task_prefix & prefix(internal::version_tag *=NULL) const
Get reference to corresponding task_prefix.
Definition: task.h:991
tbb::internal::small_local_task
Bitwise-OR of local_task and small_task.
Definition: scheduler_common.h:196
tbb::internal::auto_empty_task::my_scheduler
generic_scheduler * my_scheduler
Definition: scheduler_utility.h:32
s
void const char const char int ITT_FORMAT __itt_group_sync s
Definition: ittnotify_static.h:91
tbb::internal::auto_empty_task::my_task
task * my_task
Definition: scheduler_utility.h:31
tbb::internal::generic_scheduler::free_task
void free_task(task &t)
Put task on free list.
Definition: scheduler.h:730
__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.