Provide std::common_type specializations for half precision#9251
Provide std::common_type specializations for half precision#9251aprokop wants to merge 1 commit into
Conversation
|
Not sure how robust this is. Also, this currently does not address the complex. |
|
Can you fix the DCO and rebase? |
Signed-off-by: Andrey Prokopenko <prokopenkoav@ornl.gov>
Done. |
masterleinad
left a comment
There was a problem hiding this comment.
I would just use whatever type you get with float if the other type isn't half_t, bhalf_t or float. If that returns float, return the original type.
I'm still not sure if common_type<Kokkos::Experimental::half_t, Kokkos::Experimental::bhalf_t> should be defined.
I think they should, if I read https://en.cppreference.com/cpp/types/common_type it just talks about convertability. |
masterleinad
left a comment
There was a problem hiding this comment.
If you also check for int and long double, I'm fine with this.
Provide
std::common_typespecializations for half precision types.Related issues / PRs
Fix #9249
Changelog Entry
Unsure