-
-
Notifications
You must be signed in to change notification settings - Fork 449
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 datapar generate #5594
Adapt datapar generate #5594
Conversation
libs/core/algorithms/include/hpx/parallel/algorithms/detail/generate.hpp
Show resolved
Hide resolved
libs/core/algorithms/include/hpx/parallel/algorithms/detail/generate.hpp
Show resolved
Hide resolved
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.
Otherwise, LGTM, thanks!
Please don't merge the PR. I am still working on it. |
We've had some discussion on how to resolve the problem that the user supplied function (object) has to be generic (i.e. callable for a single value and a vector register) without expecting an argument that could be used to deduce the required return type. We have two possible solutions
The former solution is non-conforming, however, as the generator function might be called more often than expected. The latter solution requires for the user to supply a function (object) that was written in a specific way, for instance:
Also, for the latter, global functions are not usable. While the second solution is still preferable (it is conforming), I'm uncertain if the limitations imposed on the function object are too restrictive or if the solution is acceptable in terms of usability. |
I also think the second option is preferable. One can always wrap a global function in a lambda/struct if needed. |
Oops!, Did not read this sorry!, I think i pushed the changes for first method. I will look into second option and will try to implement it. |
Apply clang-format Fix CPO for sequential generate Replace int with std::size_t in Vector pack for generate tests Include missing headers
Remove sequential tests Replace generate test function with functor
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.
LGTM thanks a lot!
libs/core/algorithms/include/hpx/parallel/algorithms/detail/generate.hpp
Outdated
Show resolved
Hide resolved
@srinivasyadav18 which of the builders are actually running the vectorized tests? |
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.
LGTM, thanks!
gcc-11-debug and gcc-11-release |
Thanks! I'm wondering how the test can actually pass on that platform now. The tests use a non-templated lambda (e.g. https://github.com/STEllAR-GROUP/hpx/pull/5594/files#diff-94177c5266a2c92106d9f6e2640962f9bf6289153a24edee615122d7b10dbc4aR35), but the code is invoking the templated operator() (e.g. https://github.com/STEllAR-GROUP/hpx/pull/5594/files#diff-c8d8a6871e54681264b783160ea771babc0a46e669dafa47c5419841dda7a09bR49). Are you sure the tests are running? |
I updated with the changes to test files in this 12a2853 commit. |
Hmmm. From what I can see those changes are not on the PR, are they? |
The changes are present. You can find the templated functions for datapar tests in then end of commit differences from all commits i.e in tests/unit/datapar_algorithms/. |
Let's get this merged, then. Thanks! |
In principle also CircleCI ( |
Fixes #2333
Proposed Changes