diff options
author | lloyd <[email protected]> | 2009-09-29 20:14:35 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-09-29 20:14:35 +0000 |
commit | 25fad1ac3bab1c8ed04673b223946e2510c93da9 (patch) | |
tree | dfe293dc6525542992856bf28b4c49adec232d79 /doc/examples/cpuid.cpp | |
parent | 10195a560c12f89f23c7cc9a0a24e891a1ec91aa (diff) |
Significantly rework CPUID support. Add cache line detection
Diffstat (limited to 'doc/examples/cpuid.cpp')
-rw-r--r-- | doc/examples/cpuid.cpp | 15 |
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()); + } |