Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Using ippGetCpuFeatures

Miklós_Szeles
Beginner
908 Views
Hi,

I would like to determine the architectures' postfixes using the new method (ippGetCpuFeatures).
I tried to make the pairing based on the example sources. I made the following:

[cpp]Ipp64u featureMask;
ippGetCpuFeatures(&featureMask, NULL);
#if (defined(_WIN64) || defined(LINUX64))
if (featureMask & ippCPUID_SSE41) {
//Y8
}
else if (featureMask & ippCPUID_SSSE3) {
//U8
}
else if (featureMask & ippCPUID_SSE3) {
//M7
}
#else
if (featureMask & ippCPUID_SSE41) {
//P8
}
else if (featureMask & ippCPUID_SSSE3) {
//V8
}
else if (featureMask & ippCPUID_SSE3) {
//T7
}
else if(featureMask & ippCPUID_SSE2) {
//W7
}
else {
//PX
}
#endif[/cpp]

Is this correct?
I saw that there are libraries with s8, mx and n8 endings. What about them?
What should be the default selection on an em64t machine(px on 32bit)?
Thx,
Miki
0 Kudos
2 Replies
Ying_S_Intel
Employee
908 Views

You may check the article "Understand CPU optimized code used in IPP" at:
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives-intel-ipp-understanding-cpu-optimized-code-used-in-intel-ipp/ and relevant code used in Intel 64.

Other topics related to IPP performance and optimizations can be found at:
http://software.intel.com/en-us/articles/intel-integrated-performance-primitives/performance-and-optimization/1/

Thanks,
Ying
0 Kudos
Miklós_Szeles
Beginner
908 Views
Hi Ying,

Thanks for the answer, now I know what are the other architectures, but I don't know when to select them based on the ippGetCPUFeatures return values, and I also don't know, if my posted code is correct or not. Please help with this issue.
BR,
Miki
0 Kudos
Reply