History log of /llvm-project/libcxx/include/algorithm (Results 1 – 25 of 328)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 438e2ccd 14-Jan-2025 PaulXiCao <paulxicao7@gmail.com>

[libc++] Make std::stable_sort constexpr friendly (#110320)

Implementing `constexpr std::stable_sort`. This is part of P2562R1,
tracked via issue #105360.

Closes #119394

Co-authored-by: A. Ji

[libc++] Make std::stable_sort constexpr friendly (#110320)

Implementing `constexpr std::stable_sort`. This is part of P2562R1,
tracked via issue #105360.

Closes #119394

Co-authored-by: A. Jiang <de34@live.cn>
Co-authored-by: Louis Dionne <ldionne.2@gmail.com>

show more ...


Revision tags: llvmorg-19.1.7
# b9a2658a 21-Dec-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)

This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-

[libc++][C++03] Use `__cxx03/` headers in C++03 mode (#109002)

This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside <vector>
#ifdef _LIBCPP_CXX03_LANG
# include <__cxx03/vector>
#else
// normal <vector> content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.

show more ...


Revision tags: llvmorg-19.1.6
# c166a9c7 10-Dec-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++] Add #if 0 block to all the top-level headers (#119234)

Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
sep

[libc++] Add #if 0 block to all the top-level headers (#119234)

Including The frozen C++03 headers results in a lot of formatting
changes in the main headers, so this splits these changes into a
separate commit instead.

This is part of
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.

show more ...


Revision tags: llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2
# 5366bf5b 01-Oct-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Improve the synopsis of <algorithm>


Revision tags: llvmorg-19.1.1
# 8e6bba23 27-Sep-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Rename fold.h to ranges_fold.h (#109696)

This follows the pattern we use consistently for ranges algorithms.

This is a re-application of 24bc3244d4e which had been reverted in
f11abac

[libc++][NFC] Rename fold.h to ranges_fold.h (#109696)

This follows the pattern we use consistently for ranges algorithms.

This is a re-application of 24bc3244d4e which had been reverted in
f11abac65 due to unrelated failures.

show more ...


# f11abac6 29-Sep-2024 Chris B <chris.bieneman@me.com>

Revert "[libc++][modules] Rewrite the modulemap to have fewer top-level modules (#107638)" (#110384)

This reverts 3 commits:
45a09d1811d5d6597385ef02ecf2d4b7320c37c5
24bc3244d4e221f4e6740f45e2bf15

Revert "[libc++][modules] Rewrite the modulemap to have fewer top-level modules (#107638)" (#110384)

This reverts 3 commits:
45a09d1811d5d6597385ef02ecf2d4b7320c37c5
24bc3244d4e221f4e6740f45e2bf15a1441a3076
bc6bd3bc1e99c7ec9e22dff23b4f4373fa02cae3

The GitHub pre-merge CI has been broken since this PR went in. This
change reverts it to see if I can get the pre-merge CI working again.

show more ...


# 24bc3244 27-Sep-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][NFC] Rename fold.h to ranges_fold.h (#109696)

This follows the pattern we use consistently for ranges algorithms.


Revision tags: llvmorg-19.1.0
# 09e3a360 16-Sep-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][modules] Fix missing and incorrect includes (#108850)

This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to

[libc++][modules] Fix missing and incorrect includes (#108850)

This patch adds a large number of missing includes in the libc++ headers
and the test suite. Those were found as part of the effort to move
towards a mostly monolithic top-level std module.

show more ...


Revision tags: llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init
# 04760bfa 19-Jul-2024 nicole mazzuca <nicole@strega-nil.co>

[libc++][ranges] P1223R5: `find_last` (#99312)

Implements [P1223R5][] completely.

Includes an implementation of `find_last`, `find_last_if`, and
`find_last_if_not`.

[P1223R5]: https://wg21.li

[libc++][ranges] P1223R5: `find_last` (#99312)

Implements [P1223R5][] completely.

Includes an implementation of `find_last`, `find_last_if`, and
`find_last_if_not`.

[P1223R5]: https://wg21.link/p1223r5

show more ...


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# e406d5ed 27-May-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++][pstl] Merge all frontend functions for the PSTL (#89219)

This is an intermediate step towards the PSTL dispatching mechanism
rework. It will make it a lot easier to track the upcoming fron

[libc++][pstl] Merge all frontend functions for the PSTL (#89219)

This is an intermediate step towards the PSTL dispatching mechanism
rework. It will make it a lot easier to track the upcoming front-end
changes. After the rework, there are basically no implementation details
in the front-end, so the definition of each algorithm will become much
simpler. Otherwise, it wouldn't make sense to define all the algorithms
in the same header.

show more ...


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# d5c654b5 14-Apr-2024 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][RFC] Only include what is required by-version in the umbrella headers (#83740)

This is a relatively low cost way of reducing the include sizes in older
language modes compared to the effec

[libc++][RFC] Only include what is required by-version in the umbrella headers (#83740)

This is a relatively low cost way of reducing the include sizes in older
language modes compared to the effect. For example, in C++14 mode the
include time of `<algorithm>` is reduced from 198ms to 127ms.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1
# 37dca605 29-Feb-2024 Louis Dionne <ldionne.2@gmail.com>

[libc++] Clean up includes of <__assert> (#80091)

Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
th

[libc++] Clean up includes of <__assert> (#80091)

Originally, we used __libcpp_verbose_abort to handle assertion failures.
That function was declared from all public headers. Since we don't use
that mechanism anymore, we don't need to declare __libcpp_verbose_abort
from all public headers, and we can clean up a lot of unnecessary
includes.

This patch also moves the definition of the various assertion categories
to the <__assert> header, since we now rely on regular IWYU for these
assertion macros.

rdar://105510916

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# a6b846ae 13-Feb-2024 ZijunZhaoCCK <88353225+ZijunZhaoCCK@users.noreply.github.com>

[libc++][ranges] Implement ranges::contains_subrange (#66963)


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init
# 39034388 20-Dec-2023 Christopher Di Bella <cjdb@google.com>

[libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (#75259)

Notable things in this commit:

* refactors `__indirect_binary_left_foldable`, making it slightly
different (but equivalen

[libcxx] adds ranges::fold_left_with_iter and ranges::fold_left (#75259)

Notable things in this commit:

* refactors `__indirect_binary_left_foldable`, making it slightly
different (but equivalent) to _`indirect-binary-left-foldable`_, which
improves readability (a [patch to the Working Paper][patch] was made)
* omits `__cpo` namespace, since it is not required for implementing
niebloids (a cleanup should happen in 2024)
* puts tests ensuring invocable robustness and dangling correctness
inside the correctness testing to ensure that the algorithms' results
are still correct

[patch]: https://github.com/cplusplus/draft/pull/6734

show more ...


# fdd089b5 20-Dec-2023 ZijunZhaoCCK <88353225+ZijunZhaoCCK@users.noreply.github.com>

[libc++] Implement ranges::contains (#65148)

Differential Revision: https://reviews.llvm.org/D159232
```
Running ./ranges_contains.libcxx.out
Run on (10 X 24.121 MHz CPU s)
CPU Caches:
L1 Dat

[libc++] Implement ranges::contains (#65148)

Differential Revision: https://reviews.llvm.org/D159232
```
Running ./ranges_contains.libcxx.out
Run on (10 X 24.121 MHz CPU s)
CPU Caches:
L1 Data 64 KiB (x10)
L1 Instruction 128 KiB (x10)
L2 Unified 4096 KiB (x5)
Load Average: 3.37, 6.77, 5.27
--------------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------------
bm_contains_char/16 1.88 ns 1.87 ns 371607095
bm_contains_char/256 7.48 ns 7.47 ns 93292285
bm_contains_char/4096 99.7 ns 99.6 ns 7013185
bm_contains_char/65536 1296 ns 1294 ns 540436
bm_contains_char/1048576 23887 ns 23860 ns 29302
bm_contains_char/16777216 389420 ns 389095 ns 1796
bm_contains_int/16 7.14 ns 7.14 ns 97776288
bm_contains_int/256 90.4 ns 90.3 ns 7558089
bm_contains_int/4096 1294 ns 1290 ns 543052
bm_contains_int/65536 20482 ns 20443 ns 34334
bm_contains_int/1048576 328817 ns 327965 ns 2147
bm_contains_int/16777216 5246279 ns 5239361 ns 133
bm_contains_bool/16 2.19 ns 2.19 ns 322565780
bm_contains_bool/256 3.42 ns 3.41 ns 205025467
bm_contains_bool/4096 22.1 ns 22.1 ns 31780479
bm_contains_bool/65536 333 ns 332 ns 2106606
bm_contains_bool/1048576 5126 ns 5119 ns 135901
bm_contains_bool/16777216 81656 ns 81574 ns 8569
```

---------

Co-authored-by: Nathan Gauër <brioche@google.com>

show more ...


# ed27a4ed 28-Nov-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::equal (#72448)

Differential Revision: https://reviews.llvm.org/D157131

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>


Revision tags: llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4
# a65070a7 29-Oct-2023 philnik777 <nikolasklauser@berlin.de>

[libc++] Remove a few transitive includes (#70553)


# 5d7f346b 23-Oct-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::rotate_copy

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155025


# d2a46e64 22-Oct-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::move

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D155330


Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1
# 0218ea4a 18-Sep-2023 Zijun Zhao <zijunzhao@google.com>

[libc++] Implement ranges::ends_with

Reviewed By: #libc, var-const

Differential Revision: https://reviews.llvm.org/D150831


Revision tags: llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 37e5baf3 20-Jul-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::sort

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits, mgrang

Differential Revision: https://reviews.llvm.org/D152860


# b5270ba2 29-Jun-2023 varconst <varconsteq@gmail.com>

[libc++] Remove the legacy debug mode.

See https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026

Reviewed By: #libc, Mordante, ldionne

Differential Revision: https://revi

[libc++] Remove the legacy debug mode.

See https://discourse.llvm.org/t/rfc-removing-the-legacy-debug-mode-from-libc/71026

Reviewed By: #libc, Mordante, ldionne

Differential Revision: https://reviews.llvm.org/D153672

show more ...


# 3a7876f6 13-Jun-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::is_partitioned

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D152853


Revision tags: llvmorg-16.0.6
# cd916108 09-Jun-2023 Nikolas Klauser <nikolasklauser@berlin.de>

[libc++][PSTL] Implement std::generate{,_n}

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D152581


# 51131edf 06-Jun-2023 Nikolas Klauser <n_klauser@apple.com>

[libc++][PSTL] Implement std::replace{,_if,_copy,_copy_if}

Reviewed By: #libc, ldionne

Spies: ldionne, libcxx-commits

Differential Revision: https://reviews.llvm.org/D151841


12345678910>>...14