Community
cancel
Showing results for 
Search instead for 
Did you mean: 
selea
Beginner
165 Views

about ippsCopy_8u

Jump to solution
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?
0 Kudos
1 Solution
Vladimir_Dudnik
Employee
165 Views
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

View solution in original post

3 Replies
Vladimir_Dudnik
Employee
166 Views
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

View solution in original post

selea
Beginner
165 Views
ok thank you for solving my long time doubt :)
Vladimir_Dudnik
Employee
165 Views
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
Reply