Overview
Intel® Integrated Performance Primitives (Intel® IPP) is distributed as:
- Static library: Static linking results in a standalone executable
- Dynamic library: Dynamic linking defers function resolution until run-time and requires that you bundle the redistributable libraries with your application
The following table provides description of libraries available for linking:
|
*The multi-threaded libraries are deprecated and moving to external threading is recommended. User has the option to use different threading models like Intel® TBB, OpenMP* and Intel® Cilk Plus etc. You could learn more from following articles for using threading Intel® IPP:
Threading Your Application
OpenMP* and the Intel® IPP Library
Threading Intel® Integrated Performance Primitives Image Resize with Intel® Threading Building Blocks
Appendix B: Intel® IPP Threading and OpenMP* Support
Please also view Finding Intel® IPP on Your System to see the folder location for Intel® IPP in different operating system.
These libraries offer various linkage models for different needs. The following are the four linkage models supported by the Intel® IPP:
- Dynamic linkage
- Static linkage
- Custom dynamic linkage
- Single processor static linkage
Steps to quickly demonstrate each linkage model are listed below. This code is used to illustrate the different linkage models:
|
Dynamic linkage
- Include "ipp.h" which contains Intel® IPP header files with the exception of cryptography and generated functions in your code;
- Use the normal Intel® IPP function names when calling Intel® IPP functions;
- Link corresponding domain import libraries. For example, if you use the ippsCopy_8u function, link against "ipps.lib" from directory ipp\lib\<arch>.
- Make sure that run-time libraries, for example ipps*.dll, are on the executable search path at run time. Run the ippvars.bat [ia32|intel64] from directory \ipp\bin to ensure this application built with the Intel® IPP dynamic libraries will load the appropriate processor-specific DLL.
Static Linkage
- Include "ipp.h" which contains Intel® IPP header files with the exception of cryptography and generated functions in your code;
- Use the normal Intel® IPP function names to call Intel® IPP functions;
- Link corresponding static libraries. For example, if the function ippsCopy_8u() is used, the linked libraries are ippsmt.lib, ippcoremt.lib.
* This dispatcher automatically executes the optimal version of each Intel® IPP function at run time, thus it is inherent part of dynamic library. Since Intel Intel® IPP 9.0, there is no requirement to initialize the dispatcher by calling ippInit() for static linkage anymore. for ippInit() function, please view IPP Dispatcher Control Functions to get more information.
Custom dynamic linkage
- Copy the function names of all Intel® IPP functions used from the Intel® IPP files into the file export.def. For our code example the content of this file is:
EXPORTS
ippsCopy_8u - Write a DLL initialization function called DllMain in mydll.c, and call the function ippInit inside of DllMain to initialize the dispatching mechanism
- Compile mydll.c as a dynamic link library and link it against ippsmt.lib and ippcoremt.lib . The import library mydll.lib will be generated automatically.
|
Moreover, Intel® IPP provide a Building Custom DLLs tool to create a custom DLL in early version. It is available in legacy sample:
<ipp directory>\examples\components_and_examples_win_ps\components\examples_core\ipp_custom_dll
Single Processor Static Linkage
- Add the file ippsmt.lib to your project and its source tree.
- Include the header ipp_g9.h (In case of Processor with Intel® Advanced Vector Extension Instructions). before the other Intel® IPP header files. Learn more about processor specific codes Intel® IPP uses, please view Dispatching.
- Add the file ippcoremt.lib to your project and its source tree;
- Include Intel® IPP head file as normal;
- Call Intel® IPP functions normally from your application.
* See Understanding CPU Dispatching in the Intel® IPP Libraries for more information about dispatching.
Also see Static linking to Intel® IPP Functions for One Processor in
C:\Program Files(x86)\IntelSWTools\parallel_studio_xe_2017.0.024\compilers_and_libraries_2017\windows\ipp\tools\ia32\staticlib\readme.htm
Quick comparison of the four linkage models
|
Note: All Intel® IPP functions are thread-safe. They support multi-threading in both dynamic and static libraries and can be used in multi-threaded applications. However, if an application has its own threading model or if other threaded applications are expected to run at the same time on the system, it is strongly recommended to use non-threaded/single-threaded libraries. Since Intel® IPP 8.2, multi-threading (internal threading) libraries are deprecated due to issues with performance and interoperability with other threading models, but made available for legacy applications.
For more information about external threading, please refer following documents:
Intel® IPP - Threading / OpenMP* FAQ
Threading Intel® Integrated Performance Primitives Image Resize with Intel® Threading Building Blocks
For more information about the above linkage models, please refer to the Intel® IPP User Guide under IPP install directory or on-line articles:
Intel® IPP User's Guide
Compiling and Linking Intel® Primitive Performance Libraries with Microsoft* Visual C++* and Intel® C++ Compiler
Intel® Integrated Performance Primitives Domain Details
For more supported configurations and system requirement of Intel IPP, please view the Intel® Integrated Performance Primitives Release Notes