libzed 1.12.3
A general-purpose library for quick and simple data manipulation.
Loading...
Searching...
No Matches
cpuid.hpp
1#pragma once
2
3#include "../core/string.hpp"
4
5namespace z {
6namespace system {
10class cpuid {
11private:
12 bool good;
13
14 core::string<ascii> _vendor;
15 int _cpus;
16 int _cores;
17 int _threads;
18 uint32_t _cpuFeatures;
19 bool _allow_smt;
20
21 void det_vendor() noexcept;
22 void det_cpu() noexcept;
23
24public:
28 cpuid() noexcept;
29
37 const core::string<ascii> &vendor() noexcept;
38
46 int cpus() noexcept;
47
55 int cores() noexcept;
56};
57} // namespace system
58} // namespace z
A template class for character strings.
Definition string.hpp:62
const core::string< ascii > & vendor() noexcept
Get the CPU vendor.
cpuid() noexcept
Constructor.
int cpus() noexcept
Get the number of CPUs.
int cores() noexcept
Get the number of cores.
Section containing core functions and classes.
This section contains classes and functions relating to system info.