about ippsCopy_8u

about ippsCopy_8u

Hi all: I'm working with IPP from years but I have a doubt about using ofippsCopy_8u. I hope someone can solve me one for all :)If I allocate memory with a standard "malloc" or "new" operator (so without usingippsMalloc): is it safe to useippsCopy_8u on it? or due to memory not aligned the copy could overflow my buffer?I mean:char* p1=new char[100];char* p2=new char[100];ippsCopy_8u(p1,p2,100); -> is it safe with any size on every allocations?furthermore: if I useippsCopy_8u on a memory allocated with "new" or with a memory allocated with "ippsMalloc", can I obtain different performance?

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Best Reply

Hello,

it is safe to call IPP functions on not aligned data. Of course you may expect different performance in this case simple because modern processors access data by aligned addressed more efficiently.

Regards,
Vladimir

ok thank you for solving my long time doubt :)

You are welcome.

FYI, in IPP test suite we have a special class of tests to check that functions work with not aligned data.

Regards,
Vladimir

Leave a Comment

Please sign in to add a comment. Not a member? Join today