Add time prints in benchmark output
authorAshwin Sekhar T K <ashwin@broadcom.com>
Thu, 14 Jul 2016 08:18:13 +0000 (13:48 +0530)
committerAshwin Sekhar T K <ashwin@broadcom.com>
Thu, 14 Jul 2016 08:18:13 +0000 (13:48 +0530)
benchmark/asum.c
benchmark/axpy.c
benchmark/copy.c
benchmark/dot.c
benchmark/gemv.c
benchmark/rot.c
benchmark/scal.c
benchmark/swap.c
benchmark/trmm.c
benchmark/zdot.c

index beb6402..78ccdf4 100644 (file)
@@ -183,9 +183,9 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
 #ifdef COMPLEX
-    fprintf(stderr, " %10.2f MFlops\n", 4. * (double)m / timeg * 1.e-6);
+    fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 4. * (double)m / timeg * 1.e-6, timeg);
 #else
-    fprintf(stderr, " %10.2f MFlops\n", 2. * (double)m / timeg * 1.e-6);
+    fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 2. * (double)m / timeg * 1.e-6, timeg);
 #endif
 
   }
index a7206b6..37c7aeb 100644 (file)
@@ -190,8 +190,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MFlops\n",
-           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6);
+           " %10.2f MFlops %10.6f sec\n",
+           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6, timeg);
 
   }
 
index 15c4520..ea5b38d 100644 (file)
@@ -190,8 +190,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MBytes\n",
-           COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6);
+           " %10.2f MBytes %10.6f sec\n",
+           COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
 
   }
 
index 4c8d6cc..50d05e5 100644 (file)
@@ -184,8 +184,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MFlops\n",
-           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6);
+           " %10.2f MFlops %10.6f sec\n",
+           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6, timeg);
 
   }
 
index 42af282..c06e829 100644 (file)
@@ -221,7 +221,7 @@ int main(int argc, char *argv[]){
 
                timeg /= loops;
 
-               fprintf(stderr, " %10.2f MFlops\n", COMPSIZE * COMPSIZE * 2. * (double)m * (double)n / timeg * 1.e-6);
+               fprintf(stderr, " %10.2f MFlops %10.6f sec\n", COMPSIZE * COMPSIZE * 2. * (double)m * (double)n / timeg * 1.e-6, timeg);
 
        }
   }
@@ -258,7 +258,7 @@ int main(int argc, char *argv[]){
 
                timeg /= loops;
 
-               fprintf(stderr, " %10.2f MFlops\n", COMPSIZE * COMPSIZE * 2. * (double)m * (double)n / timeg * 1.e-6);
+               fprintf(stderr, " %10.2f MFlops %10.6f sec\n", COMPSIZE * COMPSIZE * 2. * (double)m * (double)n / timeg * 1.e-6, timeg);
 
        }
   }
index 32322be..3ff783c 100644 (file)
@@ -186,8 +186,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MFlops\n",
-           COMPSIZE * COMPSIZE * 6. * (double)m / timeg * 1.e-6);
+           " %10.2f MFlops %10.6f sec\n",
+           COMPSIZE * COMPSIZE * 6. * (double)m / timeg * 1.e-6, timeg);
 
   }
 
index 4c2da4d..453c323 100644 (file)
@@ -189,9 +189,9 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
 #ifdef COMPLEX
-    fprintf(stderr, " %10.2f MFlops\n", 6. * (double)m / timeg * 1.e-6);
+    fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 6. * (double)m / timeg * 1.e-6, timeg);
 #else
-    fprintf(stderr, " %10.2f MFlops\n", 1. * (double)m / timeg * 1.e-6);
+    fprintf(stderr, " %10.2f MFlops %10.6f sec\n", 1. * (double)m / timeg * 1.e-6, timeg);
 #endif
 
   }
index 9f108ef..368c59c 100644 (file)
@@ -190,8 +190,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MBytes\n",
-           COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6);
+           " %10.2f MBytes %10.6f sec\n",
+           COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
 
   }
 
index f81e9d9..54c7972 100644 (file)
@@ -191,8 +191,8 @@ int main(int argc, char *argv[]){
     gettimeofday( &start, (struct timezone *)0);
 
     fprintf(stderr,
-           " %10.2f MFlops\n",
-           COMPSIZE * COMPSIZE * 1. * (double)m * (double)m * (double)m / time1 * 1.e-6);
+           " %10.2f MFlops  %10.6f sec\n",
+           COMPSIZE * COMPSIZE * 1. * (double)m * (double)m * (double)m / time1 * 1.e-6, time1);
 
   }
 
index d5ec997..ed9d4d2 100644 (file)
@@ -184,8 +184,8 @@ int main(int argc, char *argv[]){
     timeg /= loops;
 
     fprintf(stderr,
-           " %10.2f MFlops\n",
-           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6);
+           " %10.2f MFlops %10.6f sec\n",
+           COMPSIZE * COMPSIZE * 2. * (double)m / timeg * 1.e-6, timeg);
 
   }