Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 12:623ce727d4fa
- Parent:
- 11:4e700bbf93d7
diff -r 4e700bbf93d7 -r 623ce727d4fa main.cpp
--- a/main.cpp Wed Jan 18 23:35:49 2017 +0000
+++ b/main.cpp Wed May 24 19:23:32 2017 +0000
@@ -71,7 +71,7 @@
void do_benchmark(void){
float t1,t2 = 0.0;
- static REAL aa[20*20],a[20*21],b[20],x[20];
+ static REAL aa[40*40],a[40*41],b[40],x[40]; // nxn, n*n+1, n,n,
REAL cray,ops,total,norma,normx;
REAL resid,residn,eps,tm2,epsn,x1,x2;
REAL mflops;
@@ -127,10 +127,10 @@
pc.printf(expect[4], " -7.51018524e-06");
#endif
- lda = 21;
- ldaa = 20;
+ lda = 41; //n+1
+ ldaa = 40; //n
cray = .056;
- n = 20;
+ n = 40; // 40 For Nucleo F7
pc.printf("----------------------------------------------\n");
pc.printf("%s ", ROLLING);
pc.printf("%s ", PREC);
@@ -223,7 +223,7 @@
t2 = timer.read();
timer.stop();
overhead1 = t2-t1; //sec
- pc.printf ("%10d times %6.2f seconds\n", loop, overhead1);
+ pc.printf ("%10d times %6.4f seconds\n", loop, overhead1);
if (overhead1 > runSecs) {
pass = 0;
}
@@ -318,7 +318,7 @@
print_time(j);
}
atime[3][6] = atime[3][6] / 5.0;
- pc.printf("Average %11.2f\n",
+ pc.printf("Average %11.4f\n",
(double)atime[3][6]);
pc.printf("\nCalculating matgen2 overhead\n");
@@ -378,9 +378,9 @@
print_time(j);
}
atime[3][12] = atime[3][12] / 5.0;
- pc.printf("Average %11.2f\n\n",
+ pc.printf("Average %11.4f\n\n",
(double)atime[3][12]);
- pc.printf("##########################################\n");
+ pc.printf("--------------------------------------------------------\n");
pc.printf ("\nFrom File /proc/cpuinfo\n");
// pc.printf("%s\n", configdata[0]);
pc.printf ("\nFrom File /proc/version\n");
@@ -404,7 +404,7 @@
/************************************************************************
* Add results to output file Linpack.txt *
************************************************************************/
- pc.printf (" ########################################################\n\n");
+ pc.printf (" --------------------------------------------------------\n\n");
pc.printf (" Linpack %s Precision %s Benchmark n @ 100\n", PREC, ROLLING);
//pc.printf (outfile, " Optimisation %s, %s\n", options, timeday);
@@ -453,7 +453,7 @@
}
- pc.printf (" ########################################################\n\n");
+ pc.printf (" -------------------------------------------------------------\n\n");
pc.printf("\n");
pc.printf ("SYSTEM INFORMATION\n\nFrom File /proc/cpuinfo\n");
// pc.printf (outfile, "%s \n", configdata[0]);
@@ -462,6 +462,8 @@
pc.printf ("\n");
pc.printf("\n");
+
+ wait(1);
}
@@ -469,7 +471,7 @@
void print_time (int row)
{
- pc.printf("%11.5f%11.5f%11.5f%11.2f%11.4f%11.4f\n", (double)atime[0][row],
+ pc.printf("%11.5f%11.5f%11.5f%11.4f%11.4f%11.4f\n", (double)atime[0][row],
(double)atime[1][row], (double)atime[2][row], (double)atime[3][row],
(double)atime[4][row], (double)atime[5][row]);
return;