ippiMalloc - byte alignment /step to 64 Byte boundary?

ippiMalloc - byte alignment /step to 64 Byte boundary?

Hi,

after upgrading to IPP7.1 I recognized that the data allocated with ippiMalloc seems to be aligned to a 64 Byte boundary although the documentation says it is aligned 32 Byte boundary. Is  64 Byte alignment always the case or is this  CPU specific? 

Christian

8 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

[ IPP v7.0.205 ]
...
#define IPP_VERSION_MAJOR 7
#define IPP_VERSION_MINOR 0
#define IPP_VERSION_BUILD 205
...
// Name: ippiMalloc
// Purpose: allocates memory with 32-byte aligned pointer for ippIP images,
// every line of the image is aligned due to the padding characterized
// by pStepBytes
// Parameter:
// widthPixels width of image in pixels
// heightPixels height of image in pixels
// pStepBytes pointer to the image step, it is an output parameter
// calculated by the function
...

and

[ IPP v7.1.1 ] - Corrected
...
#define IPP_VERSION_MAJOR 7
#define IPP_VERSION_MINOR 1
#define IPP_VERSION_BUILD 1
...
// Name: ippiMalloc
// Purpose: allocates memory with 32-byte aligned pointer for ippIP images,
// every line of the image is aligned due to the padding characterized
// by pStepBytes
// Parameter:
// widthPixels width of image in pixels
// heightPixels height of image in pixels
// pStepBytes pointer to the image step, it is an output parameter
// calculated by the function
...

>>...Is 64 Byte alignment always the case or is this CPU specific?

What platform ( OS ) do you use? 32-bit or 64-bit?

Hi,

if I understand correctly, this is what the documentation says. But from my experience the mem is allocated at 64 Byte boundaries. I am running Windows 7 x64 but compiling a 32bit application with Visual Studio 2010.

Anyone can confirm the 64 Byte alignment?

>>...Anyone can confirm the 64 Byte alignment?

The following verification could be done to confirm if a pointer is alligned on a 64-byte boundary:

...
if ( ( ( int )pMemory % 64 ) == 0 )
printf( "Pointer is aligned on %d\n", alignment );
...

Hi Christian,

yes, one single internal definition for all architectures:

#define IPP_MALLOC_ALIGNED_BYTES   64

regards, Igor

Hi Igor,

thank you for this information. The documentation should be corrected accordingly.

Best,

Christian

>>...The documentation should be corrected accordingly...

Please follow:
.
http://www.intel.com/software/products/softwaredocs_feedback

and leave your comments / suggestions since this is the best way to provide feedback. Thanks.

Hi all,

thank you for catching this, docs have been already fixed, will be updated on the web with the next IPP update.

regards, Igor.

Melden Sie sich an, um einen Kommentar zu hinterlassen.