Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
5 Views

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

0 Kudos
7 Replies
Highlighted
Valued Contributor II
5 Views

[ 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?
0 Kudos
Highlighted
Beginner
5 Views

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?

0 Kudos
Highlighted
Valued Contributor II
5 Views

>>...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 ); ...
0 Kudos
Highlighted
Employee
5 Views

Hi Christian,

yes, one single internal definition for all architectures:

#define IPP_MALLOC_ALIGNED_BYTES   64

regards, Igor

0 Kudos
Highlighted
Beginner
5 Views

Hi Igor,

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

Best,

Christian

0 Kudos
Highlighted
Valued Contributor II
5 Views

>>...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.
0 Kudos
Highlighted
Employee
5 Views

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.

0 Kudos