avx512 fat runtime support: experimental

This commit is contained in:
Matthew Barr
2016-12-14 11:47:28 +11:00
parent 91db20d8eb
commit ec7869711f
5 changed files with 59 additions and 20 deletions

View File

@@ -133,13 +133,12 @@ int check_avx2(void) {
#endif
}
static
int check_avx512(void) {
/*
* For our purposes, having avx512 really means "can we use AVX512BW?"
*/
#if defined(__INTEL_COMPILER)
return _may_i_use_cpu_feature(_FEATURE_AVX512BW);
return _may_i_use_cpu_feature(_FEATURE_AVX512BW | _FEATURE_AVX512VL);
#else
unsigned int eax, ebx, ecx, edx;

View File

@@ -41,6 +41,7 @@ u64a cpuid_flags(void);
u32 cpuid_tune(void);
int check_avx512(void);
int check_avx2(void);
int check_ssse3(void);
int check_sse42(void);