MuldeR's Utilities for Qt MUtilities

Classes | Typedefs | 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. See `_cpu_info_t` for details! More...

## Typedefs
typedef struct MUtils::CPUFetaures::_cpu_info_t | cpu_info_t
| Struct to hold information about the CPU. See `_cpu_info_t` for details!

## Functions
MUTILS_API cpu_info_t | detect (void)
| Detect processor information. More...

## Variables
static const quint8 | VENDOR_INTEL = 0x01U
| CPU vendor flag. More...
static const quint8 | 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_SSE41 = 0x040U
| CPU feature flag. More...
static const quint32 | FLAG_SSE42 = 0x080U
| CPU feature flag. More...
static const quint32 | FLAG_AVX = 0x100U
| CPU feature flag. More...
static const quint32 | FLAG_AVX2 = 0x200U
| CPU feature flag. More...
static const quint32 | FLAG_FMA3 = 0x400U
| CPU feature flag. More...
static const quint32 | FLAG_LZCNT = 0x800U
| 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_AVX2

const quint32 MUtils::CPUFetaures::FLAG_AVX2 = 0x200U
| static

CPU feature flag.

Indicates that the CPU supports the AVX2 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_FMA3

const quint32 MUtils::CPUFetaures::FLAG_FMA3 = 0x400U
| static

CPU feature flag.

Indicates that the CPU supports the FMA3 instruction

## § FLAG_LZCNT

const quint32 MUtils::CPUFetaures::FLAG_LZCNT = 0x800U
| static

CPU feature flag.

Indicates that the CPU supports the LZCNT 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_SSE41

const quint32 MUtils::CPUFetaures::FLAG_SSE41 = 0x040U
| 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 quint8 MUtils::CPUFetaures::VENDOR_AMD = 0x02U
| static

CPU vendor flag.

Indicates that the CPU's vendor is AMD

## § VENDOR_INTEL

const quint8 MUtils::CPUFetaures::VENDOR_INTEL = 0x01U
| static

CPU vendor flag.

Indicates that the CPU's vendor is Intel