jaulib v1.3.8
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
System and OS Utilities

System and OS related types and functionality. More...

Classes

class  jau::cpu::CpuInfo
 Singleton CpuInfo caching all jau::cpu information. More...
 
class  jau::environment
 Main jau environment class, supporting environment variable access and fetching elapsed time using its stored startup-time. More...
 
class  jau::root_environment
 Base jau environment class, merely to tag all environment settings by inheritance and hence documentation. More...
 

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
 
 jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING (arm32_hwcap1_t, swp, half, thumb, bits26, fmult, fpa, vfp, edsp, java, iwmmxt, crunch, thumbee, neon, vfp_v3, vfp_v3_d16, tls, vfp_v4, idiva, idivt, vfp_d32, lpae, evtstrm)
 
 jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING (arm32_hwcap2_t, aes, pmull, sha1, sha2, crc32)
 
 jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING (arm64_hwcap_t, fp, asimd, evtstrm, aes, pmull, sha1, sha2, crc32, atomics, fphp, asimdhp, cpuid, asimdrdm, jscvt, fcma, lrcpc, dcpop, sha3, sm3, sm4, asimddp, sha512, sve, asimdfhm, dit, uscat, ilrcpc, flagm, ssbs, sb, paca, pacg)
 
 jau::cpu::JAU_MAKE_ENUM_STRING (cpu_family_t, arm32, arm64, x86_32, x86_64, ia64, ppc32, ppc64, sparc32, sparc64, mips32, mips64, superh32, superh64, wasm32, wasm64)
 
constexpr size_t jau::cpu::pointer_bit_size () noexcept
 Returns the compile time pointer architecture size in bits.
 

Detailed Description

System and OS related types and functionality.

Enumeration Type Documentation

◆ cpu_family_t

enum class jau::cpu::cpu_family_t : uint16_t
strong
Enumerator
none 

Undefined.

arm32 

ARM 32bit.

arm64 

ARM 64bit.

x86_32 

AMD/Intel 32-bit.

x86_64 

AMD/Intel 64-bit.

ia64 

Itanium.

ppc32 

Power PC 32bit.

ppc64 

Power PC 32bit.

sparc32 

SPARC 32bit.

sparc64 

SPARC 32bit.

mips32 

Mips 32bit.

mips64 

Mips 64bit.

superh32 

Hitachi SuperH 32bit.

superh64 

Hitachi SuperH 64bit.

wasm32 

WebAssembly 32-bit.

wasm64 

WebAssembly 64-bit.

Definition at line 50 of file cpuid.hpp.

◆ arm32_hwcap1_t

enum class jau::cpu::arm32_hwcap1_t : uint64_t
strong
Enumerator
none 
swp 
half 
thumb 
bits26 
fmult 
fpa 
vfp 
edsp 
java 
iwmmxt 
crunch 
thumbee 
neon 
vfp_v3 
vfp_v3_d16 
tls 
vfp_v4 
idiva 
idivt 
vfp_d32 
lpae 
evtstrm 
at_hwcap_1 

Definition at line 94 of file cpuid.hpp.

◆ arm32_hwcap2_t

enum class jau::cpu::arm32_hwcap2_t : uint64_t
strong
Enumerator
none 
aes 
pmull 
sha1 
sha2 
crc32 
at_hwcap_2 

Definition at line 125 of file cpuid.hpp.

◆ arm64_hwcap_t

enum class jau::cpu::arm64_hwcap_t : uint64_t
strong
Enumerator
none 
fp 
asimd 
evtstrm 
aes 
pmull 
sha1 
sha2 
crc32 
atomics 
fphp 
asimdhp 
cpuid 
asimdrdm 
jscvt 
fcma 
lrcpc 
dcpop 
sha3 
sm3 
sm4 
asimddp 
sha512 
sve 
asimdfhm 
dit 
uscat 
ilrcpc 
flagm 
ssbs 
sb 
paca 
pacg 
at_hwcap 

Definition at line 137 of file cpuid.hpp.

Function Documentation

◆ pointer_bit_size()

size_t jau::cpu::pointer_bit_size ( )
constexprnoexcept

Returns the compile time pointer architecture size in bits.

e.g. 64-bit for LP64 and 32-bit for LP32.

Implementations uses sizeof(void*), i.e. the address bus size, the common denominator across all LP64, ILP64 and LLP64 for 64-bit.

Definition at line 48 of file cpuid.hpp.

Here is the caller graph for this function:

◆ JAU_MAKE_ENUM_STRING()

jau::cpu::JAU_MAKE_ENUM_STRING ( cpu_family_t ,
arm32 ,
arm64 ,
x86_32 ,
x86_64 ,
ia64 ,
ppc32 ,
ppc64 ,
sparc32 ,
sparc64 ,
mips32 ,
mips64 ,
superh32 ,
superh64 ,
wasm32 ,
wasm64  )

◆ JAU_MAKE_BITFIELD_ENUM_STRING() [1/3]

jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING ( arm32_hwcap1_t ,
swp ,
half ,
thumb ,
bits26 ,
fmult ,
fpa ,
vfp ,
edsp ,
java ,
iwmmxt ,
crunch ,
thumbee ,
neon ,
vfp_v3 ,
vfp_v3_d16 ,
tls ,
vfp_v4 ,
idiva ,
idivt ,
vfp_d32 ,
lpae ,
evtstrm  )

◆ JAU_MAKE_BITFIELD_ENUM_STRING() [2/3]

jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING ( arm32_hwcap2_t ,
aes ,
pmull ,
sha1 ,
sha2 ,
crc32  )

◆ JAU_MAKE_BITFIELD_ENUM_STRING() [3/3]

jau::cpu::JAU_MAKE_BITFIELD_ENUM_STRING ( arm64_hwcap_t ,
fp ,
asimd ,
evtstrm ,
aes ,
pmull ,
sha1 ,
sha2 ,
crc32 ,
atomics ,
fphp ,
asimdhp ,
cpuid ,
asimdrdm ,
jscvt ,
fcma ,
lrcpc ,
dcpop ,
sha3 ,
sm3 ,
sm4 ,
asimddp ,
sha512 ,
sve ,
asimdfhm ,
dit ,
uscat ,
ilrcpc ,
flagm ,
ssbs ,
sb ,
paca ,
pacg  )

◆ get_cpu_info() [1/2]

std::string jau::cpu::get_cpu_info ( std::string & sb)
inlinenoexcept

Definition at line 235 of file cpuid.hpp.

◆ get_cpu_info() [2/2]

std::string jau::cpu::get_cpu_info ( )
inlinenoexcept

Definition at line 238 of file cpuid.hpp.