Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt execution policy name changes from C++17 #2390

Closed
6 tasks done
hkaiser opened this issue Nov 13, 2016 · 2 comments · Fixed by #2436
Closed
6 tasks done

Adapt execution policy name changes from C++17 #2390

hkaiser opened this issue Nov 13, 2016 · 2 comments · Fixed by #2436

Comments

@hkaiser
Copy link
Member

hkaiser commented Nov 13, 2016

While the Parallelsim TS has been now adopted tobe part of C++17, there have been a couple of name changes which require corresponding changes in HPX:

Other changes (we need to decide whether we will adopt those):

- [ ] any exception thrown from any of the algorithms now calls std::terminate
- [ ] the algorithm adjacent_difference has been removed

@biddisco
Copy link
Contributor

"any exception thrown from any of the algorithms now calls std::terminate"

Why on earth was this decided. I agree that its hard to recover from an error, but calling terminate sounds very drastic.

@hkaiser
Copy link
Member Author

hkaiser commented Nov 14, 2016

Why on earth was this decided. I agree that its hard to recover from an error, but calling terminate sounds very drastic.

I agree completely and I don't think we should follow down that path. The way the wording is done now is that the exception behavior is defined by the execution policy and all standardized policies (std::execution::seq, std::execution::par, and std::execution::par_unseq) will cause for the algorithms to call std::terminate in case of any exceptions. This leaves us free to do whatever seems to be appropriate.

The rationale was that there was not sufficient time for C++17 to come up with a (proper) solution. Any other half-solution would have caused breaking changes down the road. Since par_unseq is not implementable using exceptions (and the spec always mandated calling std::terminate in this case), the majority opinion was to unify the behavior. The alternative would have been to completely rip out the parallel algorithms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Standard Algorithms
  
Merged to master
Development

Successfully merging a pull request may close this issue.

2 participants