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

how can types and sizes affect performances?

liorda
Beginner
294 Views

Hi,

I failed to find any references regarding my questions, so please tell me what you think:

1. how can the sizes of matrices affect performance? lets say i'm using IppiCopy_8u_C1R() on a matrix sized 512x512 pixels, and later run it with 513x513 matrix. should there be any degragation in performances between the two calls?

2. Matlab's image proccessing toolbox uses IPP. In their documentation they require using cetain types when calling ipp functions.

["On Intel architecture processors, imfilter can take advantage of the Intel Performance Primitives Library (IPPL), thus accelerating its execution time. IPPL is activated only if A and H are both two-dimensional and A is of class uint8, int16, or single", taken from here]

Becides the obvious (less bytes are less to compute), should i prefer specific types in my application?

3. When calling any IPP function on single ROI, does the function uses parallelization, or the whole computation is done using one thread? why IPPI documentation doesn't mention anything about thread while IPPS documentation does?

thanks,

--Lior

edit: typo

0 Kudos
1 Solution
Vladimir_Dudnik
Employee
294 Views

Hello,

well, I'lltry to answer:

1. no significant difference in performance is expected between processing 512x512 and 513x513 images. Althouhg it is known thatmodern processors(including Intel)access data faster on aligned memory. In IPP we had tried to minimize the impact of data misalignment where it possible.

2. actually types of data to use is somthing specific for your application. If you more concern on speed I think you may want to use Ipp8u data types but if you concern more on calculation accuracy you may prefer Ipp32f data type. The Ipp16u is kind of tradeoff between those two.

3. There are several ways to control threading in IPP. You can set desired number of threads with ippSetNumThreads function. Internally, IPP function usually turn off threading when size of data to process is not enough to provide efficiency. For example, processing of 4x4 image will never be threaded in IPP (on practice boundary size is about 512x512 or 640x480 and is significantly depend on particular function and even on particular processor architecture).

Regards,
Vladimir

View solution in original post

0 Kudos
1 Reply
Vladimir_Dudnik
Employee
295 Views

Hello,

well, I'lltry to answer:

1. no significant difference in performance is expected between processing 512x512 and 513x513 images. Althouhg it is known thatmodern processors(including Intel)access data faster on aligned memory. In IPP we had tried to minimize the impact of data misalignment where it possible.

2. actually types of data to use is somthing specific for your application. If you more concern on speed I think you may want to use Ipp8u data types but if you concern more on calculation accuracy you may prefer Ipp32f data type. The Ipp16u is kind of tradeoff between those two.

3. There are several ways to control threading in IPP. You can set desired number of threads with ippSetNumThreads function. Internally, IPP function usually turn off threading when size of data to process is not enough to provide efficiency. For example, processing of 4x4 image will never be threaded in IPP (on practice boundary size is about 512x512 or 640x480 and is significantly depend on particular function and even on particular processor architecture).

Regards,
Vladimir

0 Kudos
Reply