Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6814 ディスカッション

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

TripleS
ビギナー
1,433件の閲覧回数

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 件の賞賛
3 返答(返信)
Jonghak_K_Intel
従業員
1,433件の閲覧回数

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

ArturGuzik
高評価コントリビューター I
1,433件の閲覧回数

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.

 

Bjoern_B_Intel
従業員
1,433件の閲覧回数

Artur,

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

Thanks & Best,
Bjoern

返信