Get Started

  • 2020
  • 07/15/2020
  • Public Content

Get Started with Intel® Integrated Performance Primitives for
Linux* OS

Intel® Integrated Performance Primitives (Intel® IPP) is a software library that provides a broad range of functionality, including general signal and image processing, computer vision, data compression, and string manipulation.
Intel IPP is installed as part of the following suite
s
:
The library is also provided as a standalone package under the Community Licensing program.
The majority of Intel IPP functions offered in different product suites are the same. But there are several Intel IPP libraries or domains that are only included in some product packages. The
following table provides a summary of Intel IPP functionality for different product suites:
Intel IPP Functionality
Intel® Parallel Studio XE
Intel® System Studio
Intel® IPP Standalone
Common function domains (string operations, cryptography, computer vision, data compression, image processing, signal processing, etc.)
Yes
Yes
Yes
Long Term Evolution functions for the embedded domain
No
Yes
No

Prerequisites

Set Environment Variables
After installing Intel IPP, set the
IPPROOT
,
LD_LIBRARY_PATH
, and
NLSPATH
environment variables by running the script appropriate to your target platform architecture. The scripts are available in
<install dir>
/
ipp
/
bin
.
By default, the
<install dir>
is:
  • For root users:
    /opt/intel/compilers_and_libraries_2020.x.xxx/linux
  • For non-root users:
    $HOME/intel/compilers_and_libraries_2020.x.xxx/linux

Build and Run Your First Intel® IPP Application

The code example below represents a short application to help you get started with Intel IPP:
#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(int argc, char* argv[]) { 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 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) SHA 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:
  1. Initialize the Intel IPP library. This stage is required to take advantage of full Intel IPP optimization. With
    ippInit()
    , the best implementation layer is dispatched at runtime; otherwise, the least optimized implementation is chosen. If the Intel IPP 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.
  2. Get the library layer name and version. You can also get the version information using the
    ippversion.h
    file located in the
    <install_dir>
    /ipp
    /include
    directory.
  3. Show the hardware optimizations used by the selected library layer and supported by CPU.
To build the code example above, follow the steps:
  1. Paste the code into the editor of your choice.
  2. Make sure the compiler and Intel IPP variables are set in your shell. For information on how to set environment variables see Prerequisites.
  3. Compile with the following command:
    icc ipptest.cpp -o ipptest -I$IPPROOT/include -L$IPPROOT/lib/<arch> -lippcore
    . For more information about which Intel IPP libraries you need to link to, see
    Intel IPP Developer Guide
    .
  4. Run the application.

Training and Documentation

Document
Description
Intel® IPP training resources.
Contains detailed descriptions of the Intel IPP functions and interfaces for signal, image processing, and computer vision.
Contains detailed descriptions of the Intel IPP Cryptography functions.
Provides detailed guidance on Intel IPP library configuration, development environment, linkage modes, and Custom Library Tool use.
A Japanese version is available in the downloadable studio documentation bundle at https://software.intel.com/en-us/articles/download-documentation-intel-parallel-studio-xe-current-previous.
Demonstrates how to implement box blurring of an image using Intel IPP image processing functions. The tutorial and sample bundle is available for download from Intel® Software Product Samples and Tutorials.
Contains detailed descriptions of the Intel IPP Integration Wrappers C and C++ application programming interfaces and provides guidance on how to use them in your code.
Intel® IPP Examples
Include a collection of example programs that demonstrate the various features of the Intel IPP library. These programs are located in the
components_and_examples_<
os
>_<
target
>.zip
archive at the
<install_dir>/components
subdirectory. The archive also includes the
ipp-examples.html
documentation file at the
documentation
subdirectory.
Intel® IPP product page. See this page for support and online documentation.
You can also download an offline version of the documentation from:

Notices and Disclaimers

Intel, the Intel logo, Intel Atom, Intel Core, Intel Xeon Phi, VTune and Xeon are trademarks of Intel Corporation in the U.S. and/or other countries.
*Other names and brands may be claimed as the property of others.
© 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.
Optimization Notice
Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.
Notice revision #20110804

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804