jaulib v1.3.6
Jau Support Library (C++, Java, ..)
Loading...
Searching...
No Matches
cpuid.cpp File Reference
#include <cstring>
#include <string>
#include <cstdlib>
#include <thread>
#include <jau/cpuid.hpp>
#include <jau/byte_util.hpp>
#include <jau/debug.hpp>
#include <jau/os/os_support.hpp>
#include <unistd.h>
Include dependency graph for cpuid.cpp:

Go to the source code of this file.

Functions

template<typename T>
static void append_bitstr (std::string &out, T mask, T bit, const std::string &bitstr, bool &comma)
 
static bool get_arm32_hwcap (arm32_hwcap1_t &hwcap1, arm32_hwcap2_t &hwcap2) noexcept
 
static bool get_arm64_hwcap (arm64_hwcap_t &hwcap) noexcept
 
static bool get_cache_line_size (size_t &l1_share_max, size_t &l1_apart_min) noexcept
 
static size_t get_concurrent_thread_count () noexcept
 
static cpu_family_t get_cpu_family () noexcept
 Returns cpu_family derived from Architectures predefined compiler macros.
 
static size_t get_page_size () noexcept
 
static size_t get_sys_max_core_count () noexcept
 
static size_t get_sys_online_core_count () noexcept
 

Function Documentation

◆ get_cache_line_size()

static bool get_cache_line_size ( size_t & l1_share_max,
size_t & l1_apart_min )
staticnoexcept

Definition at line 49 of file cpuid.cpp.

◆ get_page_size()

static size_t get_page_size ( )
staticnoexcept

Definition at line 61 of file cpuid.cpp.

◆ get_concurrent_thread_count()

static size_t get_concurrent_thread_count ( )
staticnoexcept

Definition at line 72 of file cpuid.cpp.

◆ get_sys_online_core_count()

static size_t get_sys_online_core_count ( )
staticnoexcept

Definition at line 76 of file cpuid.cpp.

◆ get_sys_max_core_count()

static size_t get_sys_max_core_count ( )
staticnoexcept

Definition at line 97 of file cpuid.cpp.

◆ append_bitstr()

template<typename T>
static void append_bitstr ( std::string & out,
T mask,
T bit,
const std::string & bitstr,
bool & comma )
static

Definition at line 119 of file cpuid.cpp.

◆ get_cpu_family()

static cpu_family_t get_cpu_family ( )
staticnoexcept

Returns cpu_family derived from Architectures predefined compiler macros.

Consider using singleton CpuInfo.

Definition at line 127 of file cpuid.cpp.

Here is the caller graph for this function:

◆ get_arm32_hwcap()

static bool get_arm32_hwcap ( arm32_hwcap1_t & hwcap1,
arm32_hwcap2_t & hwcap2 )
staticnoexcept

Definition at line 224 of file cpuid.cpp.

◆ get_arm64_hwcap()

static bool get_arm64_hwcap ( arm64_hwcap_t & hwcap)
staticnoexcept

Definition at line 246 of file cpuid.cpp.