diff options
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 5771abf7d..2bdf7dde7 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -937,6 +937,15 @@ template<typename T> EIGEN_DEVICE_FUNC bool (isnan) (const T &x) { return inte template<typename T> EIGEN_DEVICE_FUNC bool (isinf) (const T &x) { return internal::isinf_impl(x); } template<typename T> EIGEN_DEVICE_FUNC bool (isfinite)(const T &x) { return internal::isfinite_impl(x); } +template<typename T> EIGEN_DEVICE_FUNC int (fpclassify)(const T& x){ + #ifdef __CUDA_ARCH__ + return (::fpclassify)(x); + #else + using std::fpclassify; + return fpclassify(x); + #endif +} + template<typename Scalar> EIGEN_DEVICE_FUNC inline EIGEN_MATHFUNC_RETVAL(round, Scalar) round(const Scalar& x) |