Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference
Building Intel® IPP Applications
The code example below represents a short application to help you get started with Intel® IPP:
/*******************************************************************************
* Copyright 2026 Intel Corporation.
*
*
* This software and the related documents are Intel copyrighted materials, and your use of them is governed by
* the express license under which they were provided to you ('License'). Unless the License provides otherwise,
* you may not use, modify, copy, publish, distribute, disclose or transmit this software or the related
* documents without Intel's prior written permission.
* This software and the related documents are provided as is, with no express or implied warranties, other than
* those that are expressly stated in the License.
*******************************************************************************/
#include <stdio.h>
#include "ipp.h"
#define PRINT_INFO(feature, text) \
printf(" %-30s= ", #feature); \
printf("%c\t%c\t", (cpuFeatures & feature) ? 'Y' : 'N', (enabledFeatures & feature) ? 'Y' : 'N'); \
printf(#text "\n")
int main(void)
{
const IppLibraryVersion *libVersion;
IppStatus status;
Ipp64u cpuFeatures, enabledFeatures;
ippInit(); /* Initialize Intel(R) IPP library */
libVersion = ippGetLibVersion(); /* Get Intel(R) IPP library version info */
printf("%s %s\n", libVersion->Name, libVersion->Version);
status = ippGetCpuFeatures(&cpuFeatures, 0); /* Get CPU features and features enabled with selected library level */
if (ippStsNoErr != status)
return (int)status;
enabledFeatures = ippGetEnabledCpuFeatures();
printf("Features supported: by CPU\tby Intel(R) IPP\n");
printf("------------------------------------------------\n");
PRINT_INFO(ippCPUID_MMX, Intel(R) Architecture MMX technology supported);
PRINT_INFO(ippCPUID_SSE, Intel(R) Streaming SIMD Extensions);
PRINT_INFO(ippCPUID_SSE2, Intel(R) Streaming SIMD Extensions 2);
PRINT_INFO(ippCPUID_SSE3, Intel(R) Streaming SIMD Extensions 3);
PRINT_INFO(ippCPUID_SSSE3, Supplemental Streaming SIMD Extensions 3);
PRINT_INFO(ippCPUID_MOVBE, Intel(R) MOVBE instruction);
PRINT_INFO(ippCPUID_SSE41, Intel(R) Streaming SIMD Extensions 4.1);
PRINT_INFO(ippCPUID_SSE42, Intel(R) Streaming SIMD Extensions 4.2);
PRINT_INFO(ippCPUID_AVX, Intel(R) Advanced Vector Extensions instruction set);
PRINT_INFO(ippAVX_ENABLEDBYOS, Intel(R) Advanced Vector Extensions instruction set is supported by OS);
PRINT_INFO(ippCPUID_AES, Intel(R) AES New Instructions);
PRINT_INFO(ippCPUID_CLMUL, Intel(R) CLMUL instruction);
PRINT_INFO(ippCPUID_RDRAND, Intel(R) RDRAND instruction);
PRINT_INFO(ippCPUID_F16C, Intel(R) F16C new instructions);
PRINT_INFO(ippCPUID_AVX2, Intel(R) Advanced Vector Extensions 2 instruction set);
PRINT_INFO(ippCPUID_ADCOX, Intel(R) ADOX / ADCX new instructions);
PRINT_INFO(ippCPUID_RDSEED, Intel(R) RDSEED instruction);
PRINT_INFO(ippCPUID_PREFETCHW, Intel(R) PREFETCHW instruction);
PRINT_INFO(ippCPUID_SHA, Intel(R) Secure Hash Algorithm - New Instructions);
PRINT_INFO(ippCPUID_AVX512F, Intel(R) Advanced Vector Extensions 512 Foundation instruction set);
PRINT_INFO(ippCPUID_AVX512CD, Intel(R) Advanced Vector Extensions 512 CD instruction set);
PRINT_INFO(ippCPUID_AVX512ER, Intel(R) Advanced Vector Extensions 512 ER instruction set);
PRINT_INFO(ippCPUID_AVX512PF, Intel(R) Advanced Vector Extensions 512 PF instruction set);
PRINT_INFO(ippCPUID_AVX512BW, Intel(R) Advanced Vector Extensions 512 BW instruction set);
PRINT_INFO(ippCPUID_AVX512VL, Intel(R) Advanced Vector Extensions 512 VL instruction set);
PRINT_INFO(ippCPUID_AVX512VBMI, Intel(R) Advanced Vector Extensions 512 Bit Manipulation instructions);
PRINT_INFO(ippCPUID_MPX, Intel(R) Memory Protection Extensions);
PRINT_INFO(ippCPUID_AVX512_4FMADDPS, Intel(R) Advanced Vector Extensions 512 DL floating - point single precision);
PRINT_INFO(ippCPUID_AVX512_4VNNIW, Intel(R) Advanced Vector Extensions 512 DL enhanced word variable precision);
PRINT_INFO(ippCPUID_KNC, Intel(R) Xeon Phi(TM) Coprocessor);
PRINT_INFO(ippCPUID_AVX512IFMA, Intel(R) Advanced Vector Extensions 512 IFMA(PMADD52) instruction set);
PRINT_INFO(ippAVX512_ENABLEDBYOS, Intel(R) Advanced Vector Extensions 512 is supported by OS);
return 0;
}
This application consists of three sections:
Initialize the Intel IPP library. This stage is required to take advantage of full Intel IPP optimization. The ippInit() function detects the processor type and sets the dispatcher to use the processor-specific code of the Intel® IPP library corresponding to the instruction set capabilities available. If your application runs without ippInit(), the Intel IPP library is auto-initialized with the first call of the Intel IPP function from any domain that is different from ippCore.
In certain debugging scenarios, it is helpful to force a specific implementation layer using ippSetCpuFeatures(), instead of the best as chosen by the dispatcher.
Get the library layer name and version. You can also get the version information using the ippversion.h file located in the /include directory.
Show the hardware optimizations used by the selected library layer and supported by CPU.
Building the First Example with Microsoft Visual Studio* Integration on Windows* OS
On Windows* OS, Intel IPP applications are significantly easier to build with Microsoft* Visual Studio*. To build the code example above, follow the steps:
Start Microsoft Visual Studio* and create an empty C++ project.
Add a new c file and paste the code into it.
Set the include directories and the linking model as described in Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP.
Compile and run the application.
If you did not install the integration plug-in, configure your Microsoft* Visual Studio* IDE to build Intel IPP applications following the instructions provided in Configuring the Microsoft Visual Studio* IDE to Link with Intel® IPP.
Building the First Example on Linux* OS
To build the code example above on Linux* OS, follow the steps:
Paste the code into the editor of your choice.
Make sure the compiler and Intel IPP variables are set in your shell. For information on how to set environment variables see Setting Environment Variables.
Compile with the following command:
Intel® 64:
icpx ipptest.cpp -o ipptest -I $IPPROOT/include -L $IPPROOT/lib -lippi -lipps -lippcoreFor more information about which Intel IPP libraries you need to link to, see Library Dependencies by Domain and Linking Options.
For more information about the Component Directory Layout and the Unified Directory Layout, see Finding Intel IPP on Your System.
Run the application.
See Also
Automatically Linking Your Microsoft* Visual Studio* Project with Intel IPP
Configuring the Microsoft Visual Studio* IDE to Link with Intel® IPP