From: bdemsky Date: Tue, 10 Mar 2009 20:05:49 +0000 (+0000) Subject: prfetch change X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b95743bb1bc5595469f141c0fb44851b8c2a9f69;p=IRC.git prfetch change --- diff --git a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java index d6249568..a20608f3 100644 --- a/Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java +++ b/Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java @@ -31,7 +31,7 @@ public class MatrixMultiply extends Thread{ offsets[0] = getoffset{MMul, c}; offsets[1] = (short) 0; System.rangePrefetch(mmul, offsets); - + short[] offsets2=new short[2]; double la[][]=mmul.a; double lc[][]=mmul.c; double lb[][]=mmul.btranspose; @@ -42,19 +42,19 @@ public class MatrixMultiply extends Thread{ double a[]=la[i]; double c[]=lc[i]; if ((l&63)==0) { - 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; - else - offsets[3] = (short) 63; - System.rangePrefetch(mmul, offsets); - - //Get first part of C - offsets[0] = getoffset{MMul, c}; - offsets[1] = (short) 0; - System.rangePrefetch(mmul, offsets); + offsets2[0] = (short) x0+l; + if ((x0+l+64)>x1) { + int x=x1-x0-l-1; + if (x>0) { + offsets[1]=(short) x; + System.rangePrefetch(la, offsets2); + System.rangePrefetch(lc, offsets2); + } + } else { + offsets[1] = (short) 63; + System.rangePrefetch(la, offsets2); + System.rangePrefetch(lc, offsets2); + } } for (int j = y0; j < y1; j++) { double innerProduct=0;