90 return static_cast<uint16_t
>(rhs);
120 return !( lhs == rhs );
123 return bit == ( mask & bit );
155 return static_cast<uint64_t
>(rhs);
185 return !( lhs == rhs );
188 return bit == ( mask & bit );
203 return static_cast<uint64_t
>(rhs);
233 return !( lhs == rhs );
236 return bit == ( mask & bit );
278 return static_cast<uint64_t
>(rhs);
308 return !( lhs == rhs );
311 return bit == ( mask & bit );
366 std::string
toString(std::string& sb,
bool details_only=
false) const noexcept;
Singleton CpuInfo caching all jau::cpu information.
size_t pointer_bits
See pointer_bit_size()
size_t sys_online_cores
Number of available/online cores from system call.
static const CpuInfo & get() noexcept
Returns reference to const singleton instance.
std::string toString() const noexcept
size_t l1_apart_min
Minimum offset between two objects to avoid false sharing if has_l1_minmax, or zero.
size_t online_core_count() const noexcept
Returns maximum number of available/online cores, i.e.
cpu_family_t family
cpu_family_t derived from Architectures predefined compiler macros.
bool has_l1_minmax
True if successfully queried l1_share_max and l1_apart_min.
arm32_hwcap1_t arm32_hwcap1
arm32_hwcap1_t info if available, i.e.
std::string toString(std::string &sb, bool details_only=false) const noexcept
bool has_arm32_hwcap
True if successfully queried arm32_hwcap1 and arm32_hwcap1 on cpu_family_t::arm32.
size_t sys_max_cores
Number of installed/configured cores from system call.
size_t page_size
Size of a page in bytes or zero if not available.
arm64_hwcap_t arm64_hwcap
arm64_hwcap_t info if available, i.e.
size_t l1_share_max
Maximum size of contiguous memory to promote true sharing if has_l1_minmax, or zero.
bool has_arm64_hwcap
True if successfully queried arm64_hwcap on cpu_family_t::arm64.
arm32_hwcap2_t arm32_hwcap2
arm32_hwcap2_t info if available, i.e.
size_t concurrent_threads
Number of available concurrent threads (cores) or zero if information is not available,...
endian_t
Endian identifier, indicating endianess of all scalar types.
constexpr T max(const T x, const T y) noexcept
Returns the maximum of two integrals (w/ branching) in O(1)
constexpr cpu_family_t & operator^=(cpu_family_t &lhs, const cpu_family_t rhs) noexcept
constexpr cpu_family_t operator&(const cpu_family_t lhs, const cpu_family_t rhs) noexcept
constexpr bool operator!=(const cpu_family_t lhs, const cpu_family_t rhs) noexcept
std::string to_string(const cpu_family_t v) noexcept
constexpr cpu_family_t operator~(const cpu_family_t rhs) noexcept
constexpr bool operator==(const cpu_family_t lhs, const cpu_family_t rhs) noexcept
constexpr size_t pointer_bit_size() noexcept
Returns the compile time pointer architecture size in bits.
constexpr bool is_set(const cpu_family_t mask, const cpu_family_t bit) noexcept
constexpr cpu_family_t operator|(const cpu_family_t lhs, const cpu_family_t rhs) noexcept
constexpr cpu_family_t & operator|=(cpu_family_t &lhs, const cpu_family_t rhs) noexcept
constexpr uint16_t number(const cpu_family_t rhs) noexcept
constexpr cpu_family_t & operator&=(cpu_family_t &lhs, const cpu_family_t rhs) noexcept
std::string get_cpu_info(std::string &sb) noexcept
constexpr cpu_family_t operator^(const cpu_family_t lhs, const cpu_family_t rhs) noexcept
@ x86_64
AMD/Intel 64-bit.
@ x86_32
AMD/Intel 32-bit.
@ wasm64
WebAssembly 64-bit.
@ superh32
Hitachi SuperH 32bit.
@ superh64
Hitachi SuperH 64bit.
@ wasm32
WebAssembly 32-bit.