-
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
SIMD: Math functions should be in namespace Kokkos #6465
Conversation
a29de08
to
ad8e771
Compare
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.
Conceptually, I agree with this change, but it's unfortunate that files now have to be interleaving with Experimental
namespaces multiple times.
Not a suggestion, but it makes me partly wonder if it may be better to aggregate all functions that are no longer in Experimental
and place them altogether toward bottom to simplify namespace structure.
simd/src/Kokkos_SIMD_Common.hpp
Outdated
template <class T, class Abi> \ | ||
[[nodiscard]] KOKKOS_DEPRECATED KOKKOS_FORCEINLINE_FUNCTION simd<T, Abi> \ | ||
FUNC(simd<T, Abi> const& a) { \ | ||
Kokkos::FUNC(a); \ |
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 like there are couple missing return statements like 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.
Fixed.
ad8e771
to
b855631
Compare
Yes, I refrained from doing anymore restructuring to avoid conflicts with other pull requests. |
Retest this please. |
The |
This fixes the confusion in #6276 (comment).
At the moment, we have fallback SIMD math functions (those that are also defined in
cmath
) defined in namespaceKokkos
but the specialized ones in namespaceKokkos::Experimental
.This pull request makes sure to have all these functions in namespace
Kokkos
so that users don't have to use different namespaces based on the SIMD type having specializations or not. IfDEPRECATED_CODE_4
is enabled, all of these functions are also defined in namespaceKokkos::Experimental
similar to what we are doing for the non-SIMDKokkos
math functions.