TempleOSCD_150720.ISO
This commit is contained in:
1 parent
401601816c
commit
f8c05f98f4
554 files changed
+26046
-24853
No files matched your search
@@ -78,7 +78,7 @@ U0 Main()
|
||||
I64 start,end,overhead_time,test_time;
|
||||
F64 d1,fsum;
|
||||
I64 reg i,temp,reg d2,reg sum;
|
||||
Bool old_preempt=Preempt(OFF);
|
||||
Bool old_preempt=Preempt;
|
||||
|
||||
CPURep;
|
||||
|
||||
@@ -86,18 +86,18 @@ U0 Main()
|
||||
for (i=0;i<65536;i++)
|
||||
coordinates[i]=RandU32;
|
||||
|
||||
//Measure Loop Overhead
|
||||
//Measure Loop Overhead
|
||||
start=GetTSC;
|
||||
for (i=SAMPLE_SIZE-1;i>=0;i--) {
|
||||
}
|
||||
end=GetTSC;
|
||||
overhead_time=end-start;
|
||||
"$$RED$$Overhead Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(overhead_time)/SAMPLE_SIZE;
|
||||
ToF64(overhead_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure F64 arithmetic
|
||||
// (Some of this is due to crappy
|
||||
// compiler code.)
|
||||
//Measure F64 arithmetic
|
||||
// (Some of this is due to crappy
|
||||
// compiler code.)
|
||||
d1=Sin(1.0);
|
||||
fsum=0;
|
||||
start=GetTSC;
|
||||
@@ -107,39 +107,39 @@ U0 Main()
|
||||
test_time=end-start;
|
||||
"Float Sum :%X\n",ToI64(fsum);
|
||||
"$$RED$$Float Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure fixed point arithmetic
|
||||
//Measure fixed point arithmetic
|
||||
d2=Sin(1.0)*0x100000000;
|
||||
sum=0;
|
||||
start=GetTSC;
|
||||
for (i=SAMPLE_SIZE-1;i>=0;i--) {
|
||||
temp=d2*coordinates[i&65535];
|
||||
temp=d2*coordinates[i&65535];
|
||||
sum+=temp.i32[1];
|
||||
}
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Fixed-Point Sum :%X\n",sum;
|
||||
"$$RED$$Fixed-Point Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure fixed point arithmetic
|
||||
//Measure fixed point arithmetic
|
||||
start=GetTSC;
|
||||
sum=AsmFixedPt;
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Asm Fixed-Point Sum :%X\n",sum;
|
||||
"$$RED$$Asm Fixed-Point Cycles:%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
//Measure float arithmetic
|
||||
//Measure float arithmetic
|
||||
start=GetTSC;
|
||||
sum=AsmFloat;
|
||||
end=GetTSC;
|
||||
test_time=end-start;
|
||||
"Asm Float Sum :%X\n",sum;
|
||||
"$$RED$$Asm Float Cycles :%10.5f$$FG$$\n",
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
ToF64(test_time)/SAMPLE_SIZE;
|
||||
|
||||
Preempt(old_preempt);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user