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

complex(math) : log10 support #5009

Merged
merged 1 commit into from
May 13, 2022
Merged

Conversation

romintomasetti
Copy link
Contributor

@romintomasetti romintomasetti commented May 10, 2022

This PR adds log10 support for Kokkos::complex type.

This PR targets #3877.

It also comes with the accompanying test in core/unit_test/TestComplex.hpp.

@dalg24-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

core/src/Kokkos_Complex.hpp Outdated Show resolved Hide resolved
core/src/Kokkos_Complex.hpp Outdated Show resolved Hide resolved
core/src/Kokkos_Complex.hpp Outdated Show resolved Hide resolved
@dalg24
Copy link
Member

dalg24 commented May 11, 2022

Test this please

@dalg24
Copy link
Member

dalg24 commented May 11, 2022

Would you please fix the format

diff --git a/core/src/Kokkos_Complex.hpp b/core/src/Kokkos_Complex.hpp
index 63d144171..9c0387e1d 100644
--- a/core/src/Kokkos_Complex.hpp
+++ b/core/src/Kokkos_Complex.hpp
@@ -786,7 +786,7 @@ KOKKOS_INLINE_FUNCTION Kokkos::complex<RealType> log(
 }
 
 //! base 10 log of a complex number.
-template<typename RealType>
+template <typename RealType>
 KOKKOS_INLINE_FUNCTION Kokkos::complex<RealType> log10(
     const complex<RealType>& x) {
   return log(x) / log(RealType(10));

@romintomasetti
Copy link
Contributor Author

Would you please fix the format

diff --git a/core/src/Kokkos_Complex.hpp b/core/src/Kokkos_Complex.hpp
index 63d144171..9c0387e1d 100644
--- a/core/src/Kokkos_Complex.hpp
+++ b/core/src/Kokkos_Complex.hpp
@@ -786,7 +786,7 @@ KOKKOS_INLINE_FUNCTION Kokkos::complex<RealType> log(
 }
 
 //! base 10 log of a complex number.
-template<typename RealType>
+template <typename RealType>
 KOKKOS_INLINE_FUNCTION Kokkos::complex<RealType> log10(
     const complex<RealType>& x) {
   return log(x) / log(RealType(10));

Done, thanks ! I also used class instead of typename, as for the other operators throughout Kokkos_Complex.hpp.

@dalg24
Copy link
Member

dalg24 commented May 12, 2022

OK to test

@dalg24
Copy link
Member

dalg24 commented May 12, 2022

Retest this please

2 similar comments
@dalg24
Copy link
Member

dalg24 commented May 12, 2022

Retest this please

@dalg24
Copy link
Member

dalg24 commented May 13, 2022

Retest this please

@dalg24
Copy link
Member

dalg24 commented May 13, 2022

Retest this please...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants