From dec0c4957689226919bcb09f426f2870c2b81f9e Mon Sep 17 00:00:00 2001 From: Jack O'Connor Date: Mon, 27 Jan 2020 13:06:56 -0500 Subject: [PATCH] add a note about AVX-512 flags --- c/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/c/README.md b/c/README.md index bff96c1..21be216 100644 --- a/c/README.md +++ b/c/README.md @@ -75,6 +75,10 @@ gcc -shared -O3 blake3.c blake3_dispatch.c blake3_portable.c \ blake3_avx2.o blake3_avx512.o blake3_sse41.o -o libblake3.so ``` +Note that building `blake3_avx512.c` requires both `-mavx512f` and +`-mavx512vl` under GCC and Clang, as shown above. Under MSVC, the single +`/arch:AVX512` flag is sufficient. + If you want to omit SIMD code on x86, you need to explicitly disable each instruction set. Here's an example of building a shared library on Linux with no SIMD support: