aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/cpuid.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'doc/examples/cpuid.cpp')
-rw-r--r--doc/examples/cpuid.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp
index f4d441ba2..3693257b8 100644
--- a/doc/examples/cpuid.cpp
+++ b/doc/examples/cpuid.cpp
@@ -13,16 +13,15 @@ namespace {
void print_if_feature(const std::string& feature_name, bool exists)
{
- if(exists)
- std::cout << feature_name << '\n';
- else
- std::cout << '[' << feature_name << ']' << '\n';
+ std::cout << (exists ? '+' : '-') << " " << feature_name << "\n";
}
}
int main()
{
+ CPUID::initialize();
+
std::cout << "Cache line size = " << CPUID::cache_line_size() << "\n";
print_if_feature("RDTSC", CPUID::has_rdtsc());
@@ -32,7 +31,9 @@ int main()
print_if_feature("SSE4.2", CPUID::has_sse42());
print_if_feature("AVX", CPUID::has_avx());
- print_if_feature("AES-NI", CPUID::has_aes_intel());
+ print_if_feature("MOVBE", CPUID::has_movbe());
+ print_if_feature("PCMUL", CPUID::has_pcmuludq());
+ print_if_feature("AES-NI", CPUID::has_aes_ni());
print_if_feature("AltiVec", CPUID::has_altivec());
}