MuldeR's Utilities for Qt
MUtilities
Classes | Functions | Variables
MUtils::CPUFetaures Namespace Reference

This namespace contains functions and constants for detecting CPU information. More...

Classes

struct  cpu_info_t
 Struct to hold information about the CPU. More...
 

Functions

MUTILS_API cpu_info_t detect (void)
 Detect processor information. More...
 

Variables

static const uint8_t VENDOR_INTEL = 0x01U
 CPU vendor flag. More...
 
static const uint8_t VENDOR_AMD = 0x02U
 CPU vendor flag. More...
 
static const quint32 FLAG_CMOV = 0x001U
 CPU feature flag. More...
 
static const quint32 FLAG_MMX = 0x002U
 CPU feature flag. More...
 
static const quint32 FLAG_SSE = 0x004U
 CPU feature flag. More...
 
static const quint32 FLAG_SSE2 = 0x008U
 CPU feature flag. More...
 
static const quint32 FLAG_SSE3 = 0x010U
 CPU feature flag. More...
 
static const quint32 FLAG_SSSE3 = 0x020U
 CPU feature flag. More...
 
static const quint32 FLAG_SSE4 = 0x030U
 CPU feature flag. More...
 
static const quint32 FLAG_SSE42 = 0x080U
 CPU feature flag. More...
 
static const quint32 FLAG_AVX = 0x100U
 CPU feature flag. More...
 

Detailed Description

This namespace contains functions and constants for detecting CPU information.

Call the detect() to detect information about the processor, which will be returned in a cpu_info_t struct.

Function Documentation

§ detect()

MUTILS_API cpu_info_t MUtils::CPUFetaures::detect ( void  )

Detect processor information.

Detects information about the CPU on which the application is running, including CPU vendor, identifier string, feature flags (MMX, SSE, AVX, etc) as well as the CPU core count.

Returns
The function returns a cpu_info_t struct containing the detected information about the CPU.

Variable Documentation

§ FLAG_AVX

const quint32 MUtils::CPUFetaures::FLAG_AVX = 0x100U
static

CPU feature flag.

Indicates that the CPU supports the AVX instruction set extension

§ FLAG_CMOV

const quint32 MUtils::CPUFetaures::FLAG_CMOV = 0x001U
static

CPU feature flag.

Indicates that the CPU supports the CMOV instruction

§ FLAG_MMX

const quint32 MUtils::CPUFetaures::FLAG_MMX = 0x002U
static

CPU feature flag.

Indicates that the CPU supports the MMX instruction set extension

§ FLAG_SSE

const quint32 MUtils::CPUFetaures::FLAG_SSE = 0x004U
static

CPU feature flag.

Indicates that the CPU supports the SSE instruction set extension

§ FLAG_SSE2

const quint32 MUtils::CPUFetaures::FLAG_SSE2 = 0x008U
static

CPU feature flag.

Indicates that the CPU supports the SSE2 instruction set extension

§ FLAG_SSE3

const quint32 MUtils::CPUFetaures::FLAG_SSE3 = 0x010U
static

CPU feature flag.

Indicates that the CPU supports the SSE3 instruction set extension

§ FLAG_SSE4

const quint32 MUtils::CPUFetaures::FLAG_SSE4 = 0x030U
static

CPU feature flag.

Indicates that the CPU supports the SSE4.1 instruction set extension

§ FLAG_SSE42

const quint32 MUtils::CPUFetaures::FLAG_SSE42 = 0x080U
static

CPU feature flag.

Indicates that the CPU supports the SSE4.2 instruction set extension

§ FLAG_SSSE3

const quint32 MUtils::CPUFetaures::FLAG_SSSE3 = 0x020U
static

CPU feature flag.

Indicates that the CPU supports the SSSE3 instruction set extension

§ VENDOR_AMD

const uint8_t MUtils::CPUFetaures::VENDOR_AMD = 0x02U
static

CPU vendor flag.

Indicates that the CPU's vendor is AMD

§ VENDOR_INTEL

const uint8_t MUtils::CPUFetaures::VENDOR_INTEL = 0x01U
static

CPU vendor flag.

Indicates that the CPU's vendor is Intel