ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cloudViewer::utility::CPUInfo Class Reference

CPU information. More...

#include <CPUInfo.h>

Classes

struct  Impl
 

Public Member Functions

 ~CPUInfo ()=default
 
 CPUInfo (const CPUInfo &)=delete
 
void operator= (const CPUInfo &)=delete
 
int NumCores () const
 
int NumThreads () const
 
const std::string & ModelName () const
 
void Print () const
 Prints CPUInfo in the console. More...
 

Static Public Member Functions

static CPUInfoGetInstance ()
 

Detailed Description

CPU information.

Definition at line 19 of file CPUInfo.h.

Constructor & Destructor Documentation

◆ ~CPUInfo()

cloudViewer::utility::CPUInfo::~CPUInfo ( )
default

◆ CPUInfo()

cloudViewer::utility::CPUInfo::CPUInfo ( const CPUInfo )
delete

Member Function Documentation

◆ GetInstance()

CPUInfo & cloudViewer::utility::CPUInfo::GetInstance ( )
static

Definition at line 174 of file CPUInfo.cpp.

Referenced by cloudViewer::utility::EstimateMaxThreads(), GetCPUInfo(), and main().

◆ ModelName()

const std::string & cloudViewer::utility::CPUInfo::ModelName ( ) const

Returns the CPU model name/brand string. Returns empty string if not available.

Definition at line 183 of file CPUInfo.cpp.

Referenced by GetCPUInfo().

◆ NumCores()

int cloudViewer::utility::CPUInfo::NumCores ( ) const

Returns the number of physical CPU cores. This is similar to boost::thread::physical_concurrency().

Definition at line 179 of file CPUInfo.cpp.

Referenced by cloudViewer::utility::EstimateMaxThreads(), and GetCPUInfo().

◆ NumThreads()

int cloudViewer::utility::CPUInfo::NumThreads ( ) const

Returns the number of logical CPU cores. This returns the same result as std::thread::hardware_concurrency() or boost::thread::hardware_concurrency().

Definition at line 181 of file CPUInfo.cpp.

Referenced by GetCPUInfo().

◆ operator=()

void cloudViewer::utility::CPUInfo::operator= ( const CPUInfo )
delete

◆ Print()

void cloudViewer::utility::CPUInfo::Print ( ) const

Prints CPUInfo in the console.

Definition at line 185 of file CPUInfo.cpp.

References LogInfo.

Referenced by main().


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