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

When should ippInit be called?

eos_pengwern
Beginner
514 Views
I have the following situation:

- to ease interopabilitywith C and Fortran code, I have encapsulated some of the IPP functions that I need to use in a C DLL with simplified interfaces.

- I'd now like to call IPP functions from this C DLL both from my main application, written in C++, and another DLL which is written in Fortran.

Do I just have to call ippInit() once from the main application when that opens, or do I need to make aseparate call to it from the Fortran DLL the first time that is used?

Also, does it make any difference whether the C DLL with simplified interfaces incorporates the IPP via static or dynamic linking?

Thanks,
Stephen.
0 Kudos
1 Solution
igorastakhov
New Contributor II
514 Views
Hi Stephen,

You should call ippInit() only once. Anyway nothing bad will happen if you call it from both main and F-dll - as both are running on the same CPU - the second call will do nothing.

We provide 3 types of libraries: dynamic (always threaded), threaded-static and non-threaded static. So the differnce between first 2 is the cost of 1st call - for dynamic linking it's always huge - and the size of your application (see IPP userguide). If you use the 3rd option - non-threaded static - you'll have single threaded IPP version without dependecy on libguide (dll that provides OMP support)

Regards,
Igor

View solution in original post

0 Kudos
2 Replies
igorastakhov
New Contributor II
515 Views
Hi Stephen,

You should call ippInit() only once. Anyway nothing bad will happen if you call it from both main and F-dll - as both are running on the same CPU - the second call will do nothing.

We provide 3 types of libraries: dynamic (always threaded), threaded-static and non-threaded static. So the differnce between first 2 is the cost of 1st call - for dynamic linking it's always huge - and the size of your application (see IPP userguide). If you use the 3rd option - non-threaded static - you'll have single threaded IPP version without dependecy on libguide (dll that provides OMP support)

Regards,
Igor
0 Kudos
eos_pengwern
Beginner
514 Views
Thank you Igor, that tells me exactly what I needed to know.

Stephen.
0 Kudos
Reply