memset / ippsZero

memset / ippsZero

hi all,
i use memset to initialize structures , for example
if i have an instance of a structure named struct1
i usually write


if i want to do the same using IPP

i tried

ippsZero_8u ( (Ipp8u*) &struct1,sizeof(someStructure));

is this the optimal way ?
i mean if there is a direct way to pass the structure pointer instead of accessing it byte by byte

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


The function ippsZero_8u is dedicated to work with vector of Ipp8u values, so it was declared in ipps.h as:
IPPAPI ( IppStatus, ippsZero_8u,( Ipp8u* pDst, int len ))
and though, you have to provide pointer to Ipp8u vector. But this does not mean that function will do their work just accessing byte-by-byte. On systems with SIMD instructions available it will perform vectorization inside.


Leave a Comment

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