From 56a1757d7409d1c0392aaf33ee0086af897600ca Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Wed, 11 May 2016 17:37:34 -0700 Subject: Made predux_min and predux_max on fp16 less noisy --- Eigen/src/Core/arch/CUDA/PacketMathHalf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h index 1b32d20aa..be0e2bdf2 100644 --- a/Eigen/src/Core/arch/CUDA/PacketMathHalf.h +++ b/Eigen/src/Core/arch/CUDA/PacketMathHalf.h @@ -245,7 +245,7 @@ template<> EIGEN_DEVICE_FUNC inline half predux_max(const half2& a) { #else float a1 = __low2float(a); float a2 = __high2float(a); - return half(__float2half_rn(numext::maxi(a1, a2))); + return a1 > a2 ? __low2half(a) : __high2half(a); #endif } @@ -257,7 +257,7 @@ template<> EIGEN_DEVICE_FUNC inline half predux_min(const half2& a) { #else float a1 = __low2float(a); float a2 = __high2float(a); - return half(__float2half_rn(numext::mini(a1, a2))); + return a1 < a2 ? __low2half(a) : __high2half(a); #endif } -- cgit v1.2.3