Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

Concurrent / Asynchronous IPP Functions in a single executable process possible?

I2R_D_T_Team
Beginner
248 Views
Hi,

I have been developed my applications using IPP functions for quite some time and, have benefited the performance gain from the functions. Recently, I have discovered that some of my functions which individually, runs a set of IPP functions and each functions do not dependent on each other output. I realized that each IPP function uses OpenMP for its multicore/multi-threaded operations.

Is it possible that I can run my functions concurrent or asynchronously in a single executable process, where each functions uses a separate sets of CPU cores?

Regards,

I2R D&T Team
0 Kudos
1 Solution
matthieu_darbois
New Contributor III
248 Views
Quoting - I2R D&T Team
Hi,

I have been developed my applications using IPP functions for quite some time and, have benefited the performance gain from the functions. Recently, I have discovered that some of my functions which individually, runs a set of IPP functions and each functions do not dependent on each other output. I realized that each IPP function uses OpenMP for its multicore/multi-threaded operations.

Is it possible that I can run my functions concurrent or asynchronously in a single executable process, where each functions uses a separate sets of CPU cores?

Regards,

I2R D&T Team

Hi,
If the IPP functions you call are threaded (check ThreadedFunctionsList.txt), then, you're application is already multithreaded (if you link against IPP Dynamic libraries or threaded static libraries). If you're not using threaded IPP functions and you have an OpenMP compatible compiler, you could use OpenMP (parallel sections if I recall correctly) to do the threading yourself ; this will lead to run the functions concurrently on your process. IPP is thread safe so you can call functions from different thread given that the arguments you pass don't go against basic multithreading rules (ie, passing the same destination buffer for 2 functions running concurrently).

Hope this helps,
Matthieu

View solution in original post

0 Kudos
1 Reply
matthieu_darbois
New Contributor III
249 Views
Quoting - I2R D&T Team
Hi,

I have been developed my applications using IPP functions for quite some time and, have benefited the performance gain from the functions. Recently, I have discovered that some of my functions which individually, runs a set of IPP functions and each functions do not dependent on each other output. I realized that each IPP function uses OpenMP for its multicore/multi-threaded operations.

Is it possible that I can run my functions concurrent or asynchronously in a single executable process, where each functions uses a separate sets of CPU cores?

Regards,

I2R D&T Team

Hi,
If the IPP functions you call are threaded (check ThreadedFunctionsList.txt), then, you're application is already multithreaded (if you link against IPP Dynamic libraries or threaded static libraries). If you're not using threaded IPP functions and you have an OpenMP compatible compiler, you could use OpenMP (parallel sections if I recall correctly) to do the threading yourself ; this will lead to run the functions concurrently on your process. IPP is thread safe so you can call functions from different thread given that the arguments you pass don't go against basic multithreading rules (ie, passing the same destination buffer for 2 functions running concurrently).

Hope this helps,
Matthieu
0 Kudos
Reply