[PATCH] libstdc++: Make PSTL algorithms accept C++20 iterators [PR110512]
Jonathan Wakely
jwakely@redhat.com
Sat Jan 13 11:20:24 GMT 2024
On Sat, 13 Jan 2024 at 09:36, Pilar Latiesa <pilarlatiesa@gmail.com> wrote:
>
> Hi Jonathan
>
> Thanks so much for implementing this.
>
> There are a couple of typos in the patch description: 's/C==17RandomAccessIterator/Cpp17RandomAccessIterator/' and 's/__or_/__and_/'.
Thanks for the comments, I'll fix those.
>
> I've applied your patch localy and it works fine for all my use cases, which admitedly simply consist of using views::zip and views::enumerate with std::for_each. My tbb version is 2020.1.
Thanks for checking it, all feedback is useful.
>
> Unrelated to your patch, with GCC 14, I'm getting a ton of notes for code like:
>
> void f(std::vector<int> &v)
> { std::for_each(std::execution::par, v.begin(), v.end(), [](int &i) { i *= 2; }); }
>
> indicating that some internal functions are not vectorized.
>
> I very much like getting warnings if an algorithm happens to fall back to its serial version, but in this case I didn't even asked for (unseq) vectorization, yet I got bunch of notes: "Vectorized algorithm unimplemented, redirected to serial" and the algorithm itself is indeed parallelized.
>
> The notes are so confusing that I would suggest undefining _PSTL_USAGE_WARNINGS for G++ (in fact, I don't understand the logic that uses this macro in pstl_config.h).
Yeah, I've seen some of those, and I'm afraid I don't have any ideas
about them for now. Could you report it to bugzilla so we don't forget
to look into it? Thanks!
More information about the Libstdc++
mailing list