Skip to content

Commit 24a9c75

Browse files
committed
* Fixed improper AVX-512 detection which causes crash for several functions.
1 parent 1a1fb91 commit 24a9c75

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.16 ===
6-
6+
* Fixed improper AVX-512 detection which causes crash for several functions.
77

88
=== 1.0.15 ===
99
* Several functions optimized for AVX-512 support.

src/main/x86/avx512.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,19 @@
5555

5656
#define CEXPORT2(cond, function, export) \
5757
{ \
58-
TEST_EXPORT(avx512::export); \
5958
if (cond) \
59+
{ \
60+
TEST_EXPORT(avx512::export); \
6061
dsp::function = avx512::export; \
62+
} \
6163
}
6264

6365
#define CEXPORT1(cond, export) CEXPORT2(cond, export, export)
6466

6567
void dsp_init(const cpu_features_t *f)
6668
{
67-
const bool vl = (f->features & (CPU_OPTION_AVX512F | CPU_OPTION_AVX512VL)) != (CPU_OPTION_AVX512F | CPU_OPTION_AVX512VL);
69+
const bool vl = (f->features & (CPU_OPTION_AVX512F | CPU_OPTION_AVX512VL)) ==
70+
(CPU_OPTION_AVX512F | CPU_OPTION_AVX512VL);
6871

6972
CEXPORT1(vl, copy);
7073
CEXPORT1(vl, move);

0 commit comments

Comments
 (0)