• 2021.6
  • 04/11/2022
  • Public Content
Contents

task_group extensions

To enable these extensions, set the
TBB_PREVIEW_TASK_GROUP_EXTENSIONS
macro to 1.

Description

oneAPI Threading Building Blocks (oneTBB) implementation extends the tbb::task_group specification with the following members:
  • requirements for a user-provided function object

API

Header
#include <oneapi/tbb/task_group.h>
Synopsis
namespace oneapi { namespace tbb { class task_group { public: //only the requirements for the return type of function F are changed template<typename F> task_handle defer(F&& f); //only the requirements for the return type of function F are changed template<typename F> task_group_status run_and_wait(const F& f); //only the requirements for the return type of function F are changed template<typename F> void run(F&& f); }; } // namespace tbb } // namespace oneapi
Member Functions
template<typename
F
> task_handle
defer
(F &&
f
)
As an optimization hint,
F
might return a
task_handle
, which task object can be executed next.
The
task_handle
returned by the function must be created using
*this
task_group
. That is, the one for which the run method is called, otherwise it is undefined behavior.
template<typename
F
> task_group_status
run_and_wait
(
const
F &
f
)
As an optimization hint,
F
might return a
task_handle
, which task object can be executed next.
The
task_handle
returned by the function must be created using
*this
task_group
. That is, the one for which the run method is called, otherwise it is undefined behavior.
template<typename
F
> void
run
(F &&
f
)
As an optimization hint,
F
might return a
task_handle
, which task object can be executed next.
The
task_handle
returned by the function must be created with
*this
task_group
. It means, with the one for which run method is called, otherwise it is an undefined behavior.
See also

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.