aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/util/Meta.h
diff options
context:
space:
mode:
authorGravatar Deven Desai <deven.desai.amd@gmail.com>2018-06-13 12:09:52 -0400
committerGravatar Deven Desai <deven.desai.amd@gmail.com>2018-06-13 12:09:52 -0400
commitd1d22ef0f4af42f58bdd9d78b22bf912852a6bf4 (patch)
treed137f1e11d54028c241eee61bf8cd5fe6441f602 /Eigen/src/Core/util/Meta.h
parent8fbd47052bcafea612b8ae2841c1de5db738f042 (diff)
parentd3a380af4d17513ab71630b59f390589fa7c207b (diff)
syncing this fork with upstream
Diffstat (limited to 'Eigen/src/Core/util/Meta.h')
-rwxr-xr-xEigen/src/Core/util/Meta.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Eigen/src/Core/util/Meta.h b/Eigen/src/Core/util/Meta.h
index ca6fa6ce9..7f78cc89c 100755
--- a/Eigen/src/Core/util/Meta.h
+++ b/Eigen/src/Core/util/Meta.h
@@ -587,23 +587,27 @@ T div_ceil(const T &a, const T &b)
// The aim of the following functions is to bypass -Wfloat-equal warnings
// when we really want a strict equality comparison on floating points.
-template<typename X, typename Y> EIGEN_STRONG_INLINE
+template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool equal_strict(const X& x,const Y& y) { return x == y; }
-template<> EIGEN_STRONG_INLINE
+#if !defined(EIGEN_CUDA_ARCH)
+template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool equal_strict(const float& x,const float& y) { return std::equal_to<float>()(x,y); }
-template<> EIGEN_STRONG_INLINE
+template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool equal_strict(const double& x,const double& y) { return std::equal_to<double>()(x,y); }
+#endif
-template<typename X, typename Y> EIGEN_STRONG_INLINE
+template<typename X, typename Y> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool not_equal_strict(const X& x,const Y& y) { return x != y; }
-template<> EIGEN_STRONG_INLINE
+#if !defined(EIGEN_CUDA_ARCH)
+template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool not_equal_strict(const float& x,const float& y) { return std::not_equal_to<float>()(x,y); }
-template<> EIGEN_STRONG_INLINE
+template<> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
bool not_equal_strict(const double& x,const double& y) { return std::not_equal_to<double>()(x,y); }
+#endif
} // end namespace numext