-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d00ab3
commit 4ffaf46
Showing
5 changed files
with
54 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/// | ||
/// @file cpu_supports_avx512_bmi2.hpp | ||
/// @file cpu_supports_avx512_vpopcnt.hpp | ||
/// @brief Detect if the x86 CPU supports AVX512 and BMI2. | ||
/// | ||
/// Copyright (C) 2024 Kim Walisch, <[email protected]> | ||
|
@@ -8,19 +8,19 @@ | |
/// file in the top level directory. | ||
/// | ||
|
||
#ifndef CPU_SUPPORTS_AVX512_BMI2_HPP | ||
#define CPU_SUPPORTS_AVX512_BMI2_HPP | ||
#ifndef CPU_SUPPORTS_AVX512_VPOPCNT_HPP | ||
#define CPU_SUPPORTS_AVX512_VPOPCNT_HPP | ||
|
||
namespace primecount { | ||
|
||
bool has_cpuid_avx512_bmi2(); | ||
bool has_cpuid_avx512_vpopcnt(); | ||
|
||
} // namespace | ||
|
||
namespace { | ||
|
||
/// Initialized at startup | ||
const bool cpu_supports_avx512_bmi2 = primecount::has_cpuid_avx512_bmi2(); | ||
const bool cpu_supports_avx512_vpopcnt = primecount::has_cpuid_avx512_vpopcnt(); | ||
|
||
} // namespace | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters