diff options
author | 2014-04-22 17:00:38 +0200 | |
---|---|---|
committer | 2014-04-22 17:00:38 +0200 | |
commit | 934ce938869170d138b1c554f493754d42a0fa52 (patch) | |
tree | 7f008ccd03fd007b669334f6ff26e2d793fba9ef /Eigen/src/Core/MathFunctions.h | |
parent | 5c5231ab71ba51432a24fdfd7d36a835b44805ea (diff) | |
parent | e5d0cb54a5f2a2200a4656d993c82a80f159a7c4 (diff) |
merge with default branch
Diffstat (limited to 'Eigen/src/Core/MathFunctions.h')
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 63fb92b75..20fc2be74 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -669,6 +669,15 @@ bool (isfinite)(const T& x) return x<NumTraits<T>::highest() && x>NumTraits<T>::lowest(); } +template<typename T> +EIGEN_DEVICE_FUNC +bool (isfinite)(const std::complex<T>& x) +{ + using std::real; + using std::imag; + return isfinite(real(x)) && isfinite(imag(x)); +} + } // end namespace numext namespace internal { |