Define EIGEN_HAS_AVX512_MATH in PacketMath.

This commit is contained in:
Antonio Sánchez 2022-02-04 22:25:52 +00:00 committed by Rasmus Munk Larsen
parent 6b60bd6754
commit e7f4a901ee
2 changed files with 8 additions and 5 deletions

View File

@ -16,9 +16,7 @@ namespace Eigen {
namespace internal { namespace internal {
// Disable the code for older versions of gcc that don't support many of the required avx512 instrinsics. #if EIGEN_HAS_AVX512_MATH
#if EIGEN_GNUC_AT_LEAST(5, 3) || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC >= 1923 || EIGEN_COMP_ICC >= 1900
#define EIGEN_HAS_AVX512_MATH 1
#define EIGEN_DECLARE_CONST_Packet16f(NAME, X) \ #define EIGEN_DECLARE_CONST_Packet16f(NAME, X) \
const Packet16f p16f_##NAME = pset1<Packet16f>(X) const Packet16f p16f_##NAME = pset1<Packet16f>(X)
@ -327,8 +325,6 @@ Packet16f pexpm1<Packet16f>(const Packet16f& _x) {
F16_PACKET_FUNCTION(Packet16f, Packet16h, pexpm1) F16_PACKET_FUNCTION(Packet16f, Packet16h, pexpm1)
BF16_PACKET_FUNCTION(Packet16f, Packet16bf, pexpm1) BF16_PACKET_FUNCTION(Packet16f, Packet16bf, pexpm1)
#else
#define EIGEN_HAS_AVX512_MATH 0
#endif // EIGEN_HAS_AVX512_MATH #endif // EIGEN_HAS_AVX512_MATH

View File

@ -30,6 +30,13 @@ namespace internal {
#endif #endif
#endif #endif
// Disable the code for older versions of gcc that don't support many of the required avx512 math instrinsics.
#if EIGEN_GNUC_AT_LEAST(5, 3) || EIGEN_COMP_CLANG || EIGEN_COMP_MSVC >= 1923 || EIGEN_COMP_ICC >= 1900
#define EIGEN_HAS_AVX512_MATH 1
#else
#define EIGEN_HAS_AVX512_MATH 0
#endif
typedef __m512 Packet16f; typedef __m512 Packet16f;
typedef __m512i Packet16i; typedef __m512i Packet16i;
typedef __m512d Packet8d; typedef __m512d Packet8d;