Skip to content

Commit efda640

Browse files
author
Ashwin Sekhar T K
committed
Benchmark: Add MFlops print in iamax benchmark
1 parent 1530e78 commit efda640

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: benchmark/iamax.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ int main(int argc, char *argv[]){
149149
srandom(getpid());
150150
#endif
151151

152-
fprintf(stderr, " SIZE Time\n");
152+
fprintf(stderr, " SIZE Flops\n");
153153

154154
for(m = from; m <= to; m += step)
155155
{
@@ -180,7 +180,9 @@ int main(int argc, char *argv[]){
180180

181181
timeg /= loops;
182182

183-
fprintf(stderr, " %10.6f secs\n", timeg);
183+
fprintf(stderr,
184+
" %10.2f MFlops %10.6f sec\n",
185+
COMPSIZE * sizeof(FLOAT) * 1. * (double)m / timeg * 1.e-6, timeg);
184186

185187
}
186188

0 commit comments

Comments
 (0)