Skip to content

Commit

Permalink
Add AVX512 BW info
Browse files Browse the repository at this point in the history
  • Loading branch information
kimwalisch committed Nov 11, 2024
1 parent 103eb95 commit 5af43b3
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
#include <sstream>
#include <string>

#if defined(ENABLE_MULTIARCH_AVX512_BW)

namespace primesieve {

bool has_cpuid_avx512_bw();

} // namespace

#endif

#if defined(ENABLE_MULTIARCH_AVX512_VBMI2)

namespace primesieve {
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 5af43b3

Please sign in to comment.