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:
- 8:66f6deeb2556
- Parent:
- 7:931219974070
- Child:
- 9:54628dc6805e
- Child:
- 11:4e700bbf93d7
--- a/main.cpp Tue Jan 03 20:00:57 2017 +0000
+++ b/main.cpp Tue Jan 03 22:29:43 2017 +0000
@@ -63,7 +63,7 @@
int do_benchmark ( void )
{
- /******************************************************************************/
+/******************************************************************************/
/*
Purpose:
@@ -109,7 +109,6 @@
double total;
double *x;
-
pc.printf ( "\n" );
pc.printf ( "LINPACK_BENCH\n" );
pc.printf ( " C version\n" );
@@ -119,7 +118,7 @@
pc.printf ( " Datatype: Double precision real\n" );
pc.printf ( " Matrix order N = %d\n", N );
pc.printf ( " Leading matrix dimension LDA = %d\n", LDA );
-
+
// ops = ( double ) ( 2 * N * N * N ) / 3.0 + 2.0 * ( double ) ( N * N );
ops = ( double ) ( 2L * N * N * N ) / 3.0 + 2.0 * ( double ) ( (long)N * N ); // Arduino C
@@ -163,7 +162,7 @@
pc.printf ( " Abnormal end of execution.\n" );
return 1;
}
- time[0] = ( double ) t2 - t1;
+ time[0] = t2 - t1;
timer.reset();
@@ -176,7 +175,7 @@
dgesl ( a, LDA, N, ipvt, b, job );
t2 = ( double ) timer.read_us() / 1000000.0;
- time[1] = ( double ) t2 - t1;
+ time[1] = t2 - t1;
total = time[0] + time[1];
@@ -226,7 +225,7 @@
time[3] = ( double ) ops / ( 1000000.0 * total );
/*
- if ( 0.0 < total)
+ if ( total > 0.0 )
{
time[3] = ( double ) ops / ( 1000000.0 * total );
}
@@ -234,16 +233,16 @@
{
time[3] = -1.0;
}
- */
+ */
time[4] = 2.0 / time[3];
time[5] = total / cray;
//pc.printf( " \n\n ");
- //pc.printf( "\n Norm. Resid Resid MACHEP X[1] X[N]\n" );
- pc.printf( "\n MACHEP X[1] X[N]\n" );
- pc.printf(" %14f", residn);
- pc.printf(" %14f", resid_max);
+ pc.printf( "\n Norm. Resid Resid MACHEP X[1] X[N]\n" );
+ //pc.printf( "\n MACHEP X[1] X[N]\n" );
+ pc.printf(" %4.6f ", residn);
+ pc.printf(" %4.6f ", resid_max);
pc.printf(" %14e", eps);
pc.printf(" %14f", b[0]);
pc.printf(" %14f ",b[N-1]);
@@ -256,9 +255,9 @@
for(int ii=0; ii<6; ii++) {
pc.printf(" %9f", time[ii]);
}
-
+
//pc.printf( " %9f %9f %9f %9f %9f %9f\n", time[0], time[1], time[2], time[3], time[4], time[5] );
-
+
/*
Terminate.
Free Mem