jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Classes | Namespaces | Enumerations | Functions
cpuid.hpp File Reference
#include <jau/byte_util.hpp>
#include <string>
Include dependency graph for cpuid.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  jau::cpu::CpuInfo
 Singleton CpuInfo caching all jau::cpu information. More...
 

Namespaces

namespace  jau
 __pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
 
namespace  jau::cpu
 

Enumerations

enum class  jau::cpu::arm32_hwcap1_t : uint64_t {
  jau::cpu::arm32_hwcap1_t::none = 0 , jau::cpu::arm32_hwcap1_t::swp = (1 << 0) , jau::cpu::arm32_hwcap1_t::half = (1 << 1) , jau::cpu::arm32_hwcap1_t::thumb = (1 << 2) ,
  jau::cpu::arm32_hwcap1_t::bits26 = (1 << 3) , jau::cpu::arm32_hwcap1_t::fmult = (1 << 4) , jau::cpu::arm32_hwcap1_t::fpa = (1 << 5) , jau::cpu::arm32_hwcap1_t::vfp = (1 << 6) ,
  jau::cpu::arm32_hwcap1_t::edsp = (1 << 7) , jau::cpu::arm32_hwcap1_t::java = (1 << 8) , jau::cpu::arm32_hwcap1_t::iwmmxt = (1 << 9) , jau::cpu::arm32_hwcap1_t::crunch = (1 << 10) ,
  jau::cpu::arm32_hwcap1_t::thumbee = (1 << 11) , jau::cpu::arm32_hwcap1_t::neon = (1 << 12) , jau::cpu::arm32_hwcap1_t::vfp_v3 = (1 << 13) , jau::cpu::arm32_hwcap1_t::vfp_v3_d16 = (1 << 14) ,
  jau::cpu::arm32_hwcap1_t::tls = (1 << 15) , jau::cpu::arm32_hwcap1_t::vfp_v4 = (1 << 16) , jau::cpu::arm32_hwcap1_t::idiva = (1 << 17) , jau::cpu::arm32_hwcap1_t::idivt = (1 << 18) ,
  jau::cpu::arm32_hwcap1_t::vfp_d32 = (1 << 19) , jau::cpu::arm32_hwcap1_t::lpae = (1 << 20) , jau::cpu::arm32_hwcap1_t::evtstrm = (1 << 21) , jau::cpu::arm32_hwcap1_t::at_hwcap_1 = 16
}
 
enum class  jau::cpu::arm32_hwcap2_t : uint64_t {
  jau::cpu::arm32_hwcap2_t::none = 0 , jau::cpu::arm32_hwcap2_t::aes = (1 << 0) , jau::cpu::arm32_hwcap2_t::pmull = (1 << 1) , jau::cpu::arm32_hwcap2_t::sha1 = (1 << 2) ,
  jau::cpu::arm32_hwcap2_t::sha2 = (1 << 3) , jau::cpu::arm32_hwcap2_t::crc32 = (1 << 4) , jau::cpu::arm32_hwcap2_t::at_hwcap_2 = 26
}
 
enum class  jau::cpu::arm64_hwcap_t : uint64_t {
  jau::cpu::arm64_hwcap_t::none = 0 , jau::cpu::arm64_hwcap_t::fp = (1 << 0) , jau::cpu::arm64_hwcap_t::asimd = (1 << 1) , jau::cpu::arm64_hwcap_t::evtstrm = (1 << 2) ,
  jau::cpu::arm64_hwcap_t::aes = (1 << 3) , jau::cpu::arm64_hwcap_t::pmull = (1 << 4) , jau::cpu::arm64_hwcap_t::sha1 = (1 << 5) , jau::cpu::arm64_hwcap_t::sha2 = (1 << 6) ,
  jau::cpu::arm64_hwcap_t::crc32 = (1 << 7) , jau::cpu::arm64_hwcap_t::atomics = (1 << 8) , jau::cpu::arm64_hwcap_t::fphp = (1 << 9) , jau::cpu::arm64_hwcap_t::asimdhp = (1 << 10) ,
  jau::cpu::arm64_hwcap_t::cpuid = (1 << 11) , jau::cpu::arm64_hwcap_t::asimdrdm = (1 << 12) , jau::cpu::arm64_hwcap_t::jscvt = (1 << 13) , jau::cpu::arm64_hwcap_t::fcma = (1 << 14) ,
  jau::cpu::arm64_hwcap_t::lrcpc = (1 << 15) , jau::cpu::arm64_hwcap_t::dcpop = (1 << 16) , jau::cpu::arm64_hwcap_t::sha3 = (1 << 17) , jau::cpu::arm64_hwcap_t::sm3 = (1 << 18) ,
  jau::cpu::arm64_hwcap_t::sm4 = (1 << 19) , jau::cpu::arm64_hwcap_t::asimddp = (1 << 20) , jau::cpu::arm64_hwcap_t::sha512 = (1 << 21) , jau::cpu::arm64_hwcap_t::sve = (1 << 22) ,
  jau::cpu::arm64_hwcap_t::asimdfhm = (1 << 23) , jau::cpu::arm64_hwcap_t::dit = (1 << 24) , jau::cpu::arm64_hwcap_t::uscat = (1 << 25) , jau::cpu::arm64_hwcap_t::ilrcpc = (1 << 26) ,
  jau::cpu::arm64_hwcap_t::flagm = (1 << 27) , jau::cpu::arm64_hwcap_t::ssbs = (1 << 28) , jau::cpu::arm64_hwcap_t::sb = (1 << 29) , jau::cpu::arm64_hwcap_t::paca = (1 << 30) ,
  jau::cpu::arm64_hwcap_t::pacg = (1UL << 31) , jau::cpu::arm64_hwcap_t::at_hwcap = 16
}
 
enum class  jau::cpu::cpu_family_t : uint16_t {
  jau::cpu::cpu_family_t::none = 0 , jau::cpu::cpu_family_t::arm32 = 1 , jau::cpu::cpu_family_t::arm64 = 2 , jau::cpu::cpu_family_t::x86_32 = 10 ,
  jau::cpu::cpu_family_t::x86_64 = 11 , jau::cpu::cpu_family_t::ia64 = 12 , jau::cpu::cpu_family_t::ppc32 = 20 , jau::cpu::cpu_family_t::ppc64 = 21 ,
  jau::cpu::cpu_family_t::sparc32 = 30 , jau::cpu::cpu_family_t::sparc64 = 31 , jau::cpu::cpu_family_t::mips32 = 40 , jau::cpu::cpu_family_t::mips64 = 41 ,
  jau::cpu::cpu_family_t::superh32 = 50 , jau::cpu::cpu_family_t::superh64 = 51 , jau::cpu::cpu_family_t::wasm32 = 60 , jau::cpu::cpu_family_t::wasm64 = 61
}
 

Functions

std::string jau::cpu::get_cpu_info () noexcept
 
std::string jau::cpu::get_cpu_info (std::string &sb) noexcept
 
constexpr bool jau::cpu::is_set (const arm32_hwcap1_t mask, const arm32_hwcap1_t bit) noexcept
 
constexpr bool jau::cpu::is_set (const arm32_hwcap2_t mask, const arm32_hwcap2_t bit) noexcept
 
constexpr bool jau::cpu::is_set (const arm64_hwcap_t mask, const arm64_hwcap_t bit) noexcept
 
constexpr bool jau::cpu::is_set (const cpu_family_t mask, const cpu_family_t bit) noexcept
 
constexpr uint64_t jau::cpu::number (const arm32_hwcap1_t rhs) noexcept
 
constexpr uint64_t jau::cpu::number (const arm32_hwcap2_t rhs) noexcept
 
constexpr uint64_t jau::cpu::number (const arm64_hwcap_t rhs) noexcept
 
constexpr uint16_t jau::cpu::number (const cpu_family_t rhs) noexcept
 
constexpr bool jau::cpu::operator!= (const arm32_hwcap1_t lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr bool jau::cpu::operator!= (const arm32_hwcap2_t lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr bool jau::cpu::operator!= (const arm64_hwcap_t lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr bool jau::cpu::operator!= (const cpu_family_t lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t jau::cpu::operator& (const arm32_hwcap1_t lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t jau::cpu::operator& (const arm32_hwcap2_t lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t jau::cpu::operator& (const arm64_hwcap_t lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t jau::cpu::operator& (const cpu_family_t lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t & jau::cpu::operator&= (arm32_hwcap1_t &lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t & jau::cpu::operator&= (arm32_hwcap2_t &lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t & jau::cpu::operator&= (arm64_hwcap_t &lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t & jau::cpu::operator&= (cpu_family_t &lhs, const cpu_family_t rhs) noexcept
 
constexpr bool jau::cpu::operator== (const arm32_hwcap1_t lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr bool jau::cpu::operator== (const arm32_hwcap2_t lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr bool jau::cpu::operator== (const arm64_hwcap_t lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr bool jau::cpu::operator== (const cpu_family_t lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t jau::cpu::operator^ (const arm32_hwcap1_t lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t jau::cpu::operator^ (const arm32_hwcap2_t lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t jau::cpu::operator^ (const arm64_hwcap_t lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t jau::cpu::operator^ (const cpu_family_t lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t & jau::cpu::operator^= (arm32_hwcap1_t &lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t & jau::cpu::operator^= (arm32_hwcap2_t &lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t & jau::cpu::operator^= (arm64_hwcap_t &lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t & jau::cpu::operator^= (cpu_family_t &lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t jau::cpu::operator| (const arm32_hwcap1_t lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t jau::cpu::operator| (const arm32_hwcap2_t lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t jau::cpu::operator| (const arm64_hwcap_t lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t jau::cpu::operator| (const cpu_family_t lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t & jau::cpu::operator|= (arm32_hwcap1_t &lhs, const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t & jau::cpu::operator|= (arm32_hwcap2_t &lhs, const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t & jau::cpu::operator|= (arm64_hwcap_t &lhs, const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t & jau::cpu::operator|= (cpu_family_t &lhs, const cpu_family_t rhs) noexcept
 
constexpr arm32_hwcap1_t jau::cpu::operator~ (const arm32_hwcap1_t rhs) noexcept
 
constexpr arm32_hwcap2_t jau::cpu::operator~ (const arm32_hwcap2_t rhs) noexcept
 
constexpr arm64_hwcap_t jau::cpu::operator~ (const arm64_hwcap_t rhs) noexcept
 
constexpr cpu_family_t jau::cpu::operator~ (const cpu_family_t rhs) noexcept
 
constexpr size_t jau::cpu::pointer_bit_size () noexcept
 Returns the compile time pointer architecture size in bits. More...
 
std::string jau::cpu::to_string (const arm32_hwcap1_t hwcaps) noexcept
 
std::string jau::cpu::to_string (const arm32_hwcap2_t hwcaps) noexcept
 
std::string jau::cpu::to_string (const arm64_hwcap_t hwcaps) noexcept
 
std::string jau::cpu::to_string (const cpu_family_t v) noexcept