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

ippi and parallelization

simon_leonard
Beginner
364 Views
I have one question regarding the use of ippi and parallel threads.

I have this computationally intensive program running on a P4 dual core that uses two cameras simultaneously. A thread is created for each camera at each frame so they can be parallelized.

When I run the program without ippi (using home made functions) I get a processing time of 0.100sec when using a single camera and 0.103sec when using two cameras. A clear sign that the thread are being parallelized on the dual core. Awsome :)

However, when I use ippi, I get 0.084sec for one camera (thanks ippi for shaving 0.016sec), but, and here is what I don't understand, 0.170sec when using both cameras. Which suggest that the threads aren't being parallelized :(

Is there something that I should know about ippi that would enable parallel thread? I'm using ipp v5.1 (Linux). Has anybody else solved something like this?

Thanks.

-Simon


0 Kudos
3 Replies
Vladimir_Dudnik
Employee
364 Views

Hello,

If you control threads by yourself, it might be better to not to use automatic internal threading feature of IPP. I think for your case it would be much more effective if you implement threading by yourself, on above IPP level (in many cases it is possible to process images by separateslices in parallel). You have two options to turn off internal IPP threading:

-use IPP static libraries
-call ippSetNumThreads(1) for shared libraries, somewhere at the start of your application.

Regards,
Vladimir

0 Kudos
simon_leonard
Beginner
364 Views

ippSetNumThreads(1) did it!

> If you control threads by yourself, it might be better to not to use automatic internal
> threading feature of IPP.

Yes, I use pthreads.

Thanks for the help.

-Simon
0 Kudos
Vladimir_Dudnik
Employee
364 Views

Hi Simon,

how do you find IPP functionality, performance, easy of use? What IPP samples were most useful for you? Which areas from your point of view require more or better samples?

Regards,
Vladimir

0 Kudos
Reply