Specify the rounding mode in the correct location

This commit is contained in:
Benoit Steiner 2016-05-25 17:53:24 -07:00
parent 457204cb83
commit efeb89dcdb

View File

@ -378,7 +378,7 @@ ploadquad<Packet8h>(const Eigen::half* from) {
EIGEN_STRONG_INLINE Packet8f half2float(const Packet8h& a) {
#ifdef EIGEN_HAS_FP16_C
return _mm256_cvtph_ps(a.x, _MM_FROUND_TO_NEAREST_INT|_MM_FROUND_NO_EXC);
return _mm256_cvtph_ps(a.x);
#else
EIGEN_ALIGN32 Eigen::half aux[8];
pstore(aux, a);
@ -398,7 +398,7 @@ EIGEN_STRONG_INLINE Packet8f half2float(const Packet8h& a) {
EIGEN_STRONG_INLINE Packet8h float2half(const Packet8f& a) {
#ifdef EIGEN_HAS_FP16_C
Packet8h result;
result.x = _mm256_cvtps_ph(a);
result.x = _mm256_cvtps_ph(a, _MM_FROUND_TO_NEAREST_INT|_MM_FROUND_NO_EXC);
return result;
#else
EIGEN_ALIGN32 float aux[8];