aboutsummaryrefslogtreecommitdiffstats
path: root/doc/examples/cpuid.cpp
diff options
context:
space:
mode:
authorlloyd <[email protected]>2011-04-04 03:43:52 +0000
committerlloyd <[email protected]>2011-04-04 03:43:52 +0000
commit3b9bfbd07c3723662832caf5b1efe04de28b656d (patch)
treeee2a9324f384efead6e5bb87ac8374e7e8734c90 /doc/examples/cpuid.cpp
parent04db054f1ae8de572ee9c0cfe227e76f84096bd6 (diff)
Convert most of the documentation to reStructured Text, adding
a makefile to build it with Sphinx (http://sphinx.pocoo.org/). Previously credits.txt listed public domain code sources; instead directly credit the authors in the relevant files and delete that file. Drop the draft FIPS 140 security policy; I can't imagine FIPS 140 validation will ever happen, and if it does, I don't want anything to do with it. Also drop the internals doc, which was so out of date (and incomplete) as to be worthless. Move the tutorials and InSiTo pdfs into old/ for the time being, until anything relevant from them can be filtered out and converted into RST.
Diffstat (limited to 'doc/examples/cpuid.cpp')
-rw-r--r--doc/examples/cpuid.cpp46
1 files changed, 0 insertions, 46 deletions
diff --git a/doc/examples/cpuid.cpp b/doc/examples/cpuid.cpp
deleted file mode 100644
index 6d4cc7593..000000000
--- a/doc/examples/cpuid.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-* (C) 2009 Jack Lloyd
-*
-* Distributed under the terms of the Botan license
-*/
-
-#include <iostream>
-#include <string>
-#include <botan/cpuid.h>
-
-using namespace Botan;
-
-namespace {
-
-void print_if_feature(const std::string& feature_name, bool exists)
- {
- std::cout << (exists ? '+' : '-') << " " << feature_name << "\n";
- }
-
-void print_header(const std::string& descr)
- {
- std::cout << "\n" << descr << "\n-----\n";
- }
-
-}
-
-int main()
- {
- CPUID::initialize();
-
- std::cout << "Cache line size = " << CPUID::cache_line_size() << "\n";
-
- print_header("SIMD instruction sets");
- print_if_feature("SSE2", CPUID::has_sse2());
- print_if_feature("SSSE3", CPUID::has_ssse3());
- print_if_feature("SSE4.1", CPUID::has_sse41());
- print_if_feature("SSE4.2", CPUID::has_sse42());
- print_if_feature("AVX", CPUID::has_avx());
- print_if_feature("AltiVec", CPUID::has_altivec());
-
- print_header("Other extensions");
- print_if_feature("RDTSC", CPUID::has_rdtsc());
- print_if_feature("PCMUL", CPUID::has_pcmuludq());
- print_if_feature("AES-NI", CPUID::has_aes_ni());
- print_if_feature("MOVBE", CPUID::has_movbe());
- }