[pypy-commit] extradoc extradoc: bugfix and cleanup (we need test)

hakanardo noreply at buildbot.pypy.org
Sat Aug 11 08:50:51 CEST 2012


Author: Hakan Ardo <hakan at debian.org>
Branch: extradoc
Changeset: r4516:bf847280b43c
Date: 2012-08-11 08:49 +0200
http://bitbucket.org/pypy/extradoc/changeset/bf847280b43c/

Log:	bugfix and cleanup (we need test)

diff --git a/talk/iwtc11/benchmarks/scimark.py b/talk/iwtc11/benchmarks/scimark.py
--- a/talk/iwtc11/benchmarks/scimark.py
+++ b/talk/iwtc11/benchmarks/scimark.py
@@ -2,10 +2,10 @@
 
 def SOR_execute(omega, G, num_iterations):
     for p in xrange(num_iterations):
-        for i in xrange(1, G.height - 1):
-            for j in xrange(1, G.width - 1):
-                G[j, i] = omega * 0.25 * (G[j, i-1] + G[j, i+1] + G[j-1, i] +
-                                          G[j+1, i] + (1.0 - omega) * G[j, i])
+        for y in xrange(1, G.height - 1):
+            for x in xrange(1, G.width - 1):
+                G[x, y] = omega * 0.25 * (G[x, y-1] + G[x, y+1] + G[x-1, y] + G[x+1, y]) + \
+                          (1.0 - omega) * G[x, y]
 def SOR(args):
     n, cycles = map(int, args)
     a = Array2D(n, n)


More information about the pypy-commit mailing list