jaulib v1.3.0
Jau Support Library (C++, Java, ..)
Classes | Enumerations | Functions
jau::cpu Namespace Reference

Classes

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

Enumerations

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

Functions

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