Using the Intel® Integrated Performance Primitives (Intel® IPP) Library with the Intel® AppUp™ SDK Suite for MeeGo*

This library provides a collection of low-level "primitives" that are designed to optimize the use of the special "vector" or SIMD (single-instruction multiple-data) instructions that are found on many Intel and compatible processors. In particular, the Intel® Atom™ processor includes a set of specialized SIMD instructions that implement the Supplemental Streaming SIMD Extension 3 (SSSE3) instructions.

This document assumes you have already successfully installed the MeeGo SDK and the Intel AppUp SDK Suite for MeeGo! For information on how to obtain and install these components please see the "How-To Guides" on the Intel AppUp SDK Suite page.

The Intel IPP library was installed as a component of the Intel AppUp SDK Suite for MeeGo on your development system. You will find the files you need to create an Intel IPP application for MeeGo in the <appup-sdk-install-dir>/ipp directory on your development system. It contains standard library files to link against, C header files to include in your source code and some auxiliary tools and configuration files.

Links to documentation, help, code samples and an introduction to the Intel IPP library can be found on the main Intel IPP product page. The latest release notes and other useful links can be found here.

The Intel IPP library distributed with this SDK does not include all the domains and functions described in the on-line documentation. The following domains have been omitted from this edition of the library:  string processing (ippch.h), data integrity (ippi.h), SPIRAL generated functions (ippg subset of ipps.h), small matrix (ippm.h), realistic rendering (ippr.h) and speech recognition (ippsr.h). The speech recognition domain was removed from the library with the 7.0 release.


Open Source and Redistribution of the Intel IPP Library

The library is provided in binary format only; however, you are free to use it with any project type, proprietary or open source, that allows the use of binary libraries (such as LGPL). There are no fees or royalties associated with redistribution of an application that incorporates the Intel IPP library and you are not required to sign a redistribution agreement to use the library as part of your application. See the "credist.txt" and/or "redist.txt" file that is part of your development installation for a list of files that can be freely redistributed. In general, the Intel IPP library header files cannot be redistributed and the Intel IPP binary library files can be redistributed when they are linked with your application.

If your application is based on an open source project, or implements algorithms that are protected by licenses from other third-parties, you may be subject to license or patent restrictions placed upon you by those other third-parties. Please see the Intel End User License Agreement (EULA) and consult your legal counsel if you have questions regarding licensing, patents and redistribution.


Basic Library Information

The Intel IPP library supplied with the Intel AppUp SDK Suite can be used with applications built using the Intel compiler or the GCC* compiler or the Microsoft* C/C++ compiler (specific use of the GCC and Microsoft compilers depend upon your MeeGo host/target development platform configuration). The library's binaries have been built using the Intel compiler, but this does not require that your application must also be built using the Intel compiler if you use Intel IPP functions. Any compatible compiler can be used to build applications that utilize the Intel IPP library.

Note: in the text that follows, <arch> refers to the addressing model being used: ia32 or intel64, and <IPPROOT> refers to the IPP installation directory. Additionally, '\' and '/' may be used interchangeably in the following text as directory separators.

The library is a C language library and, as such, the functions and structures defined within the library can easily be used by any C or C++ application. Additionally, any language that provides techniques or interfaces to call C language functions may also be able to utilize the Intel IPP functions.

The library contains a special "dispatcher" that automatically detects the SIMD instruction set on the processor being used, at runtime, and dispatches to code optimized to that SIMD instruction set. Multiple SIMD-optimized versions of each function are concealed behind a single entry point and are managed by the dispatcher. The overhead associated with this dispatcher is extremely low.

The specific SIMD architectures supplied with this edition of the library are subject to change, but will always include at least support for the Intel Atom processor and one other SIMD architecture guaranteed to work on compatible microprocessors. Other SIMD architectures may or may not be included. Please review these articles for information regarding the IPP dispatching mechanism:

Understanding SIMD Optimization Layers and Dispatching in the Intel® IPP 7.0 Library
IPP Dispatcher Control Functions - ipp*Init*() Functions

Intel IPP Include Files

Functions and structures used within the library are defined within a collection of header files located in the <IPPROOT>\include directory. The "ipp.h" header file conveniently includes all of these headers. For simplicity and forward compatibility it is best to include only the ipp.h header file (depending on the procedure you used to install the cryptography add-on library, you may have to explicitly include the ippcp.h header file in your application).

Each header file corresponds to an Intel IPP "domain," as defined by this table in the overview guides (except ipp.h, ippcore.h, ippdefs.h and ippversion.h).

Calling Intel IPP Functions

First, include the ipp.h header file, as highlighted with yellow in the sample application shown below and initialize the library with a call to the ippInit() function, highlighted by blue. Then, call the Intel IPP functions as you would in any standard Windows or Linux application.

There are two mistakes in the sample application shown in the figure above: use of the deprecated "M" objects and failure to call the ippInit() function before calling any other Intel IPP functions. Don't use this deprecated "M" API and do use the ippInit() function!

The output from the sample above is shown below. If you fail to call the ippInit() first the library will utilize the least optimized functions, in this case the library code "w7" optimizations. After the library dispatcher has been properly initialized, with a call to ippInit(), the optimum SIMD instruction set (library code "s8") has been chosen (see the highlights below). For more information regarding the library optimization levels, please read this article.


Configuring Your Qt Creator Build Environment

From a console shell, find the ippvars.bat (or ippvars.sh on a Linux hosted system) and run the script to determine the proper value to assign to your IPPROOT and IPP_TARGET_ARCH variables. You will find this script file installed in the <appup-sdk-install-dir>/ipp/bin directory of your development system host. The value of these two environment variables need to be manually assigned to the IPPROOT and IPP_TARGET_ARCH variables in your Qt Creator project. 

The following screen shot shows the results for a system on which the Intel AppUp SDK Suite has been installed into a non-standard location (the default locations on a Windows machine are C:\MeeGoSDK_X.X\… and C:\AppUp-MeeGo-Tools\…).

Note: for technical reasons, the MeeGo SDK and the Intel AppUp SDK Suite must be installed in directories that contain no spaces. Substituting "shortened form" directory names (such as PROGRA~1 on a Windows machine) will not work and spaces within directory names will not work when using the qmake build utility (even if you try to use the qmake $$quote() function)! Trust me, I've tried…

If you also have Intel® Composer XE or a standalone copy of the Intel IPP library installed on your development system you may have a conflict with these environment variables; therefore, it is best to define these variables inside the Qt Creator integrated development environment (IDE). See the following figure for an example of where and how to do this. If the variables do not already exist in the Qt Creator IDE you will have to "Add" them using the buttons to the right of the build environment screen; otherwise, if they do exist, you can simply redefine them per the results of the exercise above.


Configuring Your Qt Creator Project File

Two things must be specified to configure your Qt Creator project file (the .pro file) so that compiling and linking with the Intel IPP library will be successful. You must define the "INCLUDEPATH" and "LIBS" variables. Assuming that the IPPROOT and IPP_TARGET_ARCH environment variables have been defined (see previous section) you can reference them directly as shown below.

The simplest approach is to include all available library files, as shown above. This approach eliminates any guess work and does not result in adding any excess to the size of your application binary. Only those functions that you actually call from your application will be included with the final executable binary. This approach assumes a static library link, since that is the format the Intel IPP libraries are provided in, at this time, with the Intel AppUp SDK Suite.

Notice that the optional cryptography library file should only be included in the list of libraries to be linked if you have downloaded and installed that library. It has been commented out here for default case, which does not include the cryptography library.

When you run a build you can confirm that the Intel IPP include files and library files are being properly referenced by reviewing the output of your build sessions. See the images below for examples that correspond to the above sample.

compiler build command

linker build command


Alternate Configurations Using Environment Variables

If you prefer to configure your development system to use the Intel IPP library via environment variables, you must insure that the IPPROOT and IPP_TARGET_ARCH environment variables will be set before you run the Qt Creator integrated development environment (IDE) and that the Qt Creator IDE will see those environment variables. In the typical development scenario, your compiler/linker will be started from within the Qt Creator IDE and will inherit the environment variables exported by the Qt Creator IDE (which can be changed from within the Qt Creator IDE, as shown above). There is a script file included with the Intel IPP library files that will configure the environment variables for compiling and linking the Intel IPP library with your application.

That script file (batch file on Microsoft* Windows* and shell script on Linux*) is located in the <appup-sdk-install-dir>/ipp/bin directory. It will setup the IPPROOT and IPP_TARGET_ARCH environment variables (it may also define additional variables, such as PATH, INCLUDE, LIB, etc.). These two key environment variables will be set to point to the appropriate IPP library directories as they were installed by the Intel AppUp SDK Suite installation on your development system. For example, running the script will  result in changes similar to the following (the following results assume a default installation):

   IPP_TARGET_ARCH=ia32
   IPPROOT=C:\AppUp-MeeGo-Tools\ICC-MeeGo-host-12.0.0.008\ipp

Once defined, you can reference the IPPROOT variable within your makefiles and project files to locate the header and library files needed to compile and link applications with the Intel IPP library.

Also, before running any command-line build scripts provided with Intel IPP sample applications you must be sure to set the IPPROOT environment variable to point to the IPP installation directory on your system. IPPROOT must point to that directory which contains the IPP bin, lib, include and tools directories. The sample build scripts will reference the IPPROOT environment variable in order to locate the appropriate IPP library and any additional tools required.

On a Windows system the following batch file is available to configure the environment for building IPP applications:

   <appup-sdk-install-dir>\ipp\bin\ippvars.bat  <arch>

On a Linux system the following shell script is available to configure the environment for building IPP applications:

   <appup-sdk-install-dir>/ipp/bin/ippvars.sh  <arch> 


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


http://doc.qt.nokia.com/4.6/qmake-project-files.html#declaring-other-libraries

http://appdeveloper.intel.com/en-us/article/using-intel-ipp-with-intel-appup-sdk-for-meego

*Trademark Information

0