aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/cpuid.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp
new file mode 100644
index 000000000..59940b500
--- /dev/null
+++ b/doc/examples/cpuid.cpp
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+#include <botan/cpuid.h>
+
+using namespace Botan;
+
+int main()
+ {
+ printf("Cache line size: %d\n", CPUID::cache_line_size());
+ printf("RDTSC: %d\n", CPUID::has_rdtsc());
+ printf("SSE2 %d\n", CPUID::has_sse2());
+ printf("SSSE3 %d\n", CPUID::has_ssse3());
+ printf("SSE41 %d\n", CPUID::has_sse41());
+ printf("SSE42 %d\n", CPUID::has_sse42());
+ }