diff options
author | bunnei <bunneidev@gmail.com> | 2020-06-23 15:19:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-23 15:19:47 -0400 |
commit | 60da57b518ad712189b015c5d5afcba52446212e (patch) | |
tree | ca9e7918727594bc02968515d77f0a7a52ccc15a /src/common/x64/cpu_detect.cpp | |
parent | 2ce3aedda8981bdcb22f8d54957bee2ca843e1b4 (diff) | |
parent | 9bb5bf0b2bf62207c117f05aa76d0540b6e106fd (diff) |
Merge pull request #3948 from Morph1984/log-cpu-instructions
main/common: Log/append AVX/FMA to the Host CPU string if available and add AVX512 detection
Diffstat (limited to 'src/common/x64/cpu_detect.cpp')
-rw-r--r-- | src/common/x64/cpu_detect.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index c9349a6b4..f35dcb498 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -110,6 +110,11 @@ static CPUCaps Detect() { caps.bmi1 = true; if ((cpu_id[1] >> 8) & 1) caps.bmi2 = true; + // Checks for AVX512F, AVX512CD, AVX512VL, AVX512DQ, AVX512BW (Intel Skylake-X/SP) + if ((cpu_id[1] >> 16) & 1 && (cpu_id[1] >> 28) & 1 && (cpu_id[1] >> 31) & 1 && + (cpu_id[1] >> 17) & 1 && (cpu_id[1] >> 30) & 1) { + caps.avx512 = caps.avx2; + } } } |