diff options
author | 2015-07-20 12:56:01 +0200 | |
---|---|---|
committer | 2015-07-20 12:56:01 +0200 | |
commit | c11971de3799299e3a0dec9dff188734e6bfe8d3 (patch) | |
tree | d756b0771bc9eb96496ee892913e7ee51b0e3062 | |
parent | 88e352adac535403db3e5e7efa5fa3cb483c5c2e (diff) |
Fix compilation of isnan(complex)
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index fb2e2a5f1..f2d5b4879 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -795,24 +795,6 @@ bool (isfinite)(const T& x) } template<typename T> -bool (isfinite)(const std::complex<T>& x) -{ - return numext::isfinite(numext::real(x)) && numext::isfinite(numext::imag(x)); -} - -template<typename T> -bool (isnan)(const std::complex<T>& x) -{ - return numext::isnan(numext::real(x)) || numext::isnan(numext::imag(x)); -} - -template<typename T> -bool (isinf)(const std::complex<T>& x) -{ - return (numext::isinf(numext::real(x)) || numext::isinf(numext::imag(x))) && (!numext::isnan(x)); -} - -template<typename T> EIGEN_DEVICE_FUNC bool (isnan)(const T& x) { @@ -836,6 +818,24 @@ bool (isinf)(const T& x) #endif } +template<typename T> +bool (isfinite)(const std::complex<T>& x) +{ + return numext::isfinite(numext::real(x)) && numext::isfinite(numext::imag(x)); +} + +template<typename T> +bool (isnan)(const std::complex<T>& x) +{ + return numext::isnan(numext::real(x)) || numext::isnan(numext::imag(x)); +} + +template<typename T> +bool (isinf)(const std::complex<T>& x) +{ + return (numext::isinf(numext::real(x)) || numext::isinf(numext::imag(x))) && (!numext::isnan(x)); +} + template<typename Scalar> EIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x) |