[llvm-commits] [test-suite] r168954 - /test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c

Daniel Dunbar daniel at zuster.org
Thu Nov 29 15:02:17 PST 2012


Author: ddunbar
Date: Thu Nov 29 17:02:16 2012
New Revision: 168954

URL: http://llvm.org/viewvc/llvm-project?rev=168954&view=rev
Log:
SciMark2-C: Rebalance iteration counts.

 - The different loops run in very different times, so try to pick values that
   roughly balance out to run the loops for the same duration (and roughly match
   the iteration counts that would have been used before).

 - Also, add support for SMALL_PROBLEM_SIZE.

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=168954&r1=168953&r2=168954&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c (original)
+++ test-suite/trunk/MultiSource/Benchmarks/SciMark2-C/kernel.c Thu Nov 29 17:02:16 2012
@@ -10,7 +10,11 @@
 #include "SparseCompRow.h"
 #include "array.h"
 
+#ifdef SMALL_PROBLEM_SIZE
+#define CYCLES (1<<7)
+#else
 #define CYCLES (1<<12)
+#endif
 
     double kernel_measureFFT(int N, double mintime, Random R)
     {
@@ -26,7 +30,7 @@
         while(1)
         {
             Stopwatch_start(Q);
-            for (i=0; i<cycles; i++)
+            for (i=0; i<cycles * 8; i++)
             {
                 FFT_transform(twoN, x);     /* forward transform */
                 FFT_inverse(twoN, x);       /* backward transform */
@@ -56,7 +60,7 @@
         while(1)
         {
             Stopwatch_start(Q);
-            SOR_execute(N, N, 1.25, G, cycles);
+            SOR_execute(N, N, 1.25, G, cycles * 16);
             Stopwatch_stop(Q);
 
             if (cycles > CYCLES /*Stopwatch_read(Q) >= mintime*/)
@@ -84,7 +88,7 @@
         while(1)
         {
             Stopwatch_start(Q);
-            MonteCarlo_integrate(cycles);
+            MonteCarlo_integrate(cycles * 65536);
             Stopwatch_stop(Q);
             if (cycles > CYCLES/*Stopwatch_read(Q) >= min_time*/) break;
 
@@ -165,7 +169,7 @@
         while(1)
         {
             Stopwatch_start(Q);
-            SparseCompRow_matmult(N, y, val, row, col, x, cycles);
+            SparseCompRow_matmult(N, y, val, row, col, x, cycles * 64);
             Stopwatch_stop(Q);
             if (cycles > CYCLES/*Stopwatch_read(Q) >= min_time*/) break;
 





More information about the llvm-commits mailing list