- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi all,
i use memset to initialize structures , for example
if i have an instance of a structure named struct1
i usually write
memset(&struct1,0,sizeof(someStructure));
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
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
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.
Regards,
Vladimir
Vladimir

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page