PSystemInfo Class Reference

Detailed Description

The PSystemInfo class is an helper class to determine capabilities (CPU, RAM, GPU) of the host system.

Definition at line 27 of file PSystemInfo.h.

#include <PSystemInfo.h>

Member Function Documentation

◆ GetAllMACAddresses()

static PStringList PSystemInfo::GetAllMACAddresses ( )
static

Returns all the MAC addresses (non-loopback/non-adapter) network interfaces, sorted by lexicographical order.

◆ GetArchitecture()

static PString PSystemInfo::GetArchitecture ( )
static

Returns a string describing underlying architecture, including CPU architecture (arm, x86_64, etc), endianness (little or big endian) and word size.

◆ GetCPU()

static PString PSystemInfo::GetCPU ( )
static

Returns the CPU(s) installed on the computer.

◆ GetCPUInstructionSets()

static PString PSystemInfo::GetCPUInstructionSets ( )
static

Returns the instruction sets (comma separated list) supported by the CPU.

◆ GetCudaCompatibleGPU()

static int PSystemInfo::GetCudaCompatibleGPU ( papillon::int32  major,
papillon::int32  minor 
)
static

Returns the index of the first GPU compatible with CUDA with the specified compute capabilities.

Returns -1 if the system cannot find a compatible GPU.

◆ GetGPU()

static PString PSystemInfo::GetGPU ( )
static

Returns the GPU(s) installed on the computer.

First call to this method can take about 1 second.

◆ GetMACAddress()

static PString PSystemInfo::GetMACAddress ( )
static

Returns the MAC address of the first "Ethernet" (non-loopback/non-adapter) network interface.

◆ GetMemoryStatistics()

static void PSystemInfo::GetMemoryStatistics ( float &  currentMemoryUsageMB,
float &  peakMemoryUsageMB,
papillon::uint32 &  pageFaultCount 
)
static

Returns the memory statistics for the current process, including the current memory usage in MB and the peak memory usage.

◆ GetNVidiaDriverVersion()

static PResult PSystemInfo::GetNVidiaDriverVersion ( int &  major,
int &  minor 
)
static

Returns the version number of the NVidia driver, if any.

Returns PResult::C_OK if success, another result otherwise.

◆ GetOS()

static PString PSystemInfo::GetOS ( )
static

Returns the name of the underlying operating system, including version number.

◆ GetPhysicallyInstalledRAMInMB()

static int32 PSystemInfo::GetPhysicallyInstalledRAMInMB ( )
static

DEPRECATED: use PSystemInfo::GetTotalRAM() instead.

Returns the amount of RAM installed on the computer in mega-bytes, or -1 if failure.

◆ GetPrimaryScreenResolution()

static void PSystemInfo::GetPrimaryScreenResolution ( papillon::int32 &  width,
papillon::int32 &  height 
)
static

Returns the width and the height of the screen of the primary display monitor, in pixels.

◆ GetTotalRAM()

static int32 PSystemInfo::GetTotalRAM ( )
static

Returns the amount of RAM installed on the computer in mega-bytes, or -1 if failure.

◆ IsCudaCompatibleGPU()

static bool PSystemInfo::IsCudaCompatibleGPU ( papillon::int32  major,
papillon::int32  minor 
)
static

Returns true if CUDA library is installed and there is a nVidia GPU with minimum compute capabilities as specified (major.minor).

First call to this method can take about 1 second.

◆ Log()

static void PSystemInfo::Log ( )
static

Logs system information (OS, architecture, RAM, CPU, GPU).