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

Does ippsMalloc_32f 32 byte memory alignment is conflict with 64 byte cache line

TripleS
Beginner
1,106 Views

Hey 

I far as I understood, latest Intel technology works with cache line of 64 byte, 

That's why as a programmer I shall care about 64 byte alignment

I thought of using 64 byte alignment by allocating using: ippsMalloc_32f, however the header documentation said that ippsMalloc_32f  allocate a 32 byte alignment 

(I thought that ipps would malloc  a 64 byte alignment) 

What am I missing here? 

 

IPP version: 8.2  (2015)

0 Kudos
3 Replies
Jonghak_K_Intel
Employee
1,106 Views

Hi

Please refer here for malloc fuction : https://software.intel.com/en-us/node/502011

 

Malloc basically allocates memory block aliggned to 64-byte boundary.

Even though you allocate memory blocks for different sizes of elements, this will be aligned to 64-bytes boundary.

And they will be requested 64 bytes by 64 bytes, If that cache line isn't present in the cache.

 

Thank you

0 Kudos
ArturGuzik
Valued Contributor I
1,106 Views

Jon,

I think the part of the "confusion" arises from IPP docs. The site you linked to correctly states the memory is aligned to 64 boundaries. However, the Section on data alignment reads as follows (I think this is the "header" Section original post refers to)

Data Alignment

Intel IPP is built using the compiler option /Zp16, which aligns the structure fields on the field size or 16 bytes if the size is greater than 16. You can also use the ippsMalloc function to align the allocated memory pointer on 32 bytes.

A.

 

0 Kudos
Bjoern_B_Intel
Employee
1,106 Views

Artur,

Documentation will be updated to make this clear. Issue filed as CQ DPD200413723.

Thanks & Best,
Bjoern

0 Kudos
Reply