make sure not to prefetch stuff we already have...
authorbdemsky <bdemsky>
Tue, 10 Mar 2009 19:57:45 +0000 (19:57 +0000)
committerbdemsky <bdemsky>
Tue, 10 Mar 2009 19:57:45 +0000 (19:57 +0000)
Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java

index 5b2d22cbb33755da0cb2963d635b8e1cd1e3517b..37d450b47dc2d37bd289a6335f528ce0140f13a9 100644 (file)
@@ -42,11 +42,12 @@ public class MatrixMultiply extends Thread{
                double a[]=la[i];
                double c[]=lc[i];
                if (((l+32)&63)==0) {
+                   int l2=l+32;
                    offsets[0] = getoffset{MMul, a};
                    offsets[1] = (short) 0;
-                   offsets[2] = (short) x0+l;
-                   if ((x0+l+64)>x1)
-                       offsets[3]=x1-x0-l-1;
+                   offsets[2] = (short) x0+l2;
+                   if ((x0+l2+64)>x1)
+                       offsets[3]=x1-x0-l2-1;
                    else
                        offsets[3] = (short) 63;
                    System.rangePrefetch(mmul, offsets);