-
Notifications
You must be signed in to change notification settings - Fork 407
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
Implement Kokkos::Experimental::{min,max,minmax}(std::initializer_list)
#4629
Conversation
Kokkos::Experimental{min,max,minmax}(std::initializer_list)
Kokkos::Experimental::{min,max,minmax}(std::initializer_list)
@dalg24 one thing: |
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.
Looks good to me.
I overlooked it. I think actually this means that my |
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.
as discussed, i think we need to verify/fix behavior
Surprisingly, a (different) OpenMPTarget test is failing:
|
For reference it looks like implementations of the standard library compute the same thing as I did https://godbolt.org/z/qP5Tv3jds |
@dalg24
so min does not change, but max does. See this: https://godbolt.org/z/9EohjbsGT |
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.
thanks for getting it through :)
Rational: reviewed some code downstream that was doing things like
min(a, min(b, c)
Make sure you see the drib-by fixing of a defect in
operator==
forKokkos::pair<T1, T2>
that was missing theconstexpr
specifier.About the overloads I am adding, I just followed closely the design of
std::{min,max,minmax}
(see https://eel.is/c++draft/alg.min.max)