From 39ec31c0adbdde6b8cda36b3415e9cc2af20dab6 Mon Sep 17 00:00:00 2001 From: Rohit Santhanam Date: Mon, 10 May 2021 19:20:32 +0000 Subject: Fix for issue where numext::imag and numext::real are used before they are defined. --- Eigen/src/Core/MathFunctions.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index f77724052..7f82090a9 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -263,18 +263,6 @@ struct conj_default_impl template::IsComplex> struct conj_impl : conj_default_impl {}; -#if defined(EIGEN_GPU_COMPILE_PHASE) -template -struct conj_impl, true> -{ - EIGEN_DEVICE_FUNC - static inline std::complex run(const std::complex& x) - { - return std::complex(numext::real(x), -numext::imag(x)); - } -}; -#endif - template struct conj_retval { @@ -2024,6 +2012,18 @@ struct rsqrt_impl { } }; +#if defined(EIGEN_GPU_COMPILE_PHASE) +template +struct conj_impl, true> +{ + EIGEN_DEVICE_FUNC + static inline std::complex run(const std::complex& x) + { + return std::complex(numext::real(x), -numext::imag(x)); + } +}; +#endif + } // end namespace internal } // end namespace Eigen -- cgit v1.2.3