Skip to content
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

Promote mathematical functions to Kokkos namespace #4791

Merged
merged 8 commits into from
Feb 21, 2022

Conversation

dalg24
Copy link
Member

@dalg24 dalg24 commented Feb 16, 2022

Move all math functions from Kokkos::Experimental:: to Kokkos:: namespace.
Provide using-declaration in the Kokkos::Experimental:: namespace when deprecated code is enabled to ease the transition.

Deprecated function log2(unsigned) -> int is being removed.

Comment on lines -156 to -162
#ifdef KOKKOS_ENABLE_DEPRECATED_CODE_3

KOKKOS_DEPRECATED KOKKOS_INLINE_FUNCTION int log2(unsigned i) {
return Impl::int_log2(i);
}

#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't keep it if we proceed and promote the math functions.

@dalg24 dalg24 force-pushed the promote_math_functions branch 3 times, most recently from ba20362 to 7810dee Compare February 16, 2022 20:40
@dalg24 dalg24 marked this pull request as ready for review February 16, 2022 20:40
@dalg24 dalg24 added this to In progress in Kokkos Release 3.7 -- 2022 Target Date via automation Feb 16, 2022
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KOKKOS_IMPL_MATH_FUNCTIONS_DEFINED_IF_DEPRECATED_CODE_ENABLED makes more sense to me than KOKKOS_IMPL_MATH_FUNCTIONS_DEFINED_IF_DEPRECATE_CODE_ENABLED but I don't think it matters much.

core/src/Kokkos_MathematicalFunctions.hpp Outdated Show resolved Hide resolved
@@ -47,6 +47,7 @@

#include <Kokkos_Macros.hpp>
#include <cmath>
#include <cstdlib>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this include?

Copy link
Member Author

@dalg24 dalg24 Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abs overloads that takes integral types. Amy had this issue on OS X earlier this week and Christian and I had to add it when trying to resolve issues with the Fujitsu compiler. Also #4727 (comment).

core/src/Kokkos_MathematicalFunctions.hpp Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants