diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-04-11 15:24:13 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-04-11 15:24:13 +0200 |
commit | e43ca0320d58587736d8bab7c6ed7212aa6b8d9d (patch) | |
tree | 8e62324a39cf298456fe025fb3064dccaf26a1e3 /Eigen/src/Core/arch/CUDA | |
parent | b0eda3cb9fc08d7b0bd39d99a1874b9575439e2c (diff) |
bug #1520: workaround some -Wfloat-equal warnings by calling std::equal_to
Diffstat (limited to 'Eigen/src/Core/arch/CUDA')
-rw-r--r-- | Eigen/src/Core/arch/CUDA/Half.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h index 2bb3d0d9b..c10550050 100644 --- a/Eigen/src/Core/arch/CUDA/Half.h +++ b/Eigen/src/Core/arch/CUDA/Half.h @@ -299,10 +299,10 @@ EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC half& operator /= (half& a, const half& b) return a; } EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator == (const half& a, const half& b) { - return float(a) == float(b); + return numext::equal_strict(float(a),float(b)); } EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator != (const half& a, const half& b) { - return float(a) != float(b); + return numext::not_equal_strict(float(a), float(b)); } EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool operator < (const half& a, const half& b) { return float(a) < float(b); |