[PATCH 1/5] WIP: libstdc++: Rebase PSTL on oneDPL release 2022.12.0

Jonathan Wakely jwakely@redhat.com
Sat Nov 14 11:50:54 GMT 2026


On Sat, 14 Nov 2026 at 01:57 +0000, Jonathan Wakely wrote:
>This adds support for an OpenMP backend, which means that it's possible
>to use libgomp to provide parallelism instead of depending on Intel TBB.
>
>Currently the 26_numerics/pstl/numeric_ops/move_only.cc test FAILs, but
>I'm not sure if that's a bug in the test or something that needs to be
>fixed in the new pstl code. Possibly both. I added the test based on
>incorrect requirements, but upstream hasn't made any changes to fix
>https://github.com/uxlfoundation/oneDPL/issues/1955 so I think the code
>and the test need to be updated along the lines of the P0571R2 proposal.
>
>There is already a 2022.14.0 release, so this will need to be updated
>again, but it should be a smaller diff next time.
>
>libstdc++-v3/ChangeLog:
>
>	* TODO
>---
>
>Sending this now so it's in time for the end of stage 1, but some
>additional work is still needed.


Oops, I should have compressed this patch as it's huuuuuge and too big
for the gcc-patches list.

I now have an incremental patch to update from 2022.12.0 to 2022.14.0,
which I'll send on Monday. That patch is another 6000 lines and nearly
300kB  :-\


> libstdc++-v3/include/Makefile.am              |    64 +-
> libstdc++-v3/include/Makefile.in              |    64 +-
> libstdc++-v3/include/pstl/algorithm_fwd.h     |   684 +-
> libstdc++-v3/include/pstl/algorithm_impl.h    |  3619 +--
> .../include/pstl/algorithm_ranges_impl.h      |  1429 ++
> libstdc++-v3/include/pstl/execution_defs.h    |   125 +-
> libstdc++-v3/include/pstl/execution_impl.h    |   209 +-
> libstdc++-v3/include/pstl/functional_impl.h   |    61 +
> .../include/pstl/glue_algorithm_defs.h        |   374 +-
> .../include/pstl/glue_algorithm_impl.h        |   967 +-
> .../include/pstl/glue_algorithm_ranges_defs.h |   358 +
> .../include/pstl/glue_algorithm_ranges_impl.h |  2091 ++
> .../include/pstl/glue_execution_defs.h        |    53 +-
> libstdc++-v3/include/pstl/glue_memory_defs.h  |    51 +-
> libstdc++-v3/include/pstl/glue_memory_impl.h  |   441 +-
> .../include/pstl/glue_memory_ranges_impl.h    |   205 +
> libstdc++-v3/include/pstl/glue_numeric_defs.h |   102 +-
> libstdc++-v3/include/pstl/glue_numeric_impl.h |   231 +-
> .../include/pstl/glue_numeric_ranges_defs.h   |   116 +
> .../include/pstl/glue_numeric_ranges_impl.h   |   203 +
> .../include/pstl/histogram_binhash_utils.h    |   123 +
> .../include/pstl/histogram_extension_defs.h   |    40 +
> libstdc++-v3/include/pstl/histogram_impl.h    |   153 +
> libstdc++-v3/include/pstl/iterator_defs.h     |   111 +
> libstdc++-v3/include/pstl/iterator_impl.h     |  1050 +
> libstdc++-v3/include/pstl/memory_fwd.h        |    53 +
> libstdc++-v3/include/pstl/memory_impl.h       |   193 +-
> .../include/pstl/memory_ranges_impl.h         |   278 +
> libstdc++-v3/include/pstl/numeric_fwd.h       |    79 +-
> libstdc++-v3/include/pstl/numeric_impl.h      |   358 +-
> libstdc++-v3/include/pstl/omp/parallel_for.h  |    74 +
> .../include/pstl/omp/parallel_for_each.h      |    65 +
> .../include/pstl/omp/parallel_invoke.h        |    55 +
> .../include/pstl/omp/parallel_merge.h         |   102 +
> .../include/pstl/omp/parallel_reduce.h        |    80 +
> libstdc++-v3/include/pstl/omp/parallel_scan.h |   143 +
> .../pstl/omp/parallel_stable_partial_sort.h   |    37 +
> .../include/pstl/omp/parallel_stable_sort.h   |   167 +
> .../pstl/omp/parallel_transform_reduce.h      |   118 +
> .../pstl/omp/parallel_transform_scan.h        |    37 +
> libstdc++-v3/include/pstl/omp/util.h          |   196 +
> libstdc++-v3/include/pstl/onedpl_config.h     |   392 +
> libstdc++-v3/include/pstl/parallel_backend.h  |    62 +-
> .../include/pstl/parallel_backend_omp.h       |    65 +
> .../include/pstl/parallel_backend_serial.h    |   118 +-
> .../include/pstl/parallel_backend_tasq.h      |   171 +
> .../include/pstl/parallel_backend_tbb.h       |   439 +-
> .../include/pstl/parallel_backend_utils.h     |   297 +-
> libstdc++-v3/include/pstl/parallel_impl.h     |    67 +-
> libstdc++-v3/include/pstl/pstl_config.h       |   103 +-
> .../include/pstl/ranges/nanorange.hpp         | 19384 ++++++++++++++++
> .../include/pstl/ranges/nanorange_ext.h       |   274 +
> libstdc++-v3/include/pstl/ranges_defs.h       |    96 +
> libstdc++-v3/include/pstl/tuple_impl.h        |   854 +
> .../include/pstl/unseq_backend_simd.h         |   485 +-
> libstdc++-v3/include/pstl/utils.h             |  1155 +-
> libstdc++-v3/include/pstl/utils_ranges.h      |   838 +
> libstdc++-v3/include/pstl/zip_view_impl.h     |   583 +
> libstdc++-v3/include/std/algorithm            |    70 +
> libstdc++-v3/include/std/execution            |     2 +-
> libstdc++-v3/include/std/memory               |    16 +
> libstdc++-v3/include/std/numeric              |    10 +
> .../testsuite/25_algorithms/pstl/110512.cc    |     3 +-
> .../pstl/alg_modifying_operations/replace.cc  |     2 +-
> libstdc++-v3/testsuite/util/pstl/test_utils.h |     7 +-
> 65 files changed, 36669 insertions(+), 3783 deletions(-)
> create mode 100644 libstdc++-v3/include/pstl/algorithm_ranges_impl.h
> create mode 100644 libstdc++-v3/include/pstl/functional_impl.h
> create mode 100644 libstdc++-v3/include/pstl/glue_algorithm_ranges_defs.h
> create mode 100644 libstdc++-v3/include/pstl/glue_algorithm_ranges_impl.h
> create mode 100644 libstdc++-v3/include/pstl/glue_memory_ranges_impl.h
> create mode 100644 libstdc++-v3/include/pstl/glue_numeric_ranges_defs.h
> create mode 100644 libstdc++-v3/include/pstl/glue_numeric_ranges_impl.h
> create mode 100644 libstdc++-v3/include/pstl/histogram_binhash_utils.h
> create mode 100644 libstdc++-v3/include/pstl/histogram_extension_defs.h
> create mode 100644 libstdc++-v3/include/pstl/histogram_impl.h
> create mode 100644 libstdc++-v3/include/pstl/iterator_defs.h
> create mode 100644 libstdc++-v3/include/pstl/iterator_impl.h
> create mode 100644 libstdc++-v3/include/pstl/memory_fwd.h
> create mode 100644 libstdc++-v3/include/pstl/memory_ranges_impl.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_for.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_for_each.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_invoke.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_merge.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_reduce.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_scan.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_stable_partial_sort.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_stable_sort.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_transform_reduce.h
> create mode 100644 libstdc++-v3/include/pstl/omp/parallel_transform_scan.h
> create mode 100644 libstdc++-v3/include/pstl/omp/util.h
> create mode 100644 libstdc++-v3/include/pstl/onedpl_config.h
> create mode 100644 libstdc++-v3/include/pstl/parallel_backend_omp.h
> create mode 100644 libstdc++-v3/include/pstl/parallel_backend_tasq.h
> create mode 100644 libstdc++-v3/include/pstl/ranges/nanorange.hpp
> create mode 100644 libstdc++-v3/include/pstl/ranges/nanorange_ext.h
> create mode 100644 libstdc++-v3/include/pstl/ranges_defs.h
> create mode 100644 libstdc++-v3/include/pstl/tuple_impl.h
> create mode 100644 libstdc++-v3/include/pstl/utils_ranges.h
> create mode 100644 libstdc++-v3/include/pstl/zip_view_impl.h



More information about the Libstdc++ mailing list