Intel® Integrated Performance Primitives (IPP) is an extensive library of software functions for signal &image processing, data processing, and communications applications for several kind of OSs, including Wind River* Linux*.
Intel® IPP is included in Intel® System Studio (ISS). This document will help developers get started building and running applications based on Intel® IPP for an target embedded system running Wind River* Linux*.
Intel® System Studio* : l_cembd_p_2014.x.xx.tgz
Unpack the tool suite package in a directory to which you have write access.
> tar -zxvf l_cembd_p_2014.0.xxx.tgz
After install, all ISS products should be in /opt/intel/system_studio_2014.x.y by default.
Intel® IPP provide static library and shared library, 32bit and 64bit supported in /opt/intel/system_studio_2014.x.y/ipp/lib
Wind River* Linux* Product.
Supposed: the Wind River software is installed in the directory /home/wruser/WRLinux_5.0 and build toolchain is in /home/wruser/WRLinux_5.0/wrlinux-5/layers/wr-toolchain
This article is using QEMU X86 64bit emulator to run the testing application. Suppose the image is ready in /home/wruser/wrl5.0/workspace/wrl_qemux86-64_glibc_std_sato_prj
Using Intel® IPP
Intel® IPP provides a set of examples to help you get started with common operations like resize and fast Fourier transform (FFT). The examples are available in /opt/intel/system_studio_2014.x.y/ipp/examples.
A simple example code is attached below to shows IPP matrix multiply functionality using ippmMul
To use the Intel® IPP functions, do the following:
1. Adding Intel® IPP functions in source
- Include the IPP header files (ipp.h) in the source files.
- Call ippInit() before using any other IPP functions. Intel® IPP detects the processor features and selects the optimizing code path for the target processors. Before calling any other Intel® IPP functions, call ippInit() to initialize the CPU dispatching for Intel® IPP.
- Call Intel IPP functions in your C/C++ source.
ippmMul_mm_64f(A, k*sizeof(Ipp64f), 1*sizeof(Ipp64f), k, m, B, n*sizeof(Ipp64f), 1*sizeof(Ipp64f), n, k, C, n*sizeof(Ipp64f), 1*sizeof(Ipp64f));
2. Link Intel® IPP libraries into executable file
source /opt/intel/system_studio_2014.0.025/bin/compilervars.sh ia32_intel64
icc -platform=wrl50 matrix_multiplication.c -mkl -ipp -i-static -o mm_icc_mkl_ipp_test
3. Launch the application and run it in qemux86-x64 emulator
As the qemux86-x 64 file system is on host machine, it is easy to copy executable file to it.
Start the QEMU simulator
The result is
Measuring performance of matrix multiplication C=A*B for matrix A(200x200) and matrix B(200x100) loop_count = 10
Matrix multiplication using triple nested loop take 254.00000 milliseconds
Matrix multiplication using mkl_multiply take 191.00000 milliseconds
Matrix multiplication using ipp_multiply take 140.00000 milliseconds
As intel® IPP functions are optimized for Intel processor, even on 64bit virtual machine, it is about 81% speed-up than general c code.
Both the Intel® MKL and Intel® IPP are optimized for current and future Intel® processors, and they are specifically tuned for two different usage areas:
- Intel MKL is suitable for large problem sizes
- Intel IPP is specifically designed for smaller problem sizes including those used in multimedia, data processing, communications, and embedded C/C++ applications.
Please see more in the article for choosing suitable library. http://software.intel.com/en-us/articles/signal-processing-usage-for-intel-system-studio-intel-mkl-vs-intel-ipp
If you get any issues when using Intel® IPP for Wind River* Linux*, please contact Intel System Studio Support.
For more information of Intel system studio, please visit http://software.intel.com/en-us/intel-system-studio