From 2cb2915f908418c897773e0342f152768c13a0d8 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 15 Nov 2019 13:39:51 +0100 Subject: [PATCH] bug #1744: fix compilation with MSVC 2017 and AVX512, plog1p/pexpm1 require plog/pexp, but the later was disabled on some compilers --- Eigen/src/Core/arch/AVX512/MathFunctions.h | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/Eigen/src/Core/arch/AVX512/MathFunctions.h b/Eigen/src/Core/arch/AVX512/MathFunctions.h index 99946cd29..273c22c18 100644 --- a/Eigen/src/Core/arch/AVX512/MathFunctions.h +++ b/Eigen/src/Core/arch/AVX512/MathFunctions.h @@ -378,6 +378,19 @@ EIGEN_STRONG_INLINE Packet16f prsqrt(const Packet16f& x) { return _mm512_rsqrt28_ps(x); } #endif + +#if defined(EIGEN_VECTORIZE_AVX512DQ) +template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED +Packet16f plog1p(const Packet16f& _x) { + return generic_plog1p(_x); +} + +template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED +Packet16f pexpm1(const Packet16f& _x) { + return generic_expm1(_x); +} +#endif + #endif @@ -393,18 +406,6 @@ pcos(const Packet16f& _x) { return pcos_float(_x); } -#if defined(EIGEN_VECTORIZE_AVX512DQ) -template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED -Packet16f plog1p(const Packet16f& _x) { - return generic_plog1p(_x); -} - -template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED -Packet16f pexpm1(const Packet16f& _x) { - return generic_expm1(_x); -} -#endif - template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet16f ptanh(const Packet16f& _x) {