diff options
author | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2019-03-28 15:07:35 -0700 |
---|---|---|
committer | Raghuveer Devulapalli <raghuveer.devulapalli@intel.com> | 2019-04-19 10:47:15 -0700 |
commit | 651e03c0019d4c4c6ca8c43cb7d7c0d344a72cc1 (patch) | |
tree | f3d3333fa3427ba350344895d6bb850b8d5ca3ff /numpy/core/include | |
parent | f9d14627b36bc25aace6c78e6e5f6fe68c08bfcb (diff) | |
download | numpy-651e03c0019d4c4c6ca8c43cb7d7c0d344a72cc1.tar.gz |
BUG: Adding macro HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS
1) use __builtin_cpu_supports("avx512f") only for gcc ver >= 5
2) Introduced two new macro's:
HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS for ensuring compiler can
compile functions that use intrinsics and are compiled with avx2/avx512f
attributes
Diffstat (limited to 'numpy/core/include')
-rw-r--r-- | numpy/core/include/numpy/npy_common.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/npy_common.h b/numpy/core/include/numpy/npy_common.h index d83080160..108c0a202 100644 --- a/numpy/core/include/numpy/npy_common.h +++ b/numpy/core/include/numpy/npy_common.h @@ -46,12 +46,16 @@ #endif #if defined HAVE_ATTRIBUTE_TARGET_AVX2 && defined HAVE_LINK_AVX2 #define NPY_GCC_TARGET_AVX2 __attribute__((target("avx2"))) +#elif defined HAVE_ATTRIBUTE_TARGET_AVX2_WITH_INTRINSICS +#define NPY_GCC_TARGET_AVX2 __attribute__((target("avx2"))) #else #define NPY_GCC_TARGET_AVX2 #endif #if defined HAVE_ATTRIBUTE_TARGET_AVX512F && defined HAVE_LINK_AVX512F #define NPY_GCC_TARGET_AVX512F __attribute__((target("avx512f"))) +#elif defined HAVE_ATTRIBUTE_TARGET_AVX512F_WITH_INTRINSICS +#define NPY_GCC_TARGET_AVX512F __attribute__((target("avx512f"))) #else #define NPY_GCC_TARGET_AVX512F #endif |