Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

memset Vs ippiCopy

micromysore1
Beginner
875 Views
If i want to set the memory to ZERO ..
which one is recommended & why ?? which one is faster & why ??
any insight will help !!

Ipp32f *pSrc;
IppiSize sz = {8,8};
pSrc = ippsMalloc(64);

ippiCopy_32f_C1R(0, pSrc, 4*8, sz);
or
memset(pSrc, 0, 64);

-madan
0 Kudos
1 Reply
Vladimir_Dudnik
Employee
875 Views
Hi,
of course it depends on data size. For small sizes it is better to use 1D functions, like ippsZero. For very small sizes memset will faster, just because modern compilers avoids function call in such case and use macro instead.
But for middle and big data sizes, you can use IPP to utilize MMX/SSE/HT features of Intel processors.
Regards,
Vladimir
0 Kudos
Reply