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

What's the advantage of using IPP Data Types?

markzzz
Beginner
1,008 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
1,008 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

0 Kudos
9 Replies
BMart1
New Contributor II
1,008 Views

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

 

Bruno

0 Kudos
Pavel_B_Intel1
Employee
1,009 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.

0 Kudos
BMart1
New Contributor II
1,008 Views

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

0 Kudos
Pavel_B_Intel1
Employee
1,008 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

0 Kudos
markzzz
Beginner
1,008 Views

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

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

0 Kudos
Pavel_B_Intel1
Employee
1,008 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

0 Kudos
Jonghak_K_Intel
Employee
1,008 Views

Hi Markzzz, 

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

0 Kudos
markzzz
Beginner
1,008 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?

0 Kudos
Pavel_B_Intel1
Employee
1,008 Views

Yes, correct.

0 Kudos
Reply