From 5af43b3bf82ae47c75092d8e84e93ebe6f4056a8 Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Mon, 11 Nov 2024 10:37:49 +0100 Subject: [PATCH] Add AVX512 BW info --- src/app/main.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index ce052562..d2fc93d0 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -35,6 +35,16 @@ #include #include +#if defined(ENABLE_MULTIARCH_AVX512_BW) + +namespace primesieve { + +bool has_cpuid_avx512_bw(); + +} // namespace + +#endif + #if defined(ENABLE_MULTIARCH_AVX512_VBMI2) namespace primesieve { @@ -233,12 +243,21 @@ void cpuInfo() else std::cout << "Logical CPU cores: unknown" << std::endl; + #if defined(ENABLE_MULTIARCH_AVX512_BW) + + if (primesieve::has_cpuid_avx512_bw()) + std::cout << "Has AVX512 BW: yes" << std::endl; + else + std::cout << "Has AVX512 BW: no" << std::endl; + + #endif + #if defined(ENABLE_MULTIARCH_AVX512_VBMI2) if (primesieve::has_cpuid_avx512_vbmi2()) - std::cout << "Has AVX512: yes" << std::endl; + std::cout << "Has AVX512 VBMI2: yes" << std::endl; else - std::cout << "Has AVX512: no" << std::endl; + std::cout << "Has AVX512 VBMI2: no" << std::endl; #endif