13
0

Update wscript for AVX512F support

Accurately determine if AVX512F has been supported by the compiler
This commit is contained in:
Ayan Shafqat 2023-02-04 10:59:59 -05:00 committed by Robin Gareus
parent b3a10378cf
commit 99d6a4c709
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -521,7 +521,7 @@ int main() { return 0; }''',
if re.search ('x86_64-w64', str(conf.env['CC'])) is not None:
conf.define ('FPU_AVX_FMA_SUPPORT', 1)
elif conf.env['build_target'] == 'i386' or conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
conf.check_cxx(fragment = "#include <immintrin.h>\nint main(void) { __m128 a; _mm_fmadd_ss(a, a, a); return 0; }\n",
conf.check_cxx(fragment = "#include <immintrin.h>\nint main(void) { __m512 a; _mm512_fmadd_ps(a, a, a); return 0; }\n",
features = ['cxx'],
cxxflags = [ conf.env['compiler_flags_dict']['avx512f'], conf.env['compiler_flags_dict']['fma'], conf.env['compiler_flags_dict']['avx'] ],
mandatory = False,