ippGetCpuFeatures

Retrieves the processor features.

Syntax

IppStatus ippGetCpuFeatures(Ipp64u* pFeaturesMask, Ipp32u pCpuidInfoRegs[4]);

Parameters

pFeaturesMask

Pointer to the features mask. It can has the value ippCPUID_GETINFO_A.

pCpuidInfoRegs

Pointer to the 4-element vector for data from the registers eax, ebx, ecx, edx of the function CPUID.1.

Description

The function ippGetCpuFeatures is declared in the ippcore.h file. This function retrieves some of the CPU features returned by the function CPUID.1 and stores them consecutively in the mask pFeaturesMask. The table below lists the features stored in the mask.

If pFeaturesMask hasn't any value on input, then the function retrieves the features in accordance with eax=1 and ecx=0. If pFeaturesMask is set to ippCPUID_GETINFO_A, then the function retrieves the features in accordance with the input values of the registers eax and ecx that are specified in this case by the pCpuidInfoRegs[0] and pCpuidInfoRegs[2] respectively.

CPU Features Mask
Mask Value Bit Name Feature Mask Bit Number
1

ippCPUID_MMX

MMXTM technology

0
2

ippCPUID_SSE

Intel® Streaming SIMD Extensions

1
4

ippCPUID_SSE2

Intel® Streaming SIMD Extensions 2

2
8

ippCPUID_SSE3

Intel® Streaming SIMD Extensions 3

3
16

ippCPUID_SSSE3

Supplemental Intel® Streaming SIMD Extensions

4
32

ippCPUID_MOVBE

MOVBE instruction is supported

5
64

ippCPUID_SSE41

Intel® Streaming SIMD Extensions 4.1

6
128

ippCPUID_SSE42

Intel® Streaming SIMD Extensions 4.2

7
256

ippCPUID_AVX

The processor supports Intel® Advanced Vector Extensions (Intel® AVX) instruction set 8
512

ippAVX_ENABLEDBYOS

The operating system supports Intel® AVX 9
1024

ippCPUID_AES

AES instruction is supported

10
2048

ippCPUID_CLMUL

PCLMULQDQ instruction is supported

11

Additionally all features returned by the function CPUID.1 can be stored in the 4-element vector pCpuidInfoRegs where each next element contains data from one of the registers eax, ebx, ecx, edx respectively. If these data are not required, the pointer pCpuidInfoRegs must be set to NULL.

Caution iconCaution

Intel® Itanium® processors are not supported.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error condition when the pFeaturesMask pointer is NULL.

ippStsNotSupportedCpu

Indicates that processor is not supported.

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.