Bug 85998 - feature request: support C++17 parallel STL
Summary: feature request: support C++17 parallel STL
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 9.0
: P3 enhancement
Target Milestone: 9.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-30 15:22 UTC by Jeff Hammond
Modified: 2019-05-23 15:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2018-05-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Hammond 2018-05-30 15:22:41 UTC
I'd like to see GCC evolve https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html into a proper implementation of the C++17 parallel STL (http://en.cppreference.com/w/cpp/algorithm).

Because there is already an OpenMP parallel back-end, I assume this is mostly a matter of creating the boilerplate to map __gnu_parallel::foo(args) to std::foo(std::execution::par,args).
Comment 2 Jonathan Wakely 2018-05-30 15:44:17 UTC
(In reply to Jeff Hammond from comment #0)
> I'd like to see GCC evolve
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/parallel_mode.html into a
> proper implementation of the C++17 parallel STL
> (http://en.cppreference.com/w/cpp/algorithm).

No, this is absolutely not going to happen. Importing Intel's PSTL is already in progress, and a much better solution than trying to rewrite the existing Parallel Mode (which only implements the C++98 algorithms).

I don't see any point keeping this open as a bug report. It's a missing piece of C++17 support so is already on our roadmap, we don't need a feature request. "INVALID" isn't really the right resolution, but it'll have to do.
Comment 3 Jeff Hammond 2018-05-30 18:49:40 UTC
Other projects use the existence of feature requests in their bug tracker for prioritization of development.  How does GCC manage this information?  How do you track GCC roadmap development if not through this system?  Where can I follow progress towards C++17 parallel STL?

I am well aware of the Intel PSTL work.
Comment 4 Jonathan Wakely 2018-05-30 19:18:22 UTC
(In reply to Jeff Hammond from comment #3)
> Other projects use the existence of feature requests in their bug tracker
> for prioritization of development.  How does GCC manage this information? 

Finishing C++17 support in libstdc++ is already one of our top priorities for GCC 9. There's no need to ask for it, and doing so won't affect priorities. The missing pieces are documented:
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017

> How do you track GCC roadmap development if not through this system?

However different developers want to. People work on what they (or their employers or sponsors) want to work on.  Personally I don't see any point in having open bugs to track that features are missing when they're already documented as missing. We know they're missing.

If it makes you feel better this can be reopened, and then ignored until the missing features are done, then closed as FIXED. I don't see any advantage to that though.

> Where
> can I follow progress towards C++17 parallel STL?

On the libstdc++ mailing list, and (especially during the initial stages of the integration) in the PSTL upstream.
 
> I am well aware of the Intel PSTL work.

So then you might have seen the pull requests being created to prepare it for inclusion in libstdc++ and libc++.
Comment 5 Jeff Hammond 2018-05-30 19:42:18 UTC
> Finishing C++17 support in libstdc++ is already one of our top priorities for
> GCC 9. There's no need to ask for it, and doing so won't affect priorities.
> The missing pieces are documented:
> https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017

That page says nothing about priority of parallel STL or the GCC 9 roadmap.  For "The Parallelism TS Should be Standardized" it says Status=No.

Given the lack of support for C11 threads in glibc (https://sourceware.org/bugzilla/show_bug.cgi?id=14092), I do not think it is unreasonable to be pessimistic about support for parallel features in the GNU toolchain.

> However different developers want to. People work on what they (or their
> employers or sponsors) want to work on.  Personally I don't see any point in
> having open bugs to track that features are missing when they're already
> documented as missing. We know they're missing.

*You* know they are missing.  Do you expect every GCC user to subscribe to every GCC mailing list to track development?  Have you ever thought about what it is like to be a user of GCC, as opposed to a developer?

> If it makes you feel better this can be reopened, and then ignored until the
> missing features are done, then closed as FIXED. I don't see any advantage to
> that though.

Please do this.  That way, GCC users who assume the bug tracker is used to track development can find it.

> On the libstdc++ mailing list, and (especially during the initial stages of
> the integration) in the PSTL upstream.

I'm sure I'm wasting my time in suggesting that email is not a good project management system.

> So then you might have seen the pull requests being created to prepare it for
> inclusion in libstdc++ and libc++.

I assume you mean https://github.com/intel/parallelstl/pull/9.  I wasn't watching the GitHub project but am now.

I would have expected to see a pull request against GCC rather than PSTL, but clearly, GCC has a unique approach to project management.
Comment 6 Jonathan Wakely 2018-05-30 20:21:46 UTC
(In reply to Jeff Hammond from comment #5)
> > Finishing C++17 support in libstdc++ is already one of our top priorities for
> > GCC 9. There's no need to ask for it, and doing so won't affect priorities.
> > The missing pieces are documented:
> > https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2017
> 
> That page says nothing about priority of parallel STL or the GCC 9 roadmap. 

There are no priorities to document (and it's the manual, it documents the current status, so of course there are no priorities there anyway). Work gets done when it gets done.

We are working to complete C++17 support for GCC 9. It will be complete when it's complete.

> For "The Parallelism TS Should be Standardized" it says Status=No.

Because that's the status.
Comment 7 Jakub Jelinek 2019-05-03 09:16:33 UTC
GCC 9.1 has been released.
Comment 8 Jonathan Wakely 2019-05-23 15:38:18 UTC
(In reply to Jakub Jelinek from comment #7)
> GCC 9.1 has been released.

With Intel's PSTL included.