-
-
Notifications
You must be signed in to change notification settings - Fork 450
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
Adapting transform to C++20 (non-compilable PR) #4855
Conversation
…EPT_REQUIRES format
a628a03
to
4c09b6c
Compare
d7bb53e
to
fc6c343
Compare
fc6c343
to
7d3f37c
Compare
a6c7a1c
to
993acc5
Compare
I have adapted the result types for all three overloads of hpx/libs/algorithms/tests/unit/algorithms/transform_tests.hpp Lines 66 to 67 in 256b42e
and here:
as there is no
After fixing the compilation issues on the tests, I think I should finally proceed on creating the CPO's. |
{ | ||
return get_function_address< | ||
typename hpx::util::decay<F>::type>::call(f.f_); | ||
return std::transform(first, last, dest); |
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.
Calling the standard algorithms will have the correct semantics, but exposes inconsistent exception behavior. For the other algorithms we have settled on relying our own implementations even in those cases where semantically the standard version would be sufficient.
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.
Very nice ;)
traits::projected<Proj, FwdIter1>>::value | ||
)> | ||
//clang-format on | ||
HPX_DEPRECATED("hpx::parallel::transform is deprecated, use hpx::transform instead") |
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.
@hkaiser should we use the HPX_DEPRECATED_V
macro here?
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.
Yes, that's what we use everywhere else now.
@@ -53,7 +53,7 @@ namespace hpx { namespace parallel { namespace util { | |||
{ | |||
template <typename InIter1, typename InIter2, typename OutIter, | |||
typename F> | |||
HPX_HOST_DEVICE HPX_FORCEINLINE static hpx::util::tuple<InIter1, | |||
HPX_HOST_DEVICE HPX_FORCEINLINE static util::in_in_out_result<InIter1, | |||
InIter2, OutIter> | |||
call(InIter1 first1, InIter1 last1, InIter2 first2, OutIter dest, |
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.
You may also want to adapt the begin/end iter template arguments for transform_loop
too
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.
Got it! Thanks!
This PR is closed and archieved. The |
This is an early adaptation for
transform
. It includes:segmented_transform()
functions though)transform_projected
specialization addition withutil::projection_utility
To do
There is a compilation error when:
make tests.unit.modules.segmented_algorithms.partitioned_vector_transform_binary2
andmake tests.unit.modules.segmented_algorithms.partitioned_vector_transform_binary3
which I believe stems from the
projection_identity
addition but I can't figure out why.partitioned_vector_transform_binary2/3
Important
This is an early adaptation which aims to facilitate the final adaptation that will utilize CPOs.