Intel® oneAPI Threading Building Blocks Developer Guide and API Reference
ID
772616
Date
10/15/2026
Public
Package Contents
Parallelizing Simple Loops
Parallelizing Complex Loops
Parallelizing Data Flow and Dependence Graphs
Work Isolation
Exceptions and Cancellation
Containers
Mutual Exclusion
Timing
Memory Allocation
The Task Scheduler
Design Patterns
Migrating from Threading Building Blocks (TBB)
Constrained APIs
Appendix A Costs of Time Slicing
Appendix B Mixing With Other Threading Packages
References
Range
Splittable
ParallelForBody
ParallelForFunc
ParallelForIndex
ParallelReduceBody
ParallelReduceFunc
ParallelReduceReduction
ParallelForEachBody
ContainerBasedSequence
ParallelScanBody
ParallelScanCombine
ParallelScanFunc
BlockedRangeValue
FilterBody
Mutex
ReaderWriterMutex
HashCompare
ContainerRange
SuspendFunc
AsyncNodeBody
ContinueNodeBody
GatewayType
FunctionNodeBody
JoinNodeFunctionObject
InputNodeBody
MultifunctionNodeBody
Sequencer
ResourceLimitedNodeBody (preview)
collaborative_call_once
parallel_for
parallel_reduce
parallel_deterministic_reduce
parallel_scan
parallel_for_each
parallel_invoke
Example
parallel_pipeline
parallel_sort
blocked_range
blocked_range2d
blocked_range3d
blocked_nd_range
auto_partitioner
affinity_partitioner
static_partitioner
simple_partitioner
proportional split
split
graph
graph_node
sender
receiver
Forwarding and Buffering
continue_node
function_node
input_node
multifunction_node
async_node
Function Nodes Policies
Nodes Priorities
Predefined Concurrency Limits
copy_body
overwrite_node
write_once_node
buffer_node
queue_node
priority_queue_node
sequencer_node
limiter_node
broadcast_node
join_node
Type-specified message keys for join_node (preview)
split_node
indexer_node
composite_node
input_port
output_port
make_edge
remove_edge
continue_msg
tagged_msg
Resource Limiting in the Flow Graph (preview)
Helper Functions for Expressing Graphs (preview)
Waiting for Single Messages in Flow Graph (preview)
Dependency Flow Graph Example
Message Flow Graph Example
Worker Thread Retention
task_group_context
global_control
Resumable tasks
task_scheduler_handle
task_group
task_group_status
task_handle
task_completion_handle Class (preview)
Task Bypass Support for task_group (preview)
task_group Dynamic Dependencies (preview)
Waiting for Individual Tasks in task_group (preview)
task_arena
this_task_arena
parallel_phase
task_scheduler_observer
Core Type Selector for Task Arena Constraints (preview)
attach tag type
concurrent_vector
concurrent_queue
concurrent_bounded_queue
concurrent_priority_queue
concurrent_hash_map
Customizing the Mutex Type for concurrent_hash_map (preview)
concurrent_unordered_map
concurrent_unordered_multimap
concurrent_unordered_set
concurrent_unordered_multiset
concurrent_map
concurrent_multimap
concurrent_set
concurrent_multiset
concurrent_lru_cache (preview)
tbb_hash_compare
Node handles
tbb_allocator
scalable_allocator
cache_aligned_allocator
cache_aligned_resource
scalable_memory_resource
C Interface to Scalable Allocator
Allocate Memory Interleaved between NUMA Nodes (preview)
Scalable Memory Pools (preview)
Automatically Replacing malloc and Other C/C++ Functions for Dynamic Memory Allocation
parallel_invoke
[algorithms.parallel_invoke]
Function template that evaluates several functions in parallel.
// Defined in header <oneapi/tbb/parallel_invoke.h>
namespace oneapi {
namespace tbb {
template<typename... Functions>
void parallel_invoke(Functions&&... fs);
} // namespace tbb
} // namespace oneapi
Requirements:
All members of Functions parameter pack must meet Function Objects requirements described in the [function.objects] section of the ISO C++ standard.
Last member of Functions parameter pack may be a task_group_context& type.
Evaluates each member passed to parallel_invoke possibly in parallel. Return values are ignored.
The algorithm can accept a task_group_context object so that the algorithm’s tasks are executed in this context. By default, the algorithm is executed in a bound context of its own.
Example
The following example evaluates f(), g(), h(), and bar(1) in parallel.
#include "oneapi/tbb/parallel_invoke.h"
extern void f();
extern void bar(int);
class MyFunctor {
int arg;
public:
MyFunctor(int a) : arg(a) {}
void operator()() const { bar(arg); }
};
void RunFunctionsInParallel() {
MyFunctor g(2);
MyFunctor h(3);
oneapi::tbb::parallel_invoke(f, g, h, []{bar(1);});
}