Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

What's the advantage of using IPP Data Types?

markzzz
Beginner
301 Views

Hi,

I see that if I use IPP functions (i.e. ippsMulC_64f_I) with Ipp64f or double, it seems the same. No warnings, same performances.

What's the benefit of using the IPP's native Data Types?

Thanks

0 Kudos
1 Solution
Pavel_B_Intel1
Employee
301 Views

The benefits are in cross-platform support and unification. Different operation systems and compilers can have different types definition. To fix this potential problem many libraries and SDKs introduce their own types definition. 

For example: Ipp64s can be defined as "__int64" for Microsoft or "long long" for GCC.

View solution in original post

9 Replies
BMart1
New Contributor II
301 Views

I hate every lib defining its types, instead of using standard uin32_t, etc.

 

Bruno

Pavel_B_Intel1
Employee
302 Views

The benefits are in cross-platform support and unification. Different operation systems and compilers can have different types definition. To fix this potential problem many libraries and SDKs introduce their own types definition. 

For example: Ipp64s can be defined as "__int64" for Microsoft or "long long" for GCC.

View solution in original post

BMart1
New Contributor II
301 Views

Pavel, what's the downsize of ipp adopting standard int64_t?

Pavel_B_Intel1
Employee
301 Views

I understand your point and in the modern reality it looks logically to use native data types, but it required many years to become to the current situation where we have native and standard data types aligned on all OSes. int64_t was introduced with C99 standard in 2000 year, IPP library start point is early and IPP library supports ANSI C and C99 standards.

So in general it is historical architecture that we follow.

Pavel

markzzz
Beginner
301 Views

But if I use double instead of Ipp64f, are the performance differences?

Or is it only a problem of definitions across different OSes?

Pavel_B_Intel1
Employee
301 Views

If you use double instead of Ipp64f - no any performance difference shall be. IPP data types are introduced for alignment across different OSes. If you see in ippbase.h you can see:

typedef double         Ipp64f;

Pavel

Jonghak_K_Intel
Employee
301 Views

Hi Markzzz, 

I think Pavel provided clear answers. Do you have any other question or need more support regarding this matter? 

markzzz
Beginner
301 Views

Yes :) In this case, since I use float or double, it seems I can simply use double and float ;) They define them equal on different machines/systems... right?

Pavel_B_Intel1
Employee
301 Views

Yes, correct.

Reply