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.

the performance of IPP

langfox
Beginner
824 Views
Hello, guys.
I'm new to IPP and not sure if I got anything wrong with my code, 
but the performace with IPP is lower(by comparing the value of cycle1
 and cycle2). Please give me some suggestion.
Thanks.
VOID InitSinTable(VOID) 
{
INT i;
FLOAT theta;
FLOAT thea[SINTABLESIZE], sintable[SINTABLESIZE];
Ipp64u start, end, cycle1, cycle2;
start = ippGetCpuClocks();
for (i = 0; i < SINTABLESIZE; ++i) 
{
theta = (FLOAT)i/TWOPISCALE;
sintable = (FLOAT)sin(theta);
}
 end = ippGetCpuClocks();
 cycle1 = end - start;
 start = ippGetCpuClocks();
 for (i = 0; i < SINTABLESIZE; ++i) 
{
thea = (FLOAT)i/TWOPISCALE;
}
ippsSin_32f_A11(thea, sintable, SINTABLESIZE);
 end = ippGetCpuClocks();
 cycle2 = end - start;
}
0 Kudos
5 Replies
Vladimir_Dudnik
Employee
824 Views

Hello,

to investigate your issue we need to know some additional information, like what IPP version do you use, on what platform and OS.

Regards,
Vladimir

0 Kudos
langfox
Beginner
824 Views
well, it's P4 2.8G and 1GB memory, with IPP 5.1 on Windows XP SP2 system. I also tried other functions( for example,strcmp() vs ippsCompare_8u() ), the performance of IPP is always lower than C code. I don't know why... :(
0 Kudos
Nikita_A_Intel
Employee
824 Views

Hi,
I suspect you link IPP statically. In this case you should initialize the dispatcher (e.g.call ippStaticInit()onceat the program beginning).
Please tell me if it helps.

Best regards,
Nikita

PS: Here are the lines from the manual:
Before calling any Intel IPP functions, initialize the static dispatcher by calling ippStaticInit , which will perform the complete dispatching process. Without calling this function, you will run 'px' code libraries instead of the optimized version of the code.

0 Kudos
langfox
Beginner
824 Views

Thanks, it gets better.

By the way, I thought the IPP was linked dynamicly. I included ipp.h, commented lib in stublib directory. Am I wrong?

0 Kudos
Nikita_A_Intel
Employee
824 Views

Let me refer you to the page in the manual because I'm not sure what you did:
http://www.intel.com/support/performancetools/libraries/ipp/sb/CS-021491.htm

Thanks,
Nikita

0 Kudos
Reply