aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Eigen/src/Core/arch/CUDA/PacketMathHalf.h4
1 files 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<half2>(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<half2>(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
}