mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-23 01:59:38 +08:00
Include immintrin.h if F16C is available and vectorization is disabled
If EIGEN_DONT_VECTORIZE is defined, immintrin.h is not included even if F16C is available. Trying to use F16C intrinsics thus fails. This fixes issue #2395.
This commit is contained in:
parent
f7a056bf04
commit
c06c3e52a0
@ -420,9 +420,11 @@
|
|||||||
// We can use the optimized fp16 to float and float to fp16 conversion routines
|
// We can use the optimized fp16 to float and float to fp16 conversion routines
|
||||||
#define EIGEN_HAS_FP16_C
|
#define EIGEN_HAS_FP16_C
|
||||||
|
|
||||||
#if EIGEN_COMP_CLANG
|
#if EIGEN_COMP_GNUC
|
||||||
// Workaround for clang: The FP16C intrinsics for clang are included by
|
// Make sure immintrin.h is included, even if e.g. vectorization is
|
||||||
// immintrin.h, as opposed to emmintrin.h as suggested by Intel:
|
// explicitly disabled (see also issue #2395).
|
||||||
|
// Note that FP16C intrinsics for gcc and clang are included by immintrin.h,
|
||||||
|
// as opposed to emmintrin.h as suggested by Intel:
|
||||||
// https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=FP16C&expand=1711
|
// https://software.intel.com/sites/landingpage/IntrinsicsGuide/#othertechs=FP16C&expand=1711
|
||||||
#include <immintrin.h>
|
#include <immintrin.h>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user