|
Botan
2.13.0
Crypto and TLS for C++11
|
#include <cpuid.h>
Public Types | |
| enum | CPUID_bits : uint64_t { CPUID_INITIALIZED_BIT = (1ULL << 63) } |
Static Public Member Functions | |
| static std::vector< CPUID::CPUID_bits > | bit_from_string (const std::string &tok) |
| static size_t | cache_line_size () |
| static void | clear_cpuid_bit (CPUID_bits bit) |
| static bool | has_carryless_multiply () |
| static bool | has_cpuid_bit (CPUID_bits elem) |
| static bool | has_simd_32 () |
| static bool | has_vperm () |
| static void | initialize () |
| static bool | is_big_endian () |
| static bool | is_little_endian () |
| static void | print (std::ostream &o) |
| static std::string | to_string () |
A class handling runtime CPU feature detection. It is limited to just the features necessary to implement CPU specific code in Botan, rather than being a general purpose utility.
This class supports:
| enum Botan::CPUID::CPUID_bits : uint64_t |
|
static |
|
inlinestatic |
Return a best guess of the cache line size
Definition at line 68 of file cpuid.h.
Referenced by Botan::prefetch_readonly(), and Botan::prefetch_readwrite().
|
inlinestatic |
|
inlinestatic |
Check if the processor supports carryless multiply (CLMUL, PMULL)
Definition at line 341 of file cpuid.h.
Referenced by Botan::GHASH::provider().
|
inlinestatic |
|
static |
Definition at line 16 of file cpuid.cpp.
Referenced by Botan::Noekeon::decrypt_n(), Botan::SHACAL2::decrypt_n(), Botan::Serpent::decrypt_n(), Botan::Noekeon::encrypt_n(), Botan::SHACAL2::encrypt_n(), Botan::Serpent::encrypt_n(), Botan::SHACAL2::parallelism(), Botan::Noekeon::parallelism(), Botan::Noekeon::provider(), Botan::SHACAL2::provider(), Botan::Serpent::provider(), and Botan::ChaCha::provider().
|
inlinestatic |
Check if the processor supports byte-level vector permutes (SSSE3, NEON, Altivec)
Definition at line 324 of file cpuid.h.
Referenced by Botan::AES_128::decrypt_n(), Botan::AES_192::decrypt_n(), Botan::AES_256::decrypt_n(), Botan::AES_128::encrypt_n(), Botan::AES_192::encrypt_n(), and Botan::AES_256::encrypt_n().
|
static |
|
inlinestatic |
|
inlinestatic |
Definition at line 73 of file cpuid.h.
Referenced by Botan::XMSS_Tools::concat(), Botan::SIMD_4x32::load_be(), Botan::SIMD_4x32::store_be(), and Botan::SIMD_4x32::store_le().
|
static |
Deprecated equivalent to o << "CPUID flags: " << CPUID::to_string() << "\n";
Definition at line 82 of file cpuid.cpp.
References to_string().
|
static |
Return a possibly empty string containing list of known CPU extensions. Each name will be seperated by a space, and the ordering will be arbitrary. This list only contains values that are useful to Botan (for example FMA instructions are not checked).
Example outputs "sse2 ssse3 rdtsc", "neon arm_aes", "altivec"
Definition at line 30 of file cpuid.cpp.
References CPUID_PRINT, Botan::PKCS11::flags(), and Botan::string_join().
Referenced by print().
1.8.9.1