mirror-llvm-project/libcxx/include/__pstl
Michael G. Kazakov b4d2b2f9a3
[libc++][pstl] Implementation of parallel std::lexicographical_compare() based on std::mismatch() (#212366)
This PR adds an implementation of parallel
`std::lexicographical_compare()` based on parallel `std::mismatch()`.

The implementation is close to a one-liner:
```c++
auto __res = _Mismatch()(__policy, __first1, __last1, __first2, __last2, [&](_Ref1 __lhs, _Ref2 __rhs) {
  return !__comp(__lhs, __rhs) && !__comp(__rhs, __lhs);
});
```

Included tests check that:
- Semantics of the iterator-only version is correct.
- Semantics of the predicated version is correct.
- The functions correctly SFINAE out when the first argument is not an
execution policy.
- The `noexcept` policy is followed.
- The `nodiscard` policy is followed.
- `static_assert` verifies iterators' categories.

Part of #99938.
2026-07-31 09:06:38 +08:00
..
backends [libc++][pstl] Implementation of parallel std::lexicographical_compare() based on std::mismatch() (#212366) 2026-07-31 09:06:38 +08:00
cpu_algos [libc++][pstl] Implementation of a parallel std::mismatch() based on __pstl::__parallel_find() (#209291) 2026-07-26 22:51:39 +08:00
backend.h
backend_fwd.h [libc++][pstl] Implementation of parallel std::lexicographical_compare() based on std::mismatch() (#212366) 2026-07-31 09:06:38 +08:00
dispatch.h
handle_exception.h