aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/cpuid.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-09-29 20:14:35 +0000
committerlloyd <[email protected]>2009-09-29 20:14:35 +0000
commit25fad1ac3bab1c8ed04673b223946e2510c93da9 (patch)
treedfe293dc6525542992856bf28b4c49adec232d79 /doc/examples/cpuid.cpp
parent10195a560c12f89f23c7cc9a0a24e891a1ec91aa (diff)
Significantly rework CPUID support. Add cache line detection
Diffstat (limited to 'doc/examples/cpuid.cpp')
-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());
+ }