diff options
author | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-10-01 12:37:55 -0700 |
---|---|---|
committer | Rasmus Munk Larsen <rmlarsen@google.com> | 2020-10-01 12:37:55 -0700 |
commit | 9078f47cd68188ff6bb9bec950e00dfd6ee364d5 (patch) | |
tree | c9ff3a9c176127297e0f6aa05cd9862fb80ec460 /Eigen/src/Core/arch/SSE | |
parent | 3b445d9bf2df77e7742f808125e826c7955e0b8b (diff) |
Fix build breakage with MSVC 2019, which does not support MMX intrinsics for 64 bit builds, see:
https://stackoverflow.com/questions/60933486/mmx-intrinsics-like-mm-cvtpd-pi32-not-found-with-msvc-2019-for-64bit-targets-c
Instead use the equivalent SSE2 intrinsics.
Diffstat (limited to 'Eigen/src/Core/arch/SSE')
-rwxr-xr-x | Eigen/src/Core/arch/SSE/PacketMath.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Eigen/src/Core/arch/SSE/PacketMath.h b/Eigen/src/Core/arch/SSE/PacketMath.h index 64479f5d4..197155326 100755 --- a/Eigen/src/Core/arch/SSE/PacketMath.h +++ b/Eigen/src/Core/arch/SSE/PacketMath.h @@ -769,12 +769,11 @@ template<> EIGEN_STRONG_INLINE Packet4f pldexp<Packet4f>(const Packet4f& a, cons template<> EIGEN_STRONG_INLINE Packet2d pldexp<Packet2d>(const Packet2d& a, const Packet2d& exponent) { const Packet2d cst_1023 = pset1<Packet2d>(1023.0); // Add exponent offset. - __m64 ei = _mm_cvtpd_pi32(padd(exponent, cst_1023)); + Packet4i ei = _mm_cvtpd_epi32(padd(exponent, cst_1023)); // Convert to exponents to int64 and swizzle to the low-order 32 bits. - __m128i el = _mm_set_epi64(_mm_setzero_si64(), ei); - el = vec4i_swizzle1(el, 0, 3, 1, 3); + ei = vec4i_swizzle1(ei, 0, 3, 1, 3); // return a * 2^exponent - return pmul(a, _mm_castsi128_pd(_mm_slli_epi64(el, 52))); + return pmul(a, _mm_castsi128_pd(_mm_slli_epi64(ei, 52))); } // with AVX, the default implementations based on pload1 are faster |