CPUFeatures
struct
Complete structure of the detected CPU features
Include
#include "NKPlatform/NkCPUFeatures.h"Namespace
nkentseu::platformLink (Jenga)
nkentseudependson(["NKPlatform"])C++
struct CPUFeaturesHierarchy
Base classes : none. Derived classes : none.
Members · 16
Members · 13
VENDOR_CAPACITY | Maximum capacity of the vendor string |
BRAND_CAPACITY | Maximum capacity of the brand string |
vendor | Vendor identification string |
brand | Full processor name (brand string) |
family | CPU family number (CPUID) |
model | CPU model number (CPUID) |
stepping | CPU stepping number (CPUID) |
topology | Topology information |
cache | Cache information |
simd | SIMD features |
extended | Extended features |
baseFrequency | Base frequency in MHz |
maxFrequency | Maximum frequency in MHz (Turbo) |
CPUFeaturesAPI · 3
Get | Gets the singleton instance (lazy, thread-safe initialisation) |
ToString | Formats the CPU information into a buffer provided by the caller |
ToString | Gets a convenient string representation (internal static buffer) |
Member details
static constexpr size_t VENDOR_CAPACITY = 32u
Maximum capacity of the vendor string
Source : NkCPUFeatures.h, line 363
static constexpr size_t BRAND_CAPACITY = 128u
Maximum capacity of the brand string
Source : NkCPUFeatures.h, line 366
char vendor[VENDOR_CAPACITY]
Vendor identification string
Source : NkCPUFeatures.h, line 376
char brand[BRAND_CAPACITY]
Full processor name (brand string)
Source : NkCPUFeatures.h, line 382
int32_t family
CPU family number (CPUID)
Source : NkCPUFeatures.h, line 385
int32_t model
CPU model number (CPUID)
Source : NkCPUFeatures.h, line 388
int32_t stepping
CPU stepping number (CPUID)
Source : NkCPUFeatures.h, line 391
CPUTopology topology
Topology information
Source : NkCPUFeatures.h, line 398
CacheInfo cache
Cache information
Source : NkCPUFeatures.h, line 401
SIMDFeatures simd
SIMD features
Source : NkCPUFeatures.h, line 404
ExtendedFeatures extended
Extended features
Source : NkCPUFeatures.h, line 407
int32_t baseFrequency
Base frequency in MHz
Source : NkCPUFeatures.h, line 417
int32_t maxFrequency
Maximum frequency in MHz (Turbo)
Source : NkCPUFeatures.h, line 423
static const CPUFeatures &Get()
Gets the singleton instance (lazy, thread-safe initialisation)
Source : NkCPUFeatures.h, line 437
void ToString(char *outBuffer, size_t outBufferSize) const
Formats the CPU information into a buffer provided by the caller
Parameters
| Name | Type | Role | Default |
|---|---|---|---|
outBuffer | char * | ||
outBufferSize | size_t |
Source : NkCPUFeatures.h, line 452
const char *ToString() const
Gets a convenient string representation (internal static buffer)
// Usage rapide pour logging NK_FOUNDATION_LOG_INFO("CPU: %s", CPUFeatures::Get().ToString());
Source : NkCPUFeatures.h, line 468