Pleasecompile and run the following single file project on Celeron Processor and let me know what results you get. My Celeron 2.4 gives me NO SPEED GAIN AT ALL. Please help.
Daniel
// --- Intel Performance Primitives test --- //
#include
#include
#include
#define inner 1280 /* Feel free to experiment with these values */
#define outter 10000000
int main(int argc, char *argv[])
{
int i,j;
float p[inner],q[inner],x1,x2;
unsigned long BeginTime1,EndTime1;
unsigned long BeginTime2,EndTime2;
printf("
Working...
");
/* Initialize: */
for(i=0;i{
p[i]=(float)(i*3.14);
q[i]=(float)(i*6.28);
}
BeginTime1 = GetTickCount(); /* ~10 ms timer resolution */
for(j=0;j{
x1=0.0;
for(i=0;i{
x1 += p[i]*q[i]; /* ... the usual, slow way. */
}
}
EndTime1 = GetTickCount();
BeginTime2 = GetTickCount(); /* ~10 ms timer resolution */
/* Nested loops, inside loop performs dot product which is in fact:
x = p0*q0 + p1*q1 + p2*q2 + ... +pn*qn */
for(j=0;j{
ippsDotProd_32f( p,q,inner,&x2 );/* Intel optimized... */
}
EndTime2 = GetTickCount();
printf("
Miliseconds NORM: %d.
",(int)(EndTime1-BeginTime1));
printf(" Miliseconds IPP: %d.
",(int)(EndTime2-BeginTime2));
printf("
(Dot product result: x1 = %f)",x1);
printf("
(Dot product result: x2 = %f)
",x2);
return 0;
}




