Skip to content

Commit fc06c0f

Browse files
committed
Fixed preprocesor macros for AVX10 to work across clang,gcc and MSVC
1 parent 15f5a63 commit fc06c0f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

common/cmake/check_isa.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
// ======================================================================== //
1616

1717
// Require APX and 10.2 if both are available, otherwise require the highest available ISA
18-
#if defined(__APX_F__) && defined(__AVX10_VER__) && (__AVX10_VER__ >= 2)
18+
#if defined(__APX_F__) && ((defined(__AVX10_VER__) && (__AVX10_VER__ >= 2)) || defined(__AVX10_2__))
1919
char const *info_isa = "ISA" ":" "APX";
2020
#elif \
2121
defined(__AVX512F__) && defined(__AVX512CD__) && \

common/sys/sysinfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* define isa namespace and ISA bitvector */
1818
/* We treat APX as superset of AVX10.2. We don't have support for APX without those extensions. */
19-
#if defined(__APX_F__) && defined(__AVX10_VER__) && (__AVX10_VER__ >= 2)
19+
#if defined(__APX_F__) && ((defined(__AVX10_VER__) && (__AVX10_VER__ >= 2)) || defined(__AVX10_2__))
2020
# define isa apx
2121
# define ISA APX
2222
# define ISA_STR "APX"

0 commit comments

Comments
 (0)