Improve IPP support and integration

It would seem that Intel IPP support isn’t well rounded in JUCE.

I’m now maintaining some old code that pulls JUCE in and builds several projects/applications, all of which require Intel IPP. During my wrangling to get Intel IPP to link and be configured correctly with JUCE, as well as our own FFT wrapper, I noticed a few issues:

  1. JUCE doesn’t support Intel IPP in cmake. I haven’t found any location that links the libraries. Please correct me if I’m wrong!
  2. Intel IPP isn’t supported on Linux through JUCE; not in cmake, and not in the Projucer. This much is apparent because I had to hack in a custom macro to enable the availability.
    a. Boiling this down, this means this condition _IPP_SEQUENTIAL_STATIC || _IPP_SEQUENTIAL_DYNAMIC || _IPP_PARALLEL_STATIC || _IPP_PARALLEL_DYNAMIC doesn’t cut it!
    b. Maybe someone has a better idea on how to figure this out dynamically.

I’ve had to integrate all of this into CentOS 7 (AWS EC2). So for anybody that ever needs it, you need to install the Intel IPP packages as such. Official details are here: Installing Intel® Performance Libraries and Intel® Distribution for...

sudo yum-config-manager --add-repo https://yum.repos.intel.com/setup/intelproducts.repo
sudo yum -y update
sudo yum -y install intel-ipp

The library location for 64bit is "/opt/intel/ipp/lib/intel64".
For 32-bit systems: "/opt/intel/ipp/lib/ia32".

There are a few cmake Intel IPP library finders out there. I somewhat based myself on this: https://github.com/hanjianwei/cmake-modules/blob/master/FindIPP.cmake


Similarly, Intel IPP is available for Android: Building Android* NDK applications with Intel® Integrated Performance...


Looks like FRUT supports Intel IPP in cmake: https://github.com/McMartin/FRUT/blob/main/cmake/Reprojucer.cmake#L6035-L6058

+1 for this. Additionally, I would love it if the FloatVectorOperations class would use some IPP native function under the hood – last time I checked, it only uses either vDSP or the fallback custom intrinsics. IPP has functions for at least everything vDSP does, so there’s no reason not to use it if it’s been linked to.

4 Likes

_FRUT_set_IPP_windows_compiler_and_linker_settings indeed implements support for Intel IPP, but it doesn’t support IPP installed via the oneAPI toolkit (which was added to JUCE 6.1.0 in https://github.com/juce-framework/JUCE/commit/2465cb0d2).

I guess I’ll work on improving IPP support in FRUT as well pretty soon :smiley:

3 Likes

Nice! This is pretty much what I did for our projects.

To take it one step further with cmake, ideally this macro would be dynamically inserted when the user requests it and and if the libraries are found on the system.

In parallel, I wish the Projucer would be a smarter “IDE” in that it would indicate (UI and command line) if the IPP libs were installed or not when the flag is toggled…

1 Like