Preview Features#

[preview_features]

A preview feature is a component of oneTBB introduced to gather early feedback from users.

The key properties of a preview feature are:

  • It is off by default and must be explicitly enabled.

  • It aims to provide high implementation quality.

  • There is no guarantee of future existence or compatibility.

  • It may have limited or no support in tools such as correctness analyzers, profilers, and debuggers.

  • ABI compatibility between translation units is guaranteed only when all are built with the same version of the library and the same set of enabled preview features.

Caution

A preview feature is subject to change in the future. It might be removed or significantly altered in future releases. Changes to a preview feature do not require the usual deprecation and removal process. Therefore, using preview features in production code is strongly discouraged.

Unless explicitly stated in a preview feature page, enable a preview feature by defining the corresponding TBB_PREVIEW_-prefixed macro before including any headers. This requirement is strict because oneTBB may be included indirectly through other headers.

Flow Graph#

Feature

Description

Enabling macro

Type-specified message keys for join_node

Enables join_node in key-matching mode to obtain keys directly from message types.

TBB_PREVIEW_FLOW_GRAPH_FEATURES

Helper Functions for Expressing Graphs

Adds make_edges, make_node_set, follows, and precedes helper functions for building graphs.

TBB_PREVIEW_FLOW_GRAPH_FEATURES

Waiting for Single Messages in Flow Graph

Adds try_put_and_wait to submit a message and wait only for its associated work to complete.

TBB_PREVIEW_FLOW_GRAPH_TRY_PUT_AND_WAIT

Resource Limiting in the Flow Graph

Coordinates node access to limited shared resources via resource_limiter and resource_limited_node.

TBB_PREVIEW_FLOW_GRAPH_RESOURCE_LIMITING

Task Scheduler#

Feature

Description

Enabling macro

Task Bypass Support for task_group

Allows a task_group task body to return a task_handle to run next (scheduler bypass).

TBB_PREVIEW_TASK_GROUP_EXTENSIONS

task_completion_handle Class

Adds task_completion_handle to track completion of a submitted task_group task.

TBB_PREVIEW_TASK_GROUP_EXTENSIONS

task_group Dynamic Dependencies

Lets tasks add dependencies dynamically while a task_group runs.

TBB_PREVIEW_TASK_GROUP_EXTENSIONS

Waiting for Individual Tasks in task_group

Adds waiting for an individual task_group task through its handle.

TBB_PREVIEW_TASK_GROUP_EXTENSIONS

parallel_phase Interface for Task Arena

Extends task_arena with an explicit parallel_phase to control worker participation.

TBB_PREVIEW_PARALLEL_PHASE

Core Type Selector for Task Arena Constraints

Adds core-type constraints to task_arena for hybrid-CPU systems.

TBB_PREVIEW_TASK_ARENA_CORE_TYPE_SELECTOR

Containers#

Memory Allocation#

Feature

Description

Enabling macro

Scalable Memory Pools

Provides memory_pool and fixed_pool classes for scalable pooled allocation.

TBB_PREVIEW_MEMORY_POOL

Allocate Memory Interleaved between NUMA Nodes

Allocates memory interleaved across NUMA nodes.

TBB_PREVIEW_NUMA_ALLOCATION