Overview
ISO/IEC TS 19570:2018 - "Programming Languages - Technical Specification for C++ Extensions for Parallelism" defines a family of experimental C++ library extensions that enable parallel and data-parallel execution of algorithms across a broad class of architectures. Published as a technical specification, the document collects vendor-friendly interfaces (placed in std::experimental::parallelism_v2) for execution policies, parallel algorithms, task management, exception aggregation, and SIMD-style data-parallel types. The specification is explicitly experimental: some features may later be promoted into the formal C++ standard, changed, or removed.
Key topics and requirements
- Namespaces and headers
- Experimental components live in std::experimental::parallelism_v2 and are provided via headers such as:
- Execution policies
- Defines execution policy types and global objects to enable vectorized and unsequenced execution:
- unsequenced_policy (unseq): allows vectorization and unsequenced element access within a thread.
- vector_policy (vec): allows vectorization while respecting additional sequencing constraints (wavefront semantics for some loops).
- Implementations must expose policy objects (e.g.,
execution::unseq, execution::vec).
- Parallel algorithms and wavefront semantics
- Adds templates and patterns for parallel algorithms and parallel for-loop libraries.
- Introduces precise ordering rules (wavefront application) that constrain how parallel evaluations may be sequenced to preserve correctness for certain patterns.
- Task block and cancellation
- Provides a task block abstraction for defining cancellable groups of tasks and for structured task lifetimes.
- Parallel exceptions
- Supplies an exception_list class that aggregates multiple exceptions (sequence of exception_ptr), suited to parallel contexts where multiple tasks may fail.
- Data-parallel (SIMD) types
- Introduces a template library for data-parallel vector types (simd), ABI tags, masks, and non-member operations to support explicit SIMD programming patterns.
- Feature-test macros
- Implementations should provide feature-test macros signalling support for specific experimental components (e.g., parallel_simd, parallel_for_loop, execution_vector_policy, parallel_task_block).
Applications and users
- Compiler and library implementers - adopt and expose experimental parallel APIs to provide vectorized/parallel execution support.
- HPC and performance-critical developers - accelerate numeric kernels, image processing, machine learning, and simulation code using SIMD and parallel loop templates.
- Middleware and runtime authors - integrate task blocks, cancellation, and aggregated exception handling into parallel runtimes.
- C++ library authors - write parallel-friendly algorithms that can transparently use hardware vector units and multi-threading.
Related standards
- Normative reference: ISO/IEC 14882:2017 (C++ standard). TS 19570 is complementary and placed in the experimental namespace until potential standardization.