diff options
| author | Sayed Adel <seiko@imavr.com> | 2021-05-09 21:33:37 +0200 |
|---|---|---|
| committer | Sayed Adel <seiko@imavr.com> | 2021-05-09 21:53:35 +0200 |
| commit | 7aee0fa0805c55d0aed2d26dec8e1153757c69ff (patch) | |
| tree | ebbc3a88e9b1cbbda12e0be1c11fdc728b13259d /numpy/distutils/checks/cpu_avx512_icl.c | |
| parent | e3583316cab5e71f2b361c32a3eee748905f40c5 (diff) | |
| download | numpy-7aee0fa0805c55d0aed2d26dec8e1153757c69ff.tar.gz | |
MAINT, SIMD: Hardened the AVX compile-time tests
To avoid optimizing it out by the compiler so we make
sure that the assembler is getting involved.
Diffstat (limited to 'numpy/distutils/checks/cpu_avx512_icl.c')
| -rw-r--r-- | numpy/distutils/checks/cpu_avx512_icl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/numpy/distutils/checks/cpu_avx512_icl.c b/numpy/distutils/checks/cpu_avx512_icl.c index cf2706b3b..085b947e0 100644 --- a/numpy/distutils/checks/cpu_avx512_icl.c +++ b/numpy/distutils/checks/cpu_avx512_icl.c @@ -1,9 +1,10 @@ #include <immintrin.h> -int main(void) +int main(int argc, char **argv) { + __m512i a = _mm512_loadu_si512((const __m512i*)argv[argc-1]); /* VBMI2 */ - __m512i a = _mm512_shrdv_epi64(_mm512_setzero_si512(), _mm512_setzero_si512(), _mm512_setzero_si512()); + a = _mm512_shrdv_epi64(a, a, _mm512_setzero_si512()); /* BITLAG */ a = _mm512_popcnt_epi8(a); /* VPOPCNTDQ */ |
