-
Notifications
You must be signed in to change notification settings - Fork 165
Fix #1539 Use parallelism in clad::restore_tracker #1661
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
base: master
Are you sure you want to change the base?
Fix #1539 Use parallelism in clad::restore_tracker #1661
Conversation
| } | ||
|
|
||
| // Parallel restore | ||
| std::for_each(std::execution::par, work.begin(), work.end(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we directly use for_each on m_data instead of copying the elements to a vector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like github ci doesn't support (c++ 17)
|
clang-tidy review says "All clean, LGTM! 👍" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
| // Enable clad after the header was included. | ||
| // FIXME: The header inclusion should be made automatic if the pragma is seen. | ||
| #pragma clad ON | ||
| #pragma clad ON No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unknown pragma ignored [clang-diagnostic-unknown-pragmas]
#pragma clad ON
^
Description
This PR fixes issue #1539.
I have used c++ 17 feature
std::execution::parto make execution of loop parellel. For efficient execution of threads I have used separate array. This was existing function so no tests were written.Any external dependency introduced?
I have used standard c++ includes so no new dependency