From 65e400896bd5d6e62263d8262f6c7e1644f83298 Mon Sep 17 00:00:00 2001 From: Pedro Caldeira Date: Fri, 11 Sep 2020 09:14:33 -0500 Subject: Fix bfloat16 round on gcc 4.8 --- Eigen/src/Core/MathFunctions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Eigen/src/Core/MathFunctions.h') diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index 40fcb5d49..a5c078b3b 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -407,7 +407,7 @@ inline NewType cast(const OldType& x) { EIGEN_STATIC_ASSERT((!NumTraits::IsComplex), NUMERIC_TYPE_MUST_BE_REAL) EIGEN_USING_STD_MATH(round); - return round(x); + return Scalar(round(x)); } }; #else -- cgit v1.2.3