aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Rohit Santhanam <rohit.santhanam@amd.com>2021-05-10 19:20:32 +0000
committerGravatar Rohit Santhanam <rohit.santhanam@amd.com>2021-05-10 19:48:32 +0000
commit39ec31c0adbdde6b8cda36b3415e9cc2af20dab6 (patch)
tree62bd7bc638c7d09a238e60853bffa007440d461a
parentc0eb5f89a406243f71eae0b705eba4437d9f8565 (diff)
Fix for issue where numext::imag and numext::real are used before they are defined.
-rw-r--r--Eigen/src/Core/MathFunctions.h24
1 files 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<Scalar,true>
template<typename Scalar, bool IsComplex = NumTraits<Scalar>::IsComplex>
struct conj_impl : conj_default_impl<Scalar, IsComplex> {};
-#if defined(EIGEN_GPU_COMPILE_PHASE)
-template<typename T>
-struct conj_impl<std::complex<T>, true>
-{
- EIGEN_DEVICE_FUNC
- static inline std::complex<T> run(const std::complex<T>& x)
- {
- return std::complex<T>(numext::real(x), -numext::imag(x));
- }
-};
-#endif
-
template<typename Scalar>
struct conj_retval
{
@@ -2024,6 +2012,18 @@ struct rsqrt_impl {
}
};
+#if defined(EIGEN_GPU_COMPILE_PHASE)
+template<typename T>
+struct conj_impl<std::complex<T>, true>
+{
+ EIGEN_DEVICE_FUNC
+ static inline std::complex<T> run(const std::complex<T>& x)
+ {
+ return std::complex<T>(numext::real(x), -numext::imag(x));
+ }
+};
+#endif
+
} // end namespace internal
} // end namespace Eigen