Skip to content

Commit 40b4bf3

Browse files
committed
AVX512: _mm512_rsqrt28_ps is available for AVX512ER only
1 parent 584951c commit 40b4bf3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Eigen/Core

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@
183183
#ifdef __AVX512DQ__
184184
#define EIGEN_VECTORIZE_AVX512DQ
185185
#endif
186+
#ifdef __AVX512ER__
187+
#define EIGEN_VECTORIZE_AVX512ER
188+
#endif
186189
#endif
187190

188191
// include files

Eigen/src/Core/arch/AVX512/MathFunctions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ prsqrt<Packet8d>(const Packet8d& _x) {
375375
// Insert NaNs and Infs in all the right places.
376376
return _mm512_mask_blend_pd(le_zero_mask, x, infs_and_nans);
377377
}
378-
#else
378+
#elif defined(EIGEN_VECTORIZE_AVX512ER)
379379
template <>
380380
EIGEN_STRONG_INLINE Packet16f prsqrt<Packet16f>(const Packet16f& x) {
381381
return _mm512_rsqrt28_ps(x);

0 commit comments

Comments
 (0)