[llvm-commits] [test-suite] r168614 - /test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c
Nadav Rotem
nrotem at apple.com
Mon Nov 26 13:27:37 PST 2012
Author: nadav
Date: Mon Nov 26 15:27:37 2012
New Revision: 168614
URL: http://llvm.org/viewvc/llvm-project?rev=168614&view=rev
Log:
Change the SciMark2 test so that it runs a constant number of iterations
and not depend on the time.
Modified:
test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c
Modified: test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c?rev=168614&r1=168613&r2=168614&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c Mon Nov 26 15:27:37 2012
@@ -10,6 +10,7 @@
#include "SparseCompRow.h"
#include "array.h"
+#define CYCLES (1<<12)
double kernel_measureFFT(int N, double mintime, Random R)
{
@@ -31,7 +32,7 @@
FFT_inverse(twoN, x); /* backward transform */
}
Stopwatch_stop(Q);
- if (Stopwatch_read(Q) >= mintime)
+ if (cycles > CYCLES /*Stopwatch_read(Q) >= mintime*/)
break;
cycles *= 2;
@@ -58,7 +59,8 @@
SOR_execute(N, N, 1.25, G, cycles);
Stopwatch_stop(Q);
- if (Stopwatch_read(Q) >= min_time) break;
+ if (cycles > CYCLES /*Stopwatch_read(Q) >= mintime*/)
+ break;
cycles *= 2;
}
@@ -84,7 +86,7 @@
Stopwatch_start(Q);
MonteCarlo_integrate(cycles);
Stopwatch_stop(Q);
- if (Stopwatch_read(Q) >= min_time) break;
+ if (cycles > CYCLES/*Stopwatch_read(Q) >= min_time*/) break;
cycles *= 2;
}
@@ -165,7 +167,7 @@
Stopwatch_start(Q);
SparseCompRow_matmult(N, y, val, row, col, x, cycles);
Stopwatch_stop(Q);
- if (Stopwatch_read(Q) >= min_time) break;
+ if (cycles > CYCLES/*Stopwatch_read(Q) >= min_time*/) break;
cycles *= 2;
}
@@ -212,7 +214,7 @@
LU_factor(N, N, lu, pivot);
}
Stopwatch_stop(Q);
- if (Stopwatch_read(Q) >= min_time) break;
+ if (cycles > CYCLES/*Stopwatch_read(Q) >= min_time*/) break;
cycles *= 2;
}
More information about the llvm-commits
mailing list