- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am linking statically IPP to my project using CMake. I basically do:
// CMakeLists.txt
...
set(IPP_SHARED OFF)
find_package(IPP REQUIRED)
target_link_libraries(myapp PRIVATE ${IPP_LIBRARIES})
...
and then
// myapp.c
#include <ipp.h>
...
And this is fine.
However, I want to use static dispatching as I have the luxury to know the target hardware:
// myapp.c
#include <ipp_e9.h>
...
This doesn't work as `ipp_e9.h` is not in the include paths returned by the `IPP` package. What configuration should I use to enable it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your patience. This is to kindly inform you that currently, we don't provide paths to static dispatcher header files as part of cmake configuration files.
As a workaround, instead of using the full path, one could use ${IPP_ROOT_REL_PATH}/opt/ipp/tools/intel64/staticlib for IPP2021.10 and $ENV{IPPROOT}/tools/intel64/staticlib for previous releases.
Could you please check and let us know the updates?
Best Regards,
Shanmukh.SS
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pascal,
Thanks for posting in Intel Communities.
Could you please get back to us with the OS details and IPP version being used by you? Could you please get back to us with a sample reproducer? It helps us reproduce the issue at our end and guide you in resolving the same.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OS is Windows 10.
IPP version is 2021.9.0.
A sample would look like below.
// main.cpp
#include <ipp_e9.h> // fails here; OK if commented
#include <ipp.h>
int main() { return 0; }
// CMakeLists.txt
cmake_minimum_required(VERSION 3.21)
project(foo)
add_executable(foo main.cpp)
set(IPP_SHARED OFF)
find_package(IPP REQUIRED)
target_link_libraries(foo PRIVATE ${IPP_LIBRARIES})
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for sharing the details.
We are looking into your issue internally. We will get back to you soon with an update.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pascal,
Could you please try adding the line to your CMakeLists.txt as mentioned below and run make and let us know if the issue persists?
include_directories(<add the include directory which contains the requires header file>)
For Ex: include_directories(/opt/intel/oneapi/ipp/2021.9.0/tools/intel64/staticlib)
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I could, however how do I find the correct path from within CMake, so that the solution is portable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pascal,
A gentle reminder:
Has the information provided helped? Could you please let us know if the issue persists?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pascal,
In your CMakeLists.txt file, use find_package() to locate Intel IPP. You are expected to specify the desired IPP version and component(s) you want to use or you could use find_library() to locate the static library: After finding IPP, you can use find_library() to locate the static library you want to link.
Could you please try these and let us know if you need any help?
Best regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't understand, the static library is already found by `find_package`.
Can you provide a working example based on the code you asked me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Pascal,
Could you please elaborate on your issue? In your CMakeLists.txt file, you could use find_package() to locate Intel IPP.
A Sample CMake:
cmake_minimum_required(VERSION 3.16.3)
include_directories(/opt/intel/oneapi/ipp/2021.9.0/tools/intel64/staticlib)
project(foo)
add_executable(foo main.cpp)
set(IPP_SHARED OFF)
find_package(IPP REQUIRED)
target_link_libraries(foo PRIVATE ${IPP_LIBRARIES})
Intel® Integrated Performance Primitives (Intel® IPP) installs in the subdirectory referred to as <ipp directory> inside <install_dir>. By default, the <install_dir> is:
- admin:/opt/intel/oneapi
- user:~/intel/oneapi
You could refer to the Linux OS section under the below link to find Intel IPP and more details on your system.
find_package(Package Name)
Package Name: Here you need to input the name of the package you want to find. Make sure it corresponds to a CMake module or script that provides the package's configuration information.
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
You already proposed to hardcode the path to the library (here), but as I answered (here), I am looking for a portable solution, so that anybody could configure and compile the project without having to know where IPP is installed on their system.
Is there a way to achieve that? Or are portable CMake projects using IPP restricted to dynamic dispatching? It seems to me, seeing you struggling with this as I am, that this possibility has not been taken into account by the maintainers of IPP's CMake configuration scripts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for your patience. This is to kindly inform you that currently, we don't provide paths to static dispatcher header files as part of cmake configuration files.
As a workaround, instead of using the full path, one could use ${IPP_ROOT_REL_PATH}/opt/ipp/tools/intel64/staticlib for IPP2021.10 and $ENV{IPPROOT}/tools/intel64/staticlib for previous releases.
Could you please check and let us know the updates?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
A gentle reminder:
Has the information provided helped? Could you please let us know if you need any other information?
Best Regards,
Shanmukh.SS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for accepting our solution. If you have any other queries, please feel free to raise a new thread.
Best Regards,
Shanmukh.SS

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page