mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Specify the rounding mode in the correct location
This commit is contained in:
parent
457204cb83
commit
efeb89dcdb
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user