Fix bfloat16 round on gcc 4.8

This commit is contained in:
Pedro Caldeira 2020-09-11 09:14:33 -05:00 committed by Pedro Henrique Moreira Caldeira
parent 5636f80d11
commit 65e400896b

View File

@ -407,7 +407,7 @@ inline NewType cast(const OldType& x)
{
EIGEN_STATIC_ASSERT((!NumTraits<Scalar>::IsComplex), NUMERIC_TYPE_MUST_BE_REAL)
EIGEN_USING_STD_MATH(round);
return round(x);
return Scalar(round(x));
}
};
#else