CppCommon  1.0.4.1
C++ Common Library
Public Member Functions | Static Public Member Functions | List of all members
CppCommon::CPU Class Reference

CPU management static class. More...

#include <cpu.h>

Public Member Functions

 CPU ()=delete
 
 CPU (const CPU &)=delete
 
 CPU (CPU &&)=delete
 
 ~CPU ()=delete
 
CPUoperator= (const CPU &)=delete
 
CPUoperator= (CPU &&)=delete
 

Static Public Member Functions

static std::string Architecture ()
 CPU architecture string. More...
 
static int Affinity ()
 CPU affinity count. More...
 
static int LogicalCores ()
 CPU logical cores count. More...
 
static int PhysicalCores ()
 CPU physical cores count. More...
 
static std::pair< int, int > TotalCores ()
 CPU total cores count. More...
 
static int64_t ClockSpeed ()
 CPU clock speed in Hz. More...
 
static bool HyperThreading ()
 Is CPU Hyper-Threading enabled? More...
 

Detailed Description

CPU management static class.

Provides CPU management functionality such as architecture, cores count, clock speed, Hyper-Threading feature.

Thread-safe.

Definition at line 24 of file cpu.h.

Constructor & Destructor Documentation

◆ CPU() [1/3]

CppCommon::CPU::CPU ( )
delete

◆ CPU() [2/3]

CppCommon::CPU::CPU ( const CPU )
delete

◆ CPU() [3/3]

CppCommon::CPU::CPU ( CPU &&  )
delete

◆ ~CPU()

CppCommon::CPU::~CPU ( )
delete

Member Function Documentation

◆ Affinity()

int CppCommon::CPU::Affinity ( )
static

CPU affinity count.

Examples
system_cpu.cpp.

Definition at line 93 of file cpu.cpp.

◆ Architecture()

std::string CppCommon::CPU::Architecture ( )
static

CPU architecture string.

Examples
system_cpu.cpp.

Definition at line 50 of file cpu.cpp.

◆ ClockSpeed()

int64_t CppCommon::CPU::ClockSpeed ( )
static

CPU clock speed in Hz.

Examples
system_cpu.cpp.

Definition at line 197 of file cpu.cpp.

◆ HyperThreading()

bool CppCommon::CPU::HyperThreading ( )
static

Is CPU Hyper-Threading enabled?

Examples
system_cpu.cpp.

Definition at line 240 of file cpu.cpp.

◆ LogicalCores()

int CppCommon::CPU::LogicalCores ( )
static

CPU logical cores count.

Examples
system_cpu.cpp.

Definition at line 114 of file cpu.cpp.

◆ operator=() [1/2]

CPU& CppCommon::CPU::operator= ( const CPU )
delete

◆ operator=() [2/2]

CPU& CppCommon::CPU::operator= ( CPU &&  )
delete

◆ PhysicalCores()

int CppCommon::CPU::PhysicalCores ( )
static

CPU physical cores count.

Examples
system_cpu.cpp.

Definition at line 119 of file cpu.cpp.

◆ TotalCores()

std::pair< int, int > CppCommon::CPU::TotalCores ( )
static

CPU total cores count.

Definition at line 124 of file cpu.cpp.


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