#include <iostream>
#include <z/system/cpuid.hpp>
int main() {
(
"CPU vendor: "_zs + hardware.
vendor()).writeln(std::cout);
(
"Thread count: "_zs + hardware.
cpus()).writeln(std::cout);
(
"Logical cores: "_zs + hardware.
cores()).writeln(std::cout);
return 0;
}
A class for easily getting CPU info.
Definition cpuid.hpp:10
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.