asmjit::CpuInfo Class Reference

CPU information.

Public Members

Member Functions

Overloaded Operators
Accessors

Construction & Destruction

Member Function Documentation

const CpuInfo& CpuInfo::host()staticnoexcept

Returns the host CPU information.

void CpuInfo::initArch(uint32_t arch, uint32_t subArch = 0u)noexcept

Initializes CpuInfo to the given architecture, see Environment.

uint32_t CpuInfo::arch() constnoexcept

Returns the CPU architecture id, see Environment::Arch.

uint32_t CpuInfo::subArch() constnoexcept

Returns the CPU architecture sub-id, see Environment::SubArch.

uint32_t CpuInfo::familyId() constnoexcept

Returns the CPU family ID.

uint32_t CpuInfo::modelId() constnoexcept

Returns the CPU model ID.

uint32_t CpuInfo::brandId() constnoexcept

Returns the CPU brand id.

uint32_t CpuInfo::stepping() constnoexcept

Returns the CPU stepping.

uint32_t CpuInfo::processorType() constnoexcept

Returns the processor type.

uint32_t CpuInfo::maxLogicalProcessors() constnoexcept

Returns the number of maximum logical processors.

uint32_t CpuInfo::cacheLineSize() constnoexcept

Returns the size of a cache line flush.

uint32_t CpuInfo::hwThreadCount() constnoexcept

Returns number of hardware threads available.

const char* CpuInfo::vendor() constnoexcept

Returns the CPU vendor.

bool CpuInfo::isVendor(const char* s) constnoexcept

Tests whether the CPU vendor is equal to s.

const char* CpuInfo::brand() constnoexcept

Returns the CPU brand string.

template<typename T = BaseFeatures>
const T& CpuInfo::features() constnoexcept

Returns all CPU features as BaseFeatures, cast to your arch-specific class if needed.

bool CpuInfo::hasFeature(uint32_t featureId) constnoexcept

Tests whether the CPU has the given feature.

CpuInfo& CpuInfo::addFeature(uint32_t featureId)noexcept

Adds the given CPU feature to the list of this CpuInfo features.

Member Data Documentation

uint8_t CpuInfo::_arch

Architecture.

uint8_t CpuInfo::_subArch

Sub-architecture.

uint16_t CpuInfo::_reserved

Reserved for future use.

uint32_t CpuInfo::_familyId

CPU family ID.

uint32_t CpuInfo::_modelId

CPU model ID.

uint32_t CpuInfo::_brandId

CPU brand ID.

uint32_t CpuInfo::_stepping

CPU stepping.

uint32_t CpuInfo::_processorType

Processor type.

uint32_t CpuInfo::_maxLogicalProcessors

Maximum number of addressable IDs for logical processors.

uint32_t CpuInfo::_cacheLineSize

Cache line size (in bytes).

uint32_t CpuInfo::_hwThreadCount

Number of hardware threads.

FixedString<16>CpuInfo::_vendor

CPU vendor string.

FixedString<64>CpuInfo::_brand

CPU brand string.

BaseFeatures CpuInfo::_features

CPU features.