Skip to content

Commit dd9de00

Browse files
ifndef bit_AVX512F, do not pass go, do not collect $200, do not enable avx512f
do not use -mavx512f on Windows
1 parent decaec0 commit dd9de00

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Make.inc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ ifneq (, $(findstring mfma, $(simd)))
5050
endif
5151
endif
5252
ifneq (, $(findstring mavx512f, $(simd)))
53-
MAVX512F := -mavx512f
53+
ifneq ($(UNAME), Windows)
54+
MAVX512F := -mavx512f
55+
endif
5456
endif
5557

5658
ifeq ($(UNAME), Darwin)
@@ -82,7 +84,7 @@ SRC = src/recurrence.c src/transforms.c src/rotations.c src/permute.c src/tdc.c
8284

8385
machine := $(shell $(CC) -dumpmachine | cut -d'-' -f1)
8486

85-
AFLAGS = -O3 -fPIC -std=gnu99 -I./src
87+
AFLAGS += -O3 -fPIC -std=gnu99 -I./src
8688

8789
ifndef CFLAGS
8890
CFLAGS = -O3

src/ftinternal.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ static inline ft_simd get_simd(void) {
131131
unsigned eax1, ebx1, ecx1, edx1;
132132
cpuid(1, 0, &eax, &ebx, &ecx, &edx);
133133
cpuid(7, 0, &eax1, &ebx1, &ecx1, &edx1);
134-
return (ft_simd) {!!(edx & bit_SSE), !!(edx & bit_SSE2), !!(ecx & bit_SSE3), !!(ecx & bit_SSSE3), !!(ecx & bit_SSE4_1), !!(ecx & bit_SSE4_2), !!(ecx & bit_AVX), !!(ebx1 & bit_AVX2), !!(ecx & bit_FMA), !!(ebx1 & bit_AVX512F)};
134+
#ifndef bit_AVX512F
135+
return (ft_simd) {!!(edx & bit_SSE), !!(edx & bit_SSE2), !!(ecx & bit_SSE3), !!(ecx & bit_SSSE3), !!(ecx & bit_SSE4_1), !!(ecx & bit_SSE4_2), !!(ecx & bit_AVX), !!(ebx1 & bit_AVX2), !!(ecx & bit_FMA), 0};
136+
#else
137+
return (ft_simd) {!!(edx & bit_SSE), !!(edx & bit_SSE2), !!(ecx & bit_SSE3), !!(ecx & bit_SSSE3), !!(ecx & bit_SSE4_1), !!(ecx & bit_SSE4_2), !!(ecx & bit_AVX), !!(ebx1 & bit_AVX2), !!(ecx & bit_FMA), !!(ebx1 & bit_AVX512F)};
138+
#endif
135139
}
136140

137141
#ifdef __AVX512F__

0 commit comments

Comments
 (0)