diff options
author | lloyd <[email protected]> | 2013-12-25 07:16:42 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2013-12-25 07:16:42 +0000 |
commit | 4df481d89ddbfe7bc4b29875762ec200e6986dfd (patch) | |
tree | e152b081a4a76a5fd4180a5163716f8568e0bdab /src/utils/cpuid.h | |
parent | 2d08403fba517571ee1959c39664ffa63357b8f3 (diff) |
Add CPUID check for AVX-512
Diffstat (limited to 'src/utils/cpuid.h')
-rw-r--r-- | src/utils/cpuid.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/cpuid.h b/src/utils/cpuid.h index eaf1c1330..008605e0c 100644 --- a/src/utils/cpuid.h +++ b/src/utils/cpuid.h @@ -65,6 +65,12 @@ class BOTAN_DLL CPUID { return x86_processor_flags_has(CPUID_AVX2_BIT); } /** + * Check if the processor supports AVX-512F + */ + static bool has_avx512f() + { return x86_processor_flags_has(CPUID_AVX512F_BIT); } + + /** * Check if the processor supports BMI2 */ static bool has_bmi2() @@ -123,6 +129,7 @@ class BOTAN_DLL CPUID CPUID_AVX2_BIT = 64+5, CPUID_BMI2_BIT = 64+8, + CPUID_AVX512F_BIT = 64+16, CPUID_RDSEED_BIT = 64+18, CPUID_ADX_BIT = 64+19, CPUID_SHA_BIT = 64+29, |