libzed 1.9.9
A general-purpose library for quick and simple data manipulation.
 
Loading...
Searching...
No Matches
z::system::cpuid Class Reference

A class for easily getting CPU info. More...

#include <cpuid.hpp>

Public Member Functions

 cpuid () noexcept
 Constructor.
 
const core::string< ascii > & vendor () noexcept
 Get the CPU vendor.
 
int cpus () noexcept
 Get the number of CPUs.
 
int cores () noexcept
 Get the number of cores.
 

Detailed Description

A class for easily getting CPU info.

Examples
cpu.cpp.

Member Function Documentation

◆ cores()

int z::system::cpuid::cores ( )
noexcept

Get the number of cores.

Returns
The number of individual cores on this machine.
Re-Entry: This member function is thread-safe. Simultaneous calls will not cause data races, and any other thread-safe member may be called concurrently without interfering.
Examples
cpu.cpp.

◆ cpus()

int z::system::cpuid::cpus ( )
noexcept

Get the number of CPUs.

Returns
The number of CPUs on this machine.
Re-Entry: This member function is thread-safe. Simultaneous calls will not cause data races, and any other thread-safe member may be called concurrently without interfering.
Examples
cpu.cpp.

◆ vendor()

const core::string< ascii > & z::system::cpuid::vendor ( )
noexcept

Get the CPU vendor.

Returns
A string containing the vendor CPU id.
Re-Entry: This member function is thread-safe. Simultaneous calls will not cause data races, and any other thread-safe member may be called concurrently without interfering.
Examples
cpu.cpp.

The documentation for this class was generated from the following file: