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

ippiMalloc stepsizes

ad_ms
Beginner
460 Views
hi,

i am about to use the pyramid functions for image fusing,
so i compute the gaussian and laplacian pyramids of two images.
question: do i have to keep track of all the stepsizes or can
i _safely_ assume that within one runtime environment
the stepsize of two equally sized images is the same?
to be more precise-- is this code "safe"

ALPyr := ippiMalloc_8u_C1 (ABRois .width, ABRois .height, @ABSteps );
BLPyr := ippiMalloc_8u_C1 (ABRois .width, ABRois .height, @ABSteps );
FinalPyr := ippiMalloc_8u_C1 (ABRois .width, ABRois .height, @ABSteps );

note that i allocate trice an image of equal size, and hence
do assume that they return the same stepsizes-- so safe or not?

thanks in advance,
aydin


0 Kudos
2 Replies
Vladimir_Dudnik
Employee
460 Views

Hello,

the only difference between IPP mem allocation functions and C run-time memory allocation functions is alignment. The IPP memory allocation functions do align allocated memory block on 32-byte boundary, whereas C run time memory allocation susally algins block on 4-byte boundary.

So, answer is yes, when you allocate images of the same size, IPP memory allocation functions will always align allocated memory block on 32-bytes boundary and so they will provide you the same step value.

Note, alignment depends on processor u-arch features, and is choosen to provide the fastest access to memory block (keeping allocation overhead within reasonable range). That mean alignment may differs on different processor generations, for example between IA32 and Itanium. That does not necessary implemented right now, but that is possible in future.

Regards,
Vladimir

0 Kudos
jhaenisch
Beginner
460 Views

hi vladimir,

thank your for your quick response. since my code does not depend on how the data is aligned, everything is ok for me.

regards,
aydin

0 Kudos
Reply