Fields

hardware None
os None

Parameters

Fields

NameValue

Parameters

NameValue
git_commit commit 475cbf0ad6e72f33e5ba5890a1c6e84e39a19e83
Author: James E T Smith <jamesETsmith@users.noreply.github.com>
Date: Sat Apr 5 07:46:11 2025 -0400

[libc++] Implement ranges::iota (#68494)

# Overview

As a disclaimer, this is my first PR to LLVM and while I've tried to
ensure I've followed the LLVM and libc++ contributing guidelines,
there's probably a good chance I missed something. If I have, just let
me know and I'll try to correct it as soon as I can.

This PR implements `std::ranges::iota` and
`std::ranges::out_value_result` outlined in
[P2440r1](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2440r1.html).

As outlined in the paper above, I've:
- Implemented `out_value_result` and added to `<algorithm>`
- Added `out_value_result`, `iota_result`, and two overloads of `iota`
to `std::ranges` in `<numeric>`
- Updated the version macro `__cpp_lib_ranges_iota` in `<version>`

I've also added tests for `ranges::iota` and `ranges::out_value_result`.
Lastly, I added those structs to the appropriate module files.

Partially implements #105184

EDIT: Forgot to mention in the original post, thanks to @hawkinsw for
taking a look at a preliminary version of this PR!

# TODOs
- [x] Updating the range [status
doc](https://github.com/jamesETsmith/llvm-project/blob/main/libcxx/docs/Status/RangesMajorFeatures.csv)
- [x] Ensure all comments from https://reviews.llvm.org/D121436 are
addressed here
- [X] EDIT (I'll do this in a separate PR). ~~I'm open to implementing
the rest of P2440r1 (`ranges::shift_left` and `ranges::shift_right`) if
that's ok, I just wanted to get feedback on `ranges::iota` first~~
- [x] I've been having trouble building the modules locally and want to
make sure that's working properly

Closes: #134060
Filter

ldionne-old-macbook-results test results

Run Order Start Time Duration
Current 533117 2025-12-16T16:40:01 0:00:00
Previous 533066 2025-12-16T16:40:01 0:00:00
Baseline 485288 2025-12-16T16:40:01 0:00:00


Tests Summary

Status Group # # (B)
Performance Regressions 2 0
Performance Improvements 2 0
Added Tests 0 18
Unchanged Tests 86 72
Total Tests 90

Performance Regressions - execution_time Δ Previous Current σ Δ (B) σ (B)
707_ntest_r 2.74% 17.819 18.308 - 0.00% -
710_omnetpp_r 1.37% 8.349 8.464 - 0.00% -

Performance Improvements - execution_time Δ Previous Current σ Δ (B) σ (B)
735_gem5_r -2.50% 14.262 13.905 - 0.00% -
729_abc_r -1.83% 19.012 18.664 - 0.00% -

Added Tests - execution_time
706_stockfish_r
707_ntest_r
709_cactus_r
710_omnetpp_r
721_gcc_r
723_llvm_r
727_cppcheck_r
729_abc_r
731_astcenc_r
734_vpr_r
735_gem5_r
736_ocio_r
737_gmsh_r
748_flightdm_r
750_sealcrypto_r
753_ns3_r
766_femflow_r
767_nest_r


Report Time: 0.11s
Name Current %
706_stockfish_r 22.046 -
707_ntest_r 18.308 2.74%
709_cactus_r 19.862 -
710_omnetpp_r 8.464 1.37%
721_gcc_r 12.919 -
723_llvm_r 11.438 -
727_cppcheck_r 24.502 -
729_abc_r 18.664 -1.83%
731_astcenc_r 10.016 -
734_vpr_r 15.298 -
735_gem5_r 13.905 -2.50%
736_ocio_r 16.137 -
737_gmsh_r 13.009 -
748_flightdm_r 8.961 -
750_sealcrypto_r 18.327 -
753_ns3_r 10.696 -
766_femflow_r 12.770 -
767_nest_r 14.163 -
Geometric Mean 14.333 -