1. Added new 2DConv 15 X 15 kernel size
authoradash <adash>
Mon, 9 Feb 2009 02:38:27 +0000 (02:38 +0000)
committeradash <adash>
Mon, 9 Feb 2009 02:38:27 +0000 (02:38 +0000)
2. Added new Moldyn sizes B and C
3. tabbing
4. Fixed Lookup service benchmarks
5. Fixed compiler to allow Object.getType native method call inside transactions

30 files changed:
Robust/src/Analysis/Locality/LocalityAnalysis.java
Robust/src/Benchmarks/Distributed/LookUpService/LookUpService.java
Robust/src/Benchmarks/Distributed/LookUpService/makefile
Robust/src/Benchmarks/Prefetch/2DConv/dsm/ConvolutionSizeB.java
Robust/src/Benchmarks/Prefetch/2DConv/dsm/ConvolutionSizeC.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/2DConv/dsm/Makefile
Robust/src/Benchmarks/Prefetch/2DConv/javasingle/ConvolutionSizeB.java
Robust/src/Benchmarks/Prefetch/2DConv/javasingle/ConvolutionSizeC.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/2DConv/javasingle/makefile
Robust/src/Benchmarks/Prefetch/Array/makefile
Robust/src/Benchmarks/Prefetch/Chase/Chase.java
Robust/src/Benchmarks/Prefetch/Chase/makefile
Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/MatrixMultiplyN.java
Robust/src/Benchmarks/Prefetch/ManualPrefetch/MatrixMultiply/makefile
Robust/src/Benchmarks/Prefetch/MatrixMultiply/dsm/makefile
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBench.java
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeC.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/Moldyn/dsm/makefile
Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBench.java
Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeC.java [new file with mode: 0644]
Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/makefile
Robust/src/ClassLibrary/DistributedHashMap.java
Robust/src/IR/Tree/SemanticCheck.java
Robust/src/Lex/Keyword.java
Robust/src/Lex/Lexer.java
Robust/src/Main/Main.java
Robust/src/Runtime/DSTM/interface/dsmlock.h
Robust/src/Runtime/garbage.c

index 289f7e888622a6a9f21f8b3dcfc0bf75ca882bb6..56c23f616b52e76b0b9957f21e48a138895cc21b 100644 (file)
@@ -359,7 +359,6 @@ public class LocalityAnalysis {
       case FKind.FlatMethod:
 
       case FKind.FlatOffsetNode:
-       //System.out.println("In FKind.FlatOffsetNode\n");
        processOffsetNode((FlatOffsetNode)fn, currtable);
        break;
 
@@ -428,6 +427,8 @@ public class LocalityAnalysis {
 
       boolean isnative=md.getModifiers().isNative();
       boolean isjoin = md.getClassDesc().getSymbol().equals(TypeUtil.ThreadClass)&&!nodemd.getModifiers().isStatic()&&nodemd.numParameters()==0&&md.getSymbol().equals("join");
+      boolean isObjectgetType = md.getClassDesc().getSymbol().equals("Object") && md.getSymbol().equals("getType");
+      boolean isObjecthashCode = md.getClassDesc().getSymbol().equals("Object") && md.getSymbol().equals("nativehashCode");
 
       LocalityBinding lb=new LocalityBinding(md, isatomic);
       if (isnative&&isatomic) {
@@ -458,7 +459,7 @@ public class LocalityAnalysis {
          throw new Error("Using type that can be either local or global in context:\n"+currlb.getExplanation());
        if(runmethodset==null&&thistype.equals(GLOBAL)&&!isatomic && !isjoin)
          throw new Error("Using global object outside of transaction in context:\n"+currlb.getExplanation());
-       if (runmethodset==null&&isnative&&thistype.equals(GLOBAL) && !isjoin)
+       if (runmethodset==null&&isnative&&thistype.equals(GLOBAL) && !isjoin && !isObjectgetType && !isObjecthashCode)
          throw new Error("Potential call to native method "+md+" on global objects:\n"+currlb.getExplanation());
        lb.setGlobalThis(thistype);
       }
index 1680c5d6c16c2b8a448a0ff0d5a3f8942d51ace2..dfde7ceb23899ddd71ad29c8dc972db1ffa89c56 100644 (file)
@@ -26,15 +26,20 @@ public class LookUpService extends Thread {
       }
     }
     for (int i = 0; i < numtrans; i++) {
-      Random rand = new Random(i);
-      int rdwr = rand.nextInt(100);
-      int rwkey = rand.nextInt(nobjs*numthreads);
-      Integer k = new Integer(rwkey);
-      if (rdwr < rdprob) {
-        Integer tmp = mydhmap.get(k);
-      } else {
-        Integer val = global new Integer(i);
-        mydhmap.put(k, val);
+      atomic {
+        Random rand = new Random(i);
+        int rdwr = rand.nextInt(100);
+        int rwkey = rand.nextInt(nobjs*numthreads);
+        Integer key = global new Integer(rwkey);
+        Object o1 = key;
+        if (rdwr < rdprob) {
+          Object o3 = mydhmap.get(key);
+        } else {
+          Integer val = global new Integer(i);
+          Object o2 = val;
+          mydhmap.put(key, val);
+          mydhmap.put(o1, o2);
+        }
       }
     }
   }
index b31cf2b409438c8e8d486418cca0de8e25dee80b..361451731677be4fa55a1c2c971312ba3fc94a32 100644 (file)
@@ -2,10 +2,12 @@ MAINCLASS=LookUpService
 SRC1=${MAINCLASS}.java \
      ../../../ClassLibrary/DistributedHashMap.java
 FLAGS1=-dsm -dsmcaching -rangeprefetch -optimize -mainclass ${MAINCLASS} -trueprob 0.90
-FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
+FLAGS2=-dsm -dsmcaching -prefetch -optimize -mainclass ${MAINCLASS} -trueprob 0.90
+FLAGS3=-dsm -optimize -mainclass ${MAINCLASS}
 default:
-#      ../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1}
-       ../../../buildscript ${FLAGS1} -o ${MAINCLASS}RangePN ${SRC1}
+       ../../../buildscript ${FLAGS3} -o ${MAINCLASS}NPNC ${SRC1}
+       ../../../buildscript ${FLAGS2} -o ${MAINCLASS}RangePN ${SRC1}
+       ../../../buildscript ${FLAGS1} -o ${MAINCLASS}N ${SRC1}
 
 clean:
        rm -rf tmpbuilddirectory
index 01fb1ac1c23c11dcf869acd050ace86713cb53d2..d5968239da58138973f45609df17376602cd855f 100644 (file)
@@ -93,10 +93,12 @@ public class Convolution extends Thread {
       }
     }
  
+    /*
     atomic{
       System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
       System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
     }
+    */
 
        System.printString("Convolution: Size=");
     System.printInt(SIZE);
@@ -118,10 +120,12 @@ public class Convolution extends Thread {
 
     System.printString("2DConv Done!\n");
 
+    /*
     atomic{
       System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
       System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
     }
+    */
   }
 
   //define 5X5 Gaussian kernel
diff --git a/Robust/src/Benchmarks/Prefetch/2DConv/dsm/ConvolutionSizeC.java b/Robust/src/Benchmarks/Prefetch/2DConv/dsm/ConvolutionSizeC.java
new file mode 100644 (file)
index 0000000..38a6c39
--- /dev/null
@@ -0,0 +1,413 @@
+public class Convolution extends Thread {
+  Image img;
+  int x0,x1,y0,y1;
+
+  public Convolution(Image img, int x0, int x1, int y0, int y1) {
+    this.img = img;
+    this.x0 = x0;
+    this.x1 = x1;
+    this.y0 = y0;
+    this.y1 = y1;
+  }
+
+  public void run() {
+    int kernelHeight=15;
+    int kernelWidth=15;
+
+    double[][] kernel = new double[kernelHeight][kernelWidth];
+    initKernel15(kernel);
+
+    atomic {
+      double tempinput[][] = img.inputImage;
+      double tempout[][] = img.outputImage;
+
+      double tinput1[] = tempinput[x0];
+      double tinput2[] = tempinput[x0+1];
+      double tinput3[] = tempinput[x0+2];
+      double tinput4[] = tempinput[x0+3];
+      double tinput5[] = tempinput[x0+4];
+      double tinput6[] = tempinput[x0+5];
+      double tinput7[] = tempinput[x0+6];
+      double tinput8[] = tempinput[x0+7];
+      double tinput9[] = tempinput[x0+8];
+      double tinput10[] = tempinput[x0+9];
+      double tinput11[] = tempinput[x0+10];
+      double tinput12[] = tempinput[x0+11];
+      double tinput13[] = tempinput[x0+12];
+      double tinput14[] = tempinput[x0+13];
+      double tinput0[] = tinput1;
+
+      int l=x0+14;
+      for(int i=x0;i<x1;i++,l++){
+        double tout[] = tempout[i];
+        tinput0 = tinput1; tinput1=tinput2; tinput2=tinput3; tinput3=tinput4; tinput4=tinput5;
+        tinput5 = tinput6; tinput6=tinput7; tinput7=tinput8; tinput8=tinput9; tinput9=tinput10; 
+        tinput10 = tinput11; tinput11=tinput12; tinput12=tinput13; tinput13=tinput14; tinput14=tempinput[l];
+        for(int j=y0;j<y1;++j){
+          double s=0;
+          for(int b=0;b<kernelHeight;++b) {
+            s+=(tinput0[j+b] * kernel[0][b] + tinput1[j+b] * kernel[1][b] + tinput2[j+b]*kernel[2][b] +
+                tinput3[j+b]*kernel[3][b] + tinput4[j+b]*kernel[4][b] + tinput5[j+b]*kernel[5][b]+ 
+                tinput6[j+b]*kernel[6][b] + tinput7[j+b]*kernel[7][b] + tinput8[j+b]*kernel[8][b]+
+                tinput9[j+b]*kernel[9][b] + tinput10[j+b]*kernel[10][b] + tinput11[j+b]*kernel[11][b]+
+                tinput12[j+b]*kernel[12][b]+ tinput13[j+b]*kernel[13][b] + tinput14[j+b]*kernel[14][b]);
+          }
+          tout[j]=s;
+        }
+      }
+    }
+  }
+
+  public static void main(String[] args) {
+    int SIZE = 256;
+    int NUM_THREADS = 1;
+    int kernelHeight=15, kernelWidth=15;
+
+    if(args.length>0) {
+      NUM_THREADS = Integer.parseInt(args[0]);
+      if(args.length>1) {
+        SIZE = Integer.parseInt(args[1]);
+      }
+    }
+
+    int[] mid = new int[8];
+    mid[0] = (128<<24)|(195<<16)|(136<<8)|162; //dw-10
+    mid[1] = (128<<24)|(195<<16)|(136<<8)|163; //dw-11
+    mid[2] = (128<<24)|(195<<16)|(136<<8)|164; //dw-12
+    mid[3] = (128<<24)|(195<<16)|(136<<8)|165; //dw-13
+    mid[4] = (128<<24)|(195<<16)|(136<<8)|166; //dw-14
+    mid[5] = (128<<24)|(195<<16)|(136<<8)|167; //dw-15
+    mid[6] = (128<<24)|(195<<16)|(136<<8)|168; //dw-16
+    mid[7] = (128<<24)|(195<<16)|(136<<8)|169; //dw-17
+
+    Image img;
+    Convolution[] conv;
+    Convolution tmp;
+
+    atomic {
+      img = global new Image(SIZE,SIZE,kernelHeight,kernelWidth);
+      img.setValues();
+      conv = global new Convolution[NUM_THREADS];
+      int increment=SIZE/NUM_THREADS;
+      int base = 0;
+      for(int i = 0; i<NUM_THREADS; i++) {
+        if((i+1)==NUM_THREADS)
+          conv[i] = global new Convolution(img, base, SIZE, 0, SIZE);
+        else 
+          conv[i] = global new Convolution(img, base, base+increment, 0, SIZE);
+        base+=increment;
+      }
+    }
+    /*
+    atomic{
+      System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
+      System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
+    }
+    */
+
+       System.printString("Convolution: Size=");
+    System.printInt(SIZE);
+       System.printString("\n");
+
+    for(int i = 0; i <NUM_THREADS; i++) {
+      atomic {
+        tmp = conv[i];
+      }
+      tmp.start(mid[i]);
+    }
+
+    for(int i = 0; i < NUM_THREADS; i++) {
+      atomic {
+        tmp = conv[i];
+      }
+      tmp.join();
+    }
+
+    System.printString("2DConv Done!\n");
+
+    /*
+    atomic{
+      System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
+      System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
+    }
+    */
+  }
+
+  //define 15X15 Gaussian kernel
+  public static void initKernel15(double[][] kernel) {
+    kernel[0][0] = 1/256.0;
+    kernel[0][1] = 4/256.0;
+    kernel[0][2] = 6/256.0;
+    kernel[0][3] = 8/256.0;
+    kernel[0][4] = 10/256.0;
+    kernel[0][5] = 12/256.0;
+    kernel[0][6] = 14/256.0;
+    kernel[0][7] = 16/256.0;
+    kernel[0][8] = 14/256.0;
+    kernel[0][9] = 12/256.0;
+    kernel[0][10] = 10/256.0;
+    kernel[0][11] = 8/256.0;
+    kernel[0][12] = 6/256.0;
+    kernel[0][13] = 4/256.0;
+    kernel[0][14] = 1/256.0;
+
+    kernel[1][0] = 4/256.0;
+    kernel[1][1] = 16/256.0;
+    kernel[1][2] = 24/256.0;
+    kernel[1][3] = 32/256.0;
+    kernel[1][4] = 40/256.0;
+    kernel[1][5] = 48/256.0;
+    kernel[1][6] = 56/256.0;
+    kernel[1][7] = 64/256.0;
+    kernel[1][8] = 56/256.0;
+    kernel[1][9] = 48/256.0;
+    kernel[1][10] = 40/256.0;
+    kernel[1][11] = 32/256.0;
+    kernel[1][12] = 24/256.0;
+    kernel[1][13] = 16/256.0;
+    kernel[1][14] = 4/256.0;
+
+    kernel[2][0] = 6/256.0;
+    kernel[2][1] = 24/256.0;
+    kernel[2][2] = 36/256.0;
+    kernel[2][3] = 48/256.0;
+    kernel[2][4] = 60/256.0;
+    kernel[2][5] = 72/256.0;
+    kernel[2][6] = 84/256.0;
+    kernel[2][7] = 96/256.0;
+    kernel[2][8] = 84/256.0;
+    kernel[2][9] = 72/256.0;
+    kernel[2][10] = 60/256.0;
+    kernel[2][11] = 48/256.0;
+    kernel[2][12] = 36/256.0;
+    kernel[2][13] = 24/256.0;
+    kernel[2][14] = 6/256.0;
+
+    kernel[3][0] = 8/256.0;
+    kernel[3][1] = 32/256.0;
+    kernel[3][2] = 48/256.0;
+    kernel[3][3] = 64/256.0;
+    kernel[3][4] = 80/256.0;
+    kernel[3][5] = 96/256.0;
+    kernel[3][6] = 112/256.0;
+    kernel[3][7] = 128/256.0;
+    kernel[3][8] = 112/256.0;
+    kernel[3][9] = 96/256.0;
+    kernel[3][10] = 80/256.0;
+    kernel[3][11] = 64/256.0;
+    kernel[3][12] = 48/256.0;
+    kernel[3][13] = 32/256.0;
+    kernel[3][14] = 8/256.0;
+
+
+    kernel[4][0] = 10/256.0;
+    kernel[4][1] = 40/256.0;
+    kernel[4][2] = 60/256.0;
+    kernel[4][3] = 80/256.0;
+    kernel[4][4] = 100/256.0;
+    kernel[4][5] = 120/256.0;
+    kernel[4][6] = 140/256.0;
+    kernel[4][7] = 160/256.0;
+    kernel[4][8] = 140/256.0;
+    kernel[4][9] = 120/256.0;
+    kernel[4][10] = 100/256.0;
+    kernel[4][11] = 80/256.0;
+    kernel[4][12] = 60/256.0;
+    kernel[4][13] = 40/256.0;
+    kernel[4][14] = 10/256.0;
+
+    kernel[5][0] = 12/256.0;
+    kernel[5][1] = 48/256.0;
+    kernel[5][2] = 72/256.0;
+    kernel[5][3] = 96/256.0;
+    kernel[5][4] = 120/256.0;
+    kernel[5][5] = 144/256.0;
+    kernel[5][6] = 168/256.0;
+    kernel[5][7] = 192/256.0;
+    kernel[5][8] = 168/256.0;
+    kernel[5][9] = 144/256.0;
+    kernel[5][10] = 120/256.0;
+    kernel[5][11] = 96/256.0;
+    kernel[5][12] = 72/256.0;
+    kernel[5][13] = 48/256.0;
+    kernel[5][14] = 12/256.0;
+
+    kernel[6][0] = 14/256.0;
+    kernel[6][1] = 56/256.0;
+    kernel[6][2] = 84/256.0;
+    kernel[6][3] = 112/256.0;
+    kernel[6][4] = 140/256.0;
+    kernel[6][5] = 168/256.0;
+    kernel[6][6] = 196/256.0;
+    kernel[6][7] = 224/256.0;
+    kernel[6][8] = 196/256.0;
+    kernel[6][9] = 168/256.0;
+    kernel[6][10] = 140/256.0;
+    kernel[6][11] = 112/256.0;
+    kernel[6][12] = 84/256.0;
+    kernel[6][13] = 56/256.0;
+    kernel[6][14] = 14/256.0;
+
+    kernel[7][0] = 16/256.0;
+    kernel[7][1] = 64/256.0;
+    kernel[7][2] = 96/256.0;
+    kernel[7][3] = 128/256.0;
+    kernel[7][4] = 160/256.0;
+    kernel[7][5] = 192/256.0;
+    kernel[7][6] = 224/256.0;
+    kernel[7][7] = 256/256.0;
+    kernel[7][8] = 224/256.0;
+    kernel[7][9] = 192/256.0;
+    kernel[7][10] = 160/256.0;
+    kernel[7][11] = 128/256.0;
+    kernel[7][12] = 96/256.0;
+    kernel[7][13] = 64/256.0;
+    kernel[7][14] = 16/256.0;
+
+    kernel[8][0] = 14/256.0;
+    kernel[8][1] = 56/256.0;
+    kernel[8][2] = 84/256.0;
+    kernel[8][3] = 112/256.0;
+    kernel[8][4] = 140/256.0;
+    kernel[8][5] = 168/256.0;
+    kernel[8][6] = 196/256.0;
+    kernel[8][7] = 224/256.0;
+    kernel[8][8] = 196/256.0;
+    kernel[8][9] = 168/256.0;
+    kernel[8][10] = 140/256.0;
+    kernel[8][11] = 112/256.0;
+    kernel[8][12] = 84/256.0;
+    kernel[8][13] = 56/256.0;
+    kernel[8][14] = 14/256.0;
+
+    kernel[9][0] = 12/256.0;
+    kernel[9][1] = 48/256.0;
+    kernel[9][2] = 72/256.0;
+    kernel[9][3] = 96/256.0;
+    kernel[9][4] = 120/256.0;
+    kernel[9][5] = 144/256.0;
+    kernel[9][6] = 168/256.0;
+    kernel[9][7] = 192/256.0;
+    kernel[9][8] = 168/256.0;
+    kernel[9][9] = 144/256.0;
+    kernel[9][10] = 120/256.0;
+    kernel[9][11] = 96/256.0;
+    kernel[9][12] = 72/256.0;
+    kernel[9][13] = 48/256.0;
+    kernel[9][14] = 12/256.0;
+
+    kernel[10][0] = 10/256.0;
+    kernel[10][1] = 40/256.0;
+    kernel[10][2] = 60/256.0;
+    kernel[10][3] = 80/256.0;
+    kernel[10][4] = 100/256.0;
+    kernel[10][5] = 120/256.0;
+    kernel[10][6] = 140/256.0;
+    kernel[10][7] = 160/256.0;
+    kernel[10][8] = 140/256.0;
+    kernel[10][9] = 120/256.0;
+    kernel[10][10] = 100/256.0;
+    kernel[10][11] = 80/256.0;
+    kernel[10][12] = 60/256.0;
+    kernel[10][13] = 40/256.0;
+    kernel[10][14] = 10/256.0;
+
+    kernel[11][0] = 8/256.0;
+    kernel[11][1] = 32/256.0;
+    kernel[11][2] = 48/256.0;
+    kernel[11][3] = 64/256.0;
+    kernel[11][4] = 80/256.0;
+    kernel[11][5] = 96/256.0;
+    kernel[11][6] = 112/256.0;
+    kernel[11][7] = 128/256.0;
+    kernel[11][8] = 112/256.0;
+    kernel[11][9] = 96/256.0;
+    kernel[11][10] = 80/256.0;
+    kernel[11][11] = 64/256.0;
+    kernel[11][12] = 48/256.0;
+    kernel[11][13] = 32/256.0;
+    kernel[11][14] = 8/256.0;
+
+    kernel[12][0] = 6/256.0;
+    kernel[12][1] = 24/256.0;
+    kernel[12][2] = 36/256.0;
+    kernel[12][3] = 48/256.0;
+    kernel[12][4] = 60/256.0;
+    kernel[12][5] = 72/256.0;
+    kernel[12][6] = 84/256.0;
+    kernel[12][7] = 96/256.0;
+    kernel[12][8] = 84/256.0;
+    kernel[12][9] = 72/256.0;
+    kernel[12][10] = 60/256.0;
+    kernel[12][11] = 48/256.0;
+    kernel[12][12] = 36/256.0;
+    kernel[12][13] = 24/256.0;
+    kernel[12][14] = 6/256.0;
+
+    kernel[13][0] = 4/256.0;
+    kernel[13][1] = 16/256.0;
+    kernel[13][2] = 24/256.0;
+    kernel[13][3] = 32/256.0;
+    kernel[13][4] = 40/256.0;
+    kernel[13][5] = 48/256.0;
+    kernel[13][6] = 56/256.0;
+    kernel[13][7] = 64/256.0;
+    kernel[13][8] = 56/256.0;
+    kernel[13][9] = 48/256.0;
+    kernel[13][10] = 40/256.0;
+    kernel[13][11] = 32/256.0;
+    kernel[13][12] = 24/256.0;
+    kernel[13][13] = 16/256.0;
+    kernel[13][14] = 4/256.0;
+
+    kernel[14][0] = 1/256.0;
+    kernel[14][1] = 4/256.0;
+    kernel[14][2] = 6/256.0;
+    kernel[14][3] = 8/256.0;
+    kernel[14][4] = 10/256.0;
+    kernel[14][5] = 12/256.0;
+    kernel[14][6] = 14/256.0;
+    kernel[14][7] = 16/256.0;
+    kernel[14][8] = 14/256.0;
+    kernel[14][9] = 12/256.0;
+    kernel[14][10] = 10/256.0;
+    kernel[14][11] = 8/256.0;
+    kernel[14][12] = 6/256.0;
+    kernel[14][13] = 4/256.0;
+    kernel[14][14] = 1/256.0;
+  }
+}
+
+public class Image {
+  int width, height;
+  int kernelWidth, kernelHeight;
+  double[][] inputImage;
+  double[][] outputImage;
+
+  public Image(int width, int height, int kernelWidth, int kernelHeight) {
+    this.width = width;
+    this.height = height;
+    this.kernelWidth = kernelWidth;
+    this.kernelHeight = kernelHeight;
+    inputImage = global new double[height+kernelHeight-1][width+kernelWidth-1];
+    outputImage = global new double[height][width];
+  }
+
+  /* Create a valid image */
+  public void setValues() {
+    for (int i = 0; i < (height+kernelHeight - 1); i++) {
+      double ainput[] = inputImage[i];
+      for(int j = 0; j < (width+kernelWidth - 1); j++) {
+        ainput[j] = 256-j;
+      }
+    }
+
+    for (int i = 0; i < height; i++){
+      double aout[] = outputImage[i];
+      for(int j = 0; j < width; j++) {
+        aout[j] = 0;
+      }
+    }
+  }
+}
index 89a91aa8c23a33acfdd66a1c76287ee355cb848c..deccf978eef093d71ee239dbe2f24df5bc8d6529 100644 (file)
@@ -1,14 +1,17 @@
 MAINCLASS=Convolution
 SRC=${MAINCLASS}.java
 SRC1=${MAINCLASS}SizeB.java
-FLAGS =-dsm -dsmcaching -prefetch -optimize -excprefetch Image.initKernel -excprefetch Image.setValues -excprefetch Convolution.main -trueprob 0.90 -mainclass ${MAINCLASS}
+SRC2=${MAINCLASS}SizeC.java
+FLAGS =-dsm -dsmcaching -prefetch -optimize -excprefetch Image.initKernel -excprefetch Image.setValues -excprefetch Convolution.main -trueprob 0.95 -mainclass ${MAINCLASS}
 FLAGS1=-dsm -optimize -mainclass ${MAINCLASS}
 
 default:
 #      ../../../../buildscript ${FLAGS1} ${SRC} -o ${MAINCLASS}NPNC
 #      ../../../../buildscript ${FLAGS} ${SRC} -o ${MAINCLASS}N
-       ../../../../buildscript ${FLAGS1} ${SRC1} -o ${MAINCLASS}NPNC
-       ../../../../buildscript ${FLAGS} ${SRC1} -o ${MAINCLASS}N
+#      ../../../../buildscript ${FLAGS1} ${SRC1} -o ${MAINCLASS}NPNC
+#      ../../../../buildscript ${FLAGS} ${SRC1} -o ${MAINCLASS}N
+       ../../../../buildscript ${FLAGS1} ${SRC2} -o ${MAINCLASS}NPNC
+       ../../../../buildscript ${FLAGS} ${SRC2} -o ${MAINCLASS}N
 
 clean:
        rm -rf tmpbuilddirectory
index e54093c63f3b23544a4b50d5aa30edb7bc961692..8b3cdb696feaed16dd1220e7cb9bfe3c29c9e62f 100644 (file)
@@ -115,7 +115,7 @@ public class Convolution extends Thread {
     kernel[0][10] = 1/256.0;
 
     kernel[1][0] = 4/256.0;
-    kernel[1][1] = 8/256.0;
+    kernel[1][1] = 16/256.0;
     kernel[1][2] = 24/256.0;
     kernel[1][3] = 32/256.0;
     kernel[1][4] = 40/256.0;
diff --git a/Robust/src/Benchmarks/Prefetch/2DConv/javasingle/ConvolutionSizeC.java b/Robust/src/Benchmarks/Prefetch/2DConv/javasingle/ConvolutionSizeC.java
new file mode 100644 (file)
index 0000000..d8b6c0f
--- /dev/null
@@ -0,0 +1,385 @@
+public class Convolution extends Thread {
+  Image img;
+  int x0,x1,y0,y1;
+
+  public Convolution(Image img, int x0, int x1, int y0, int y1) {
+    this.img = img;
+    this.x0 = x0;
+    this.x1 = x1;
+    this.y0 = y0;
+    this.y1 = y1;
+  }
+
+  public void run() {
+    int kernelHeight=15;
+    int kernelWidth=15;
+
+    double[][] kernel = new double[kernelHeight][kernelWidth];
+    initKernel15(kernel);
+
+    double tempinput[][] = img.inputImage;
+    double tempout[][] = img.outputImage;
+
+    double tinput1[] = tempinput[x0];
+    double tinput2[] = tempinput[x0+1];
+    double tinput3[] = tempinput[x0+2];
+    double tinput4[] = tempinput[x0+3];
+    double tinput5[] = tempinput[x0+4];
+    double tinput6[] = tempinput[x0+5];
+    double tinput7[] = tempinput[x0+6];
+    double tinput8[] = tempinput[x0+7];
+    double tinput9[] = tempinput[x0+8];
+    double tinput10[] = tempinput[x0+9];
+    double tinput11[] = tempinput[x0+10];
+    double tinput12[] = tempinput[x0+11];
+    double tinput13[] = tempinput[x0+12];
+    double tinput14[] = tempinput[x0+13];
+    double tinput0[] = tinput1;
+
+    int l=x0+14;
+    for(int i=x0;i<x1;i++,l++){
+      double tout[] = tempout[i];
+      tinput0 = tinput1; tinput1=tinput2; tinput2=tinput3; tinput3=tinput4; tinput4=tinput5;
+      tinput5 = tinput6; tinput6=tinput7; tinput7=tinput8; tinput8=tinput9; tinput9=tinput10; 
+      tinput10 = tinput11; tinput11=tinput12; tinput12=tinput13; tinput13=tinput14; tinput14=tempinput[l];
+      for(int j=y0;j<y1;++j){
+        double s=0;
+        for(int b=0;b<kernelHeight;++b) {
+          s+=(tinput0[j+b] * kernel[0][b] + tinput1[j+b] * kernel[1][b] + tinput2[j+b]*kernel[2][b]+
+              tinput3[j+b]*kernel[3][b] + tinput4[j+b]*kernel[4][b] + tinput5[j+b]*kernel[5][b]+ 
+              tinput6[j+b]*kernel[6][b] + tinput7[j+b]*kernel[7][b] + tinput8[j+b]*kernel[8][b]+
+              tinput9[j+b]*kernel[9][b] + tinput10[j+b]*kernel[10][b] + tinput11[j+b]*kernel[11][b]+
+              tinput12[j+b]*kernel[12][b]+ tinput13[j+b]*kernel[13][b] + tinput14[j+b]*kernel[14][b]);
+        }
+        tout[j]=s;
+      }
+    }
+  }
+
+  public static void main(String[] args) {
+    int SIZE = 256;
+    int NUM_THREADS = 1;
+    int kernelHeight=15, kernelWidth=15;
+
+    if(args.length>0) {
+      NUM_THREADS = Integer.parseInt(args[0]);
+      if(args.length>1) {
+        SIZE = Integer.parseInt(args[1]);
+      }
+    }
+
+    Image img;
+    Convolution[] conv;
+    Convolution tmp;
+
+    img = new Image(SIZE,SIZE,kernelHeight,kernelWidth);
+    img.setValues();
+    conv = new Convolution[NUM_THREADS];
+    int increment=SIZE/NUM_THREADS;
+    int base = 0;
+    for(int i = 0; i<NUM_THREADS; i++) {
+      if((i+1)==NUM_THREADS)
+        conv[i] = new Convolution(img, base, SIZE, 0, SIZE);
+      else 
+        conv[i] = new Convolution(img, base, base+increment, 0, SIZE);
+      base+=increment;
+    }
+
+    /*
+    System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
+    System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
+    */
+
+       System.printString("Convolution: Size=");
+    System.printInt(SIZE);
+       System.printString("\n");
+
+    for(int i = 0; i <NUM_THREADS; i++) {
+      tmp = conv[i];
+      tmp.run();
+    }
+
+    /*
+    System.printString("img.outputImage[10][20] = " +(int) img.outputImage[10][20] + "\n");
+    System.printString("img.outputImage[256][890] = " +(int) img.outputImage[256][890] + "\n");
+    */
+    System.printString("2DConv Done!\n");
+  }
+
+  //define 15X15 Gaussian kernel
+  public static void initKernel15(double[][] kernel) {
+    kernel[0][0] = 1/256.0;
+    kernel[0][1] = 4/256.0;
+    kernel[0][2] = 6/256.0;
+    kernel[0][3] = 8/256.0;
+    kernel[0][4] = 10/256.0;
+    kernel[0][5] = 12/256.0;
+    kernel[0][6] = 14/256.0;
+    kernel[0][7] = 16/256.0;
+    kernel[0][8] = 14/256.0;
+    kernel[0][9] = 12/256.0;
+    kernel[0][10] = 10/256.0;
+    kernel[0][11] = 8/256.0;
+    kernel[0][12] = 6/256.0;
+    kernel[0][13] = 4/256.0;
+    kernel[0][14] = 1/256.0;
+
+    kernel[1][0] = 4/256.0;
+    kernel[1][1] = 16/256.0;
+    kernel[1][2] = 24/256.0;
+    kernel[1][3] = 32/256.0;
+    kernel[1][4] = 40/256.0;
+    kernel[1][5] = 48/256.0;
+    kernel[1][6] = 56/256.0;
+    kernel[1][7] = 64/256.0;
+    kernel[1][8] = 56/256.0;
+    kernel[1][9] = 48/256.0;
+    kernel[1][10] = 40/256.0;
+    kernel[1][11] = 32/256.0;
+    kernel[1][12] = 24/256.0;
+    kernel[1][13] = 16/256.0;
+    kernel[1][14] = 4/256.0;
+
+    kernel[2][0] = 6/256.0;
+    kernel[2][1] = 24/256.0;
+    kernel[2][2] = 36/256.0;
+    kernel[2][3] = 48/256.0;
+    kernel[2][4] = 60/256.0;
+    kernel[2][5] = 72/256.0;
+    kernel[2][6] = 84/256.0;
+    kernel[2][7] = 96/256.0;
+    kernel[2][8] = 84/256.0;
+    kernel[2][9] = 72/256.0;
+    kernel[2][10] = 60/256.0;
+    kernel[2][11] = 48/256.0;
+    kernel[2][12] = 36/256.0;
+    kernel[2][13] = 24/256.0;
+    kernel[2][14] = 6/256.0;
+
+    kernel[3][0] = 8/256.0;
+    kernel[3][1] = 32/256.0;
+    kernel[3][2] = 48/256.0;
+    kernel[3][3] = 64/256.0;
+    kernel[3][4] = 80/256.0;
+    kernel[3][5] = 96/256.0;
+    kernel[3][6] = 112/256.0;
+    kernel[3][7] = 128/256.0;
+    kernel[3][8] = 112/256.0;
+    kernel[3][9] = 96/256.0;
+    kernel[3][10] = 80/256.0;
+    kernel[3][11] = 64/256.0;
+    kernel[3][12] = 48/256.0;
+    kernel[3][13] = 32/256.0;
+    kernel[3][14] = 8/256.0;
+
+
+    kernel[4][0] = 10/256.0;
+    kernel[4][1] = 40/256.0;
+    kernel[4][2] = 60/256.0;
+    kernel[4][3] = 80/256.0;
+    kernel[4][4] = 100/256.0;
+    kernel[4][5] = 120/256.0;
+    kernel[4][6] = 140/256.0;
+    kernel[4][7] = 160/256.0;
+    kernel[4][8] = 140/256.0;
+    kernel[4][9] = 120/256.0;
+    kernel[4][10] = 100/256.0;
+    kernel[4][11] = 80/256.0;
+    kernel[4][12] = 60/256.0;
+    kernel[4][13] = 40/256.0;
+    kernel[4][14] = 10/256.0;
+
+    kernel[5][0] = 12/256.0;
+    kernel[5][1] = 48/256.0;
+    kernel[5][2] = 72/256.0;
+    kernel[5][3] = 96/256.0;
+    kernel[5][4] = 120/256.0;
+    kernel[5][5] = 144/256.0;
+    kernel[5][6] = 168/256.0;
+    kernel[5][7] = 192/256.0;
+    kernel[5][8] = 168/256.0;
+    kernel[5][9] = 144/256.0;
+    kernel[5][10] = 120/256.0;
+    kernel[5][11] = 96/256.0;
+    kernel[5][12] = 72/256.0;
+    kernel[5][13] = 48/256.0;
+    kernel[5][14] = 12/256.0;
+
+    kernel[6][0] = 14/256.0;
+    kernel[6][1] = 56/256.0;
+    kernel[6][2] = 84/256.0;
+    kernel[6][3] = 112/256.0;
+    kernel[6][4] = 140/256.0;
+    kernel[6][5] = 168/256.0;
+    kernel[6][6] = 196/256.0;
+    kernel[6][7] = 224/256.0;
+    kernel[6][8] = 196/256.0;
+    kernel[6][9] = 168/256.0;
+    kernel[6][10] = 140/256.0;
+    kernel[6][11] = 112/256.0;
+    kernel[6][12] = 84/256.0;
+    kernel[6][13] = 56/256.0;
+    kernel[6][14] = 14/256.0;
+
+    kernel[7][0] = 16/256.0;
+    kernel[7][1] = 64/256.0;
+    kernel[7][2] = 96/256.0;
+    kernel[7][3] = 128/256.0;
+    kernel[7][4] = 160/256.0;
+    kernel[7][5] = 192/256.0;
+    kernel[7][6] = 224/256.0;
+    kernel[7][7] = 256/256.0;
+    kernel[7][8] = 224/256.0;
+    kernel[7][9] = 192/256.0;
+    kernel[7][10] = 160/256.0;
+    kernel[7][11] = 128/256.0;
+    kernel[7][12] = 96/256.0;
+    kernel[7][13] = 64/256.0;
+    kernel[7][14] = 16/256.0;
+
+    kernel[8][0] = 14/256.0;
+    kernel[8][1] = 56/256.0;
+    kernel[8][2] = 84/256.0;
+    kernel[8][3] = 112/256.0;
+    kernel[8][4] = 140/256.0;
+    kernel[8][5] = 168/256.0;
+    kernel[8][6] = 196/256.0;
+    kernel[8][7] = 224/256.0;
+    kernel[8][8] = 196/256.0;
+    kernel[8][9] = 168/256.0;
+    kernel[8][10] = 140/256.0;
+    kernel[8][11] = 112/256.0;
+    kernel[8][12] = 84/256.0;
+    kernel[8][13] = 56/256.0;
+    kernel[8][14] = 14/256.0;
+
+    kernel[9][0] = 12/256.0;
+    kernel[9][1] = 48/256.0;
+    kernel[9][2] = 72/256.0;
+    kernel[9][3] = 96/256.0;
+    kernel[9][4] = 120/256.0;
+    kernel[9][5] = 144/256.0;
+    kernel[9][6] = 168/256.0;
+    kernel[9][7] = 192/256.0;
+    kernel[9][8] = 168/256.0;
+    kernel[9][9] = 144/256.0;
+    kernel[9][10] = 120/256.0;
+    kernel[9][11] = 96/256.0;
+    kernel[9][12] = 72/256.0;
+    kernel[9][13] = 48/256.0;
+    kernel[9][14] = 12/256.0;
+
+    kernel[10][0] = 10/256.0;
+    kernel[10][1] = 40/256.0;
+    kernel[10][2] = 60/256.0;
+    kernel[10][3] = 80/256.0;
+    kernel[10][4] = 100/256.0;
+    kernel[10][5] = 120/256.0;
+    kernel[10][6] = 140/256.0;
+    kernel[10][7] = 160/256.0;
+    kernel[10][8] = 140/256.0;
+    kernel[10][9] = 120/256.0;
+    kernel[10][10] = 100/256.0;
+    kernel[10][11] = 80/256.0;
+    kernel[10][12] = 60/256.0;
+    kernel[10][13] = 40/256.0;
+    kernel[10][14] = 10/256.0;
+
+    kernel[11][0] = 8/256.0;
+    kernel[11][1] = 32/256.0;
+    kernel[11][2] = 48/256.0;
+    kernel[11][3] = 64/256.0;
+    kernel[11][4] = 80/256.0;
+    kernel[11][5] = 96/256.0;
+    kernel[11][6] = 112/256.0;
+    kernel[11][7] = 128/256.0;
+    kernel[11][8] = 112/256.0;
+    kernel[11][9] = 96/256.0;
+    kernel[11][10] = 80/256.0;
+    kernel[11][11] = 64/256.0;
+    kernel[11][12] = 48/256.0;
+    kernel[11][13] = 32/256.0;
+    kernel[11][14] = 8/256.0;
+
+    kernel[12][0] = 6/256.0;
+    kernel[12][1] = 24/256.0;
+    kernel[12][2] = 36/256.0;
+    kernel[12][3] = 48/256.0;
+    kernel[12][4] = 60/256.0;
+    kernel[12][5] = 72/256.0;
+    kernel[12][6] = 84/256.0;
+    kernel[12][7] = 96/256.0;
+    kernel[12][8] = 84/256.0;
+    kernel[12][9] = 72/256.0;
+    kernel[12][10] = 60/256.0;
+    kernel[12][11] = 48/256.0;
+    kernel[12][12] = 36/256.0;
+    kernel[12][13] = 24/256.0;
+    kernel[12][14] = 6/256.0;
+
+    kernel[13][0] = 4/256.0;
+    kernel[13][1] = 16/256.0;
+    kernel[13][2] = 24/256.0;
+    kernel[13][3] = 32/256.0;
+    kernel[13][4] = 40/256.0;
+    kernel[13][5] = 48/256.0;
+    kernel[13][6] = 56/256.0;
+    kernel[13][7] = 64/256.0;
+    kernel[13][8] = 56/256.0;
+    kernel[13][9] = 48/256.0;
+    kernel[13][10] = 40/256.0;
+    kernel[13][11] = 32/256.0;
+    kernel[13][12] = 24/256.0;
+    kernel[13][13] = 16/256.0;
+    kernel[13][14] = 4/256.0;
+
+    kernel[14][0] = 1/256.0;
+    kernel[14][1] = 4/256.0;
+    kernel[14][2] = 6/256.0;
+    kernel[14][3] = 8/256.0;
+    kernel[14][4] = 10/256.0;
+    kernel[14][5] = 12/256.0;
+    kernel[14][6] = 14/256.0;
+    kernel[14][7] = 16/256.0;
+    kernel[14][8] = 14/256.0;
+    kernel[14][9] = 12/256.0;
+    kernel[14][10] = 10/256.0;
+    kernel[14][11] = 8/256.0;
+    kernel[14][12] = 6/256.0;
+    kernel[14][13] = 4/256.0;
+    kernel[14][14] = 1/256.0;
+  }
+}
+
+public class Image {
+  int width, height;
+  int kernelWidth, kernelHeight;
+  double[][] inputImage;
+  double[][] outputImage;
+
+  public Image(int width, int height, int kernelWidth, int kernelHeight) {
+    this.width = width;
+    this.height = height;
+    this.kernelWidth = kernelWidth;
+    this.kernelHeight = kernelHeight;
+    inputImage = new double[height+kernelHeight-1][width+kernelWidth-1];
+    outputImage = new double[height][width];
+  }
+
+  /* Create a valid image */
+  public void setValues() {
+    for (int i = 0; i < (height+kernelHeight - 1); i++) {
+      double ainput[] = inputImage[i];
+      for(int j = 0; j < (width+kernelWidth - 1); j++) {
+        ainput[j] = 256-j;
+      }
+    }
+
+    for (int i = 0; i < height; i++){
+      double aout[] = outputImage[i];
+      for(int j = 0; j < width; j++) {
+        aout[j] = 0;
+      }
+    }
+  }
+}
index e6c6036e47ec0eaa62d99618454eb45d14d04838..da20233478074fc192eeb6ba1834eec03784182d 100644 (file)
@@ -1,9 +1,11 @@
 MAINCLASS=Convolution
 SRC=${MAINCLASS}.java 
 SRC1=${MAINCLASS}SizeB.java 
+SRC2=${MAINCLASS}SizeC.java 
 default:
 #../../../../buildscript -optimize -thread -mainclass ${MAINCLASS} ${SRC} -o ${MAINCLASS}
-       ../../../../buildscript -optimize -thread -mainclass ${MAINCLASS} ${SRC1} -o ${MAINCLASS}
+#../../../../buildscript -optimize -thread -mainclass ${MAINCLASS} ${SRC1} -o ${MAINCLASS}
+       ../../../../buildscript -optimize -thread -mainclass ${MAINCLASS} ${SRC2} -o ${MAINCLASS}
 
 clean:
        rm -rf tmpbuilddirectory
index 4bb745fd6ebe30c2afd0431183ee61b8d1b2ac51..580cf62d25c414c2501ce1bf30c8b4093aeacda9 100644 (file)
@@ -12,5 +12,5 @@ default:
        cp ${MAINCLASS}P.bin ${MAINCLASS}1.bin
 
 clean:
-       rm *.bin
        rm -rf tmpbuilddirectory
+       rm *.bin
index a56b9eb52717b0ff130db6e79ad7764c870bf3d4..378068758113ee4d67cd7f1b2948e490568f7837 100644 (file)
@@ -1,8 +1,8 @@
 public class Foo {
+    Foo next;
     public Foo() {
-       next=null;
+      next=null;
     }
-    Foo next;
 }
 
 public class Chase extends Thread {
@@ -31,8 +31,18 @@ public class Chase extends Thread {
     public void run() {
         atomic {
            Foo b=base;
+        /*
+        //Running small test for manual prefetch
+        //TODO Remove later 
+        Object o = b;
+        short noffsets = (short) 2;
+        short[] offsets = new short[2];
+        offsets[0] = getoffset{Foo, next};
+        offsets[1] = (short)5;
+        System.rangePrefetch(o, offsets);
+        */
            while(b!=null)
-               b=b.next;
+          b=b.next;
         }
     }
 }
index 9256297774eb51ca3ff0cfa6ccc2036aa91723ed..b06f78076d47ab56852d211b5da080c0f52084f0 100644 (file)
@@ -1,18 +1,16 @@
 MAINCLASS=Chase
 SRC1=${MAINCLASS}.java
 FLAGS=-dsm -prefetch -dsmcaching -optimize -excprefetch Chase.main -excprefetch Chase.Chase -mainclass ${MAINCLASS} -trueprob 0.7
-FLAGS1=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.7
-FLAGS2=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.7
+FLAGS1=-dsm -rangeprefetch -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.7
+FLAGS2=-dsm -dsmcaching -optimize -mainclass ${MAINCLASS} -trueprob 0.7
+FLAGS3=-dsm -optimize -mainclass ${MAINCLASS} -trueprob 0.7
 #for testing no java option
 #FLAGS=-dsm -prefetch -optimize -debug -excprefetch Chase.main -excprefetch Chase.Chase -mainclass ${MAINCLASS} -trueprob 0.99 -nojava
 default:
-       ../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1}
-       ../../../buildscript ${FLAGS1} -o ${MAINCLASS}NP ${SRC1}
-       ../../../buildscript ${FLAGS} -o ${MAINCLASS}P ${SRC1}
-       cp ${MAINCLASS}NPNC.bin ${MAINCLASS}1NPNC.bin
-       cp ${MAINCLASS}NP.bin ${MAINCLASS}1NP.bin
-       cp ${MAINCLASS}P.bin ${MAINCLASS}1.bin
+       ../../../buildscript ${FLAGS3} -o ${MAINCLASS}NPNC ${SRC1}
+       ../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1}
+       ../../../buildscript ${FLAGS1} -o ${MAINCLASS}RangeP ${SRC1}
 
 clean:
-       rm *.bin
        rm -rf tmpbuilddirectory
+       rm *.bin
index d0bba69ce6caf70d742152d8a8fa5cf012ab2532..ae2ae5d11f949b4e4fc7d46c5daa811a69ec41c6 100644 (file)
@@ -7,7 +7,6 @@ public class MatrixMultiply extends Thread{
        this.y0 = y0;
        this.x1 = x1;
        this.y1 = y1;
-    //System.printString("x0 = " +x0+" x1= "+x1+" y0= "+y0+" y1= "+y1+"\n");
     }
     
     public void run() {
@@ -18,8 +17,7 @@ public class MatrixMultiply extends Thread{
         offsets[0] = getoffset{MMul, a};
         offsets[1] = (short) 0;
         offsets[2] = (short) x0;
-        //offsets[3] = (short) (x1 - x0);
-        offsets[3] = (short) 10;
+        offsets[3] = (short) (x1 - x0 -1);
         System.rangePrefetch(o, offsets);
 
         // Prefetch mmul.btranspose[][] matrix
@@ -28,8 +26,7 @@ public class MatrixMultiply extends Thread{
         offsets1[0] = getoffset{MMul, btranspose};
         offsets1[1] = (short) 0;
         offsets1[2] = (short) x0;
-       // offsets1[3] = (short) (x1 - x0);
-        offsets1[3] = (short) 10;
+        offsets1[3] = (short) (x1 - x0 -1);
         System.rangePrefetch(o1, offsets1);
 
         // Prefetch mmul.c[][] matrix
@@ -38,8 +35,7 @@ public class MatrixMultiply extends Thread{
         offsets2[0] = getoffset{MMul, c};
         offsets2[1] = (short) 0;
         offsets2[2] = (short) x0;
-        //offsets2[3] = (short) (x1 - x0);
-        offsets2[3] = (short) 10;
+        offsets2[3] = (short) (x1 - x0 -1);
         System.rangePrefetch(o2, offsets2);
 
            double la[][]=mmul.a;
index 22d733c4e2481dcc6ef4bde147ee065001357e8c..9a893f214368bed288a29ed98af6073fdc26dd1a 100644 (file)
@@ -1,12 +1,12 @@
 MAINCLASS=MatrixMultiply
 SRC1=${MAINCLASS}N.java
 FLAGS=-dsm -dsmcaching -prefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98
-FLAGS1=-dsm -dsmcaching -rangeprefetch -optimize -excprefetch MatrixMultiply.main -excprefetch MMul.setValues -excprefetch MMul.transpose -mainclass ${MAINCLASS} -trueprob 0.98
+FLAGS1=-dsm -dsmcaching -rangeprefetch -optimize -mainclass ${MAINCLASS} -trueprob 0.98
 FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
 default:
        ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1}
-       ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}RangePN ${SRC1}
        ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1}
+       ../../../../buildscript ${FLAGS1} -o ${MAINCLASS}RangePN ${SRC1}
 
 clean:
        rm -rf tmpbuilddirectory
index b558b49a7c7578e68b60cb5f0e27824a4ad3ef8e..d95d81fb258c76a44d4e3a46bf76a1d641a49762 100644 (file)
@@ -7,8 +7,8 @@ FLAGS2=-dsm -optimize -mainclass ${MAINCLASS}
 default:
        ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC ${SRC1}
        ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N ${SRC1}
-       ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2}
-       ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2}
+#      ../../../../buildscript ${FLAGS2} -o ${MAINCLASS}NPNC200 ${SRC2}
+#      ../../../../buildscript ${FLAGS} -o ${MAINCLASS}N200 ${SRC2}
 
 clean:
        rm -rf tmpbuilddirectory
index 6d0239819cb11b563531009363b4f3efe6b1986f..00852131a345d1cd2910bdf747eab29128088830 100644 (file)
@@ -51,9 +51,10 @@ public class JGFMolDynBench {
 
   public void JGFinitialise(){
     interactions = 0;
-    datasizes = global new int[2];
+    datasizes = global new int[3];
     datasizes[0] = 8;
     datasizes[1] = 13;
+    datasizes[2] = 18;
 
     mm = datasizes[size];
     PARTSIZE = mm*mm*mm*4;
diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeB.java
new file mode 100644 (file)
index 0000000..60621b5
--- /dev/null
@@ -0,0 +1,85 @@
+/**************************************************************************
+ *                                                                         *
+ *         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
+ *                                                                         *
+ *                            produced by                                  *
+ *                                                                         *
+ *                  Java Grande Benchmarking Project                       *
+ *                                                                         *
+ *                                at                                       *
+ *                                                                         *
+ *                Edinburgh Parallel Computing Centre                      *
+ *                                                                         * 
+ *                email: epcc-javagrande@epcc.ed.ac.uk                     *
+ *                                                                         *
+ *                                                                         *
+ *      This version copyright (c) The University of Edinburgh, 2001.      *
+ *                         All rights reserved.                            *
+ *                                                                         *
+ **************************************************************************/
+public class JGFMolDynBenchSizeA { 
+
+    public static void main(String argv[]){
+    int nthreads;
+    if(argv.length != 0 ) {
+      nthreads = Integer.parseInt(argv[0]);
+    } else {
+      System.printString("The no of threads has not been specified, defaulting to 1\n");
+      System.printString("  " + "\n");
+      nthreads = 1;
+    }
+
+    JGFInstrumentor instr = new JGFInstrumentor();
+    JGFInstrumentor.printHeader(3,0,nthreads);
+
+    JGFMolDynBench mold;
+    atomic {
+      mold = global new JGFMolDynBench(nthreads); 
+    }
+    int size = 1;
+    JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
+    JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
+
+    atomic {
+      mold.JGFsetsize(size); 
+    }
+
+    JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
+
+    JGFMolDynBench tmp;
+    atomic {
+      mold.JGFinitialise(); 
+    }
+    JGFMolDynBench.JGFapplication(mold); 
+
+    /* Validate data */
+    double[] refval = new double[2];
+    refval[0] = 1731.4306625334357;
+    refval[1] = 7397.392307839352;
+    double dval;
+    atomic {
+      dval = mold.ek[0].d;
+    }
+    double dev = Math.fabs(dval - refval[size]);
+    long l = (long) refval[size] *1000000;
+    long r = (long) dval * 1000000;
+    if (l != r ){
+      System.printString("Validation failed\n");
+      System.printString("Kinetic Energy = " + (long)dval + "  " + (long)dev + "  " + size + "\n");
+    }
+
+    JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
+    double interactions;
+    atomic {
+      interactions = mold.interactions;
+    }
+
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) interactions, instr.timers);
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
+
+    JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers); 
+    JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers); 
+    System.printString("Finished\n");
+  }
+}
+
diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeC.java b/Robust/src/Benchmarks/Prefetch/Moldyn/dsm/JGFMolDynBenchSizeC.java
new file mode 100644 (file)
index 0000000..c0d7bf9
--- /dev/null
@@ -0,0 +1,87 @@
+/**************************************************************************
+ *                                                                         *
+ *         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
+ *                                                                         *
+ *                            produced by                                  *
+ *                                                                         *
+ *                  Java Grande Benchmarking Project                       *
+ *                                                                         *
+ *                                at                                       *
+ *                                                                         *
+ *                Edinburgh Parallel Computing Centre                      *
+ *                                                                         * 
+ *                email: epcc-javagrande@epcc.ed.ac.uk                     *
+ *                                                                         *
+ *                                                                         *
+ *      This version copyright (c) The University of Edinburgh, 2001.      *
+ *                         All rights reserved.                            *
+ *                                                                         *
+ **************************************************************************/
+public class JGFMolDynBenchSizeA { 
+
+    public static void main(String argv[]){
+    int nthreads;
+    if(argv.length != 0 ) {
+      nthreads = Integer.parseInt(argv[0]);
+    } else {
+      System.printString("The no of threads has not been specified, defaulting to 1\n");
+      System.printString("  " + "\n");
+      nthreads = 1;
+    }
+
+    JGFInstrumentor instr = new JGFInstrumentor();
+    JGFInstrumentor.printHeader(3,0,nthreads);
+
+    JGFMolDynBench mold;
+    atomic {
+      mold = global new JGFMolDynBench(nthreads); 
+    }
+    int size = 2;
+    JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
+    JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
+
+    atomic {
+      mold.JGFsetsize(size); 
+    }
+
+    JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
+
+    JGFMolDynBench tmp;
+    atomic {
+      mold.JGFinitialise(); 
+    }
+    JGFMolDynBench.JGFapplication(mold); 
+
+    /* Validate data */
+    /*
+    double[] refval = new double[2];
+    refval[0] = 1731.4306625334357;
+    refval[1] = 7397.392307839352;
+    double dval;
+    atomic {
+      dval = mold.ek[0].d;
+    }
+    double dev = Math.fabs(dval - refval[size]);
+    long l = (long) refval[size] *1000000;
+    long r = (long) dval * 1000000;
+    if (l != r ){
+      System.printString("Validation failed\n");
+      System.printString("Kinetic Energy = " + (long)dval + "  " + (long)dev + "  " + size + "\n");
+    }
+
+    JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
+    double interactions;
+    atomic {
+      interactions = mold.interactions;
+    }
+
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) interactions, instr.timers);
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
+
+    JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers); 
+    JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers); 
+    */
+    System.printString("Finished\n");
+  }
+}
+
index 21c4f253f47005b3ff8230e3b74e5d123613f4dc..597150ba5d1931b13f16280f7ddbd972cf535844 100644 (file)
@@ -1,4 +1,4 @@
-MAINCLASS=JGFMolDynBenchSizeA
+MAINCLASS=JGFMolDynBenchSizeB
 SRC=${MAINCLASS}.java \
 JGFInstrumentor.java \
 JGFTimer.java \
index 64c41a08889e64ad3b812906b689e8db4305cf69..e67e9bf3072ae97aa48505afca107e47475bd460 100644 (file)
@@ -51,9 +51,10 @@ public class JGFMolDynBench {
 
   public void JGFinitialise(){
     interactions = 0;
-    datasizes = new int[2];
+    datasizes = new int[3];
     datasizes[0] = 8;
     datasizes[1] = 13;
+    datasizes[2] = 18;
 
     mm = datasizes[size];
     PARTSIZE = mm*mm*mm*4;
diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeB.java
new file mode 100644 (file)
index 0000000..5fff886
--- /dev/null
@@ -0,0 +1,74 @@
+/**************************************************************************
+ *                                                                         *
+ *         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
+ *                                                                         *
+ *                            produced by                                  *
+ *                                                                         *
+ *                  Java Grande Benchmarking Project                       *
+ *                                                                         *
+ *                                at                                       *
+ *                                                                         *
+ *                Edinburgh Parallel Computing Centre                      *
+ *                                                                         * 
+ *                email: epcc-javagrande@epcc.ed.ac.uk                     *
+ *                                                                         *
+ *                                                                         *
+ *      This version copyright (c) The University of Edinburgh, 2001.      *
+ *                         All rights reserved.                            *
+ *                                                                         *
+ **************************************************************************/
+public class JGFMolDynBenchSizeA { 
+
+    public static void main(String argv[]){
+    int nthreads;
+    if(argv.length != 0 ) {
+      nthreads = Integer.parseInt(argv[0]);
+    } else {
+      System.printString("The no of threads has not been specified, defaulting to 1\n");
+      System.printString("  " + "\n");
+      nthreads = 1;
+    }
+
+    JGFInstrumentor instr = new JGFInstrumentor();
+    JGFInstrumentor.printHeader(3,0,nthreads);
+
+    JGFMolDynBench mold;
+    mold = new JGFMolDynBench(nthreads); 
+    int size = 1;
+    JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
+    JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
+
+    mold.JGFsetsize(size); 
+
+    JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
+
+    JGFMolDynBench tmp;
+    mold.JGFinitialise(); 
+    JGFMolDynBench.JGFapplication(mold); 
+
+    /* Validate data */
+    refval[0] = 1731.4306625334357;
+    refval[1] = 7397.392307839352;
+    double dval;
+    dval = mold.ek[0].d;
+    double dev = Math.fabs(dval - refval[size]);
+    long l = (long) refval[size] *1000000;
+    long r = (long) dval * 1000000;
+    if (l != r ){
+      System.printString("Validation failed\n");
+      System.printString("Kinetic Energy = " + (long)dval + "  " + (long)dev + "  " + size + "\n");
+    }
+
+    JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
+    double interactions;
+    interactions = mold.interactions;
+
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) interactions, instr.timers);
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
+
+    JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers); 
+    JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers); 
+    System.printString("Finished\n");
+  }
+}
+
diff --git a/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeC.java b/Robust/src/Benchmarks/Prefetch/Moldyn/javasingle/JGFMolDynBenchSizeC.java
new file mode 100644 (file)
index 0000000..d814682
--- /dev/null
@@ -0,0 +1,77 @@
+/**************************************************************************
+ *                                                                         *
+ *         Java Grande Forum Benchmark Suite - Thread Version 1.0          *
+ *                                                                         *
+ *                            produced by                                  *
+ *                                                                         *
+ *                  Java Grande Benchmarking Project                       *
+ *                                                                         *
+ *                                at                                       *
+ *                                                                         *
+ *                Edinburgh Parallel Computing Centre                      *
+ *                                                                         * 
+ *                email: epcc-javagrande@epcc.ed.ac.uk                     *
+ *                                                                         *
+ *                                                                         *
+ *      This version copyright (c) The University of Edinburgh, 2001.      *
+ *                         All rights reserved.                            *
+ *                                                                         *
+ **************************************************************************/
+public class JGFMolDynBenchSizeA { 
+
+    public static void main(String argv[]){
+    int nthreads;
+    if(argv.length != 0 ) {
+      nthreads = Integer.parseInt(argv[0]);
+    } else {
+      System.printString("The no of threads has not been specified, defaulting to 1\n");
+      System.printString("  " + "\n");
+      nthreads = 1;
+    }
+
+    JGFInstrumentor instr = new JGFInstrumentor();
+    JGFInstrumentor.printHeader(3,0,nthreads);
+
+    JGFMolDynBench mold;
+    mold = new JGFMolDynBench(nthreads); 
+    int size = 2;
+    JGFInstrumentor.addTimer("Section3:MolDyn:Total", "Solutions",size, instr.timers);
+    JGFInstrumentor.addTimer("Section3:MolDyn:Run", "Interactions",size, instr.timers);
+
+    mold.JGFsetsize(size); 
+
+    JGFInstrumentor.startTimer("Section3:MolDyn:Total", instr.timers);
+
+    JGFMolDynBench tmp;
+    mold.JGFinitialise(); 
+    JGFMolDynBench.JGFapplication(mold); 
+
+    /* Validate data */
+    /*
+    double[] refval = new double[2];
+    refval[0] = 1731.4306625334357;
+    refval[1] = 7397.392307839352;
+    double dval;
+    dval = mold.ek[0].d;
+    double dev = Math.fabs(dval - refval[size]);
+    long l = (long) refval[size] *1000000;
+    long r = (long) dval * 1000000;
+    if (l != r ){
+      System.printString("Validation failed\n");
+      System.printString("Kinetic Energy = " + (long)dval + "  " + (long)dev + "  " + size + "\n");
+    }
+
+    JGFInstrumentor.stopTimer("Section3:MolDyn:Total", instr.timers);
+    double interactions;
+    interactions = mold.interactions;
+
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Run", (double) interactions, instr.timers);
+    JGFInstrumentor.addOpsToTimer("Section3:MolDyn:Total", 1, instr.timers);
+
+    JGFInstrumentor.printTimer("Section3:MolDyn:Run", instr.timers); 
+    JGFInstrumentor.printTimer("Section3:MolDyn:Total", instr.timers); 
+    */
+    System.printString("Finished\n");
+  }
+}
+
index 3140b7b074c00c8a18d36e474a951711cca96efb..85d65c076874ed3ede091fa758c4586987e3b85b 100644 (file)
@@ -1,4 +1,4 @@
-MAINCLASS=JGFMolDynBenchSizeA
+MAINCLASS=JGFMolDynBenchSizeB
 SRC=${MAINCLASS}.java \
 JGFInstrumentor.java \
 JGFTimer.java \
index aa00ae4d4cc25e68866c6355f193356a9ab46473..b3aac7b384aa6717d5ce4f30b9455a6b49d1c69b 100644 (file)
@@ -3,7 +3,7 @@ public class DistributedHashMap {
   float loadFactor;
   int secondcapacity;
 
-  public HashMap(int initialCapacity, int secondcapacity, float loadFactor) {
+  public DistributedHashMap(int initialCapacity, int secondcapacity, float loadFactor) {
     init(initialCapacity, secondcapacity, loadFactor);
   }
 
@@ -32,7 +32,7 @@ public class DistributedHashMap {
   void resize(int index) {
     DHashEntry[] oldtable=table[index].array;
     int newCapacity=oldtable.length*2+1;
-    DHashEntry []newtable=global new DHashEntry[newCapacity];
+    DHashEntry [] newtable=global new DHashEntry[newCapacity];
     table[index].array=newtable;
 
     for(int i=0; i<oldtable.length; i++) {
@@ -87,7 +87,7 @@ public class DistributedHashMap {
 
     while(ptr!=null) {
       if (ptr.hashval==hashcode
-         &&ptr.key.equals(key)) {
+          &&ptr.key.equals(key)) {
        return ptr.value;
       }
       ptr=ptr.next;
@@ -106,7 +106,7 @@ public class DistributedHashMap {
 
     while(ptr!=null) {
       if (ptr.hashval==hashcode
-         &&ptr.key.equals(key)) {
+          &&ptr.key.equals(key)) {
        return true;
       }
       ptr=ptr.next;
index 936ceefd7bb960bd9094047acf1fa8b8d3bc99a6..7aa5e3e9a337aceb0967f61dc27e930e1ea27508 100644 (file)
@@ -266,11 +266,11 @@ public class SemanticCheck {
     case Kind.AtomicNode:
       checkAtomicNode(md, nametable, (AtomicNode)bsn);
       return;
-  
+
     case Kind.SESENode:
       // do nothing, no semantic check for SESEs
       return;
-    }  
+    }
 
     throw new Error();
   }
@@ -863,7 +863,7 @@ NextMethod:
        lefttype=new TypeDescriptor(TypeDescriptor.LONG);
       // 090205 hack for boolean
       else if (ltd.isBoolean()||rtd.isBoolean())
-               lefttype=new TypeDescriptor(TypeDescriptor.BOOLEAN);
+       lefttype=new TypeDescriptor(TypeDescriptor.BOOLEAN);
       else
        lefttype=new TypeDescriptor(TypeDescriptor.INT);
       righttype=lefttype;
index 315327beb756220e35d59e156691126e65c5b469..05e06662bac58b02d0d85a9c0dc82f63974f63b1 100644 (file)
@@ -54,7 +54,7 @@ class Keyword extends Token {
     key_table.put("private", new Integer(Sym.PRIVATE));
     key_table.put("protected", new Integer(Sym.PROTECTED));
     key_table.put("public", new Integer(Sym.PUBLIC));
-    key_table.put("return", new Integer(Sym.RETURN));    
+    key_table.put("return", new Integer(Sym.RETURN));
     key_table.put("short", new Integer(Sym.SHORT));
     key_table.put("static", new Integer(Sym.STATIC));
     key_table.put("strictfp", new Integer(Sym.STRICTFP));
index 3d190c5fde8ab0da7c7dcf4dd28d1be817fc09a4..58de0c27d9b181919d95a1d44d2bb0b696bbd93a 100644 (file)
@@ -255,14 +255,14 @@ public class Lexer {
 
   static final String[] keywords = new String[] {
     "abstract", "assert", "atomic", "boolean", "break", "byte", "case", "catch", "char",
-    "class", "const", "continue", 
-    "default", "disjoint", "do", "double", 
+    "class", "const", "continue",
+    "default", "disjoint", "do", "double",
     "else", "enum",
     "extends", "external", "final", "finally",
     "flag", //keyword for failure aware computation
     "float", "for","getoffset", "global", "goto", "if",
     //"implements",
-    "import", "instanceof", "int", 
+    "import", "instanceof", "int",
     //"interface",
     "isavailable",
     "long",
index a17807ec2f93561a2efb9d55af0e2790c2329485..5e66c45bf5e2e6dfd8c3d97cfb505b6b251c58bd 100644 (file)
@@ -132,7 +132,7 @@ public class Main {
       else if (option.equals("-instructionfailures"))
        state.INSTRUCTIONFAILURE=true;
       else if (option.equals("-abcclose"))
-         state.ARRAYBOUNDARYCHECK=false;
+       state.ARRAYBOUNDARYCHECK=false;
       else if (option.equals("-help")) {
        System.out.println("-classlibrary classlibrarydirectory -- directory where classlibrary is located");
        System.out.println("-selfloop task -- this task doesn't self loop its parameters forever");
@@ -293,10 +293,10 @@ public class Main {
                                                     state.OWNERSHIPALIASFILE);
 
        // generate multiple schedulings
-       ScheduleAnalysis scheduleAnalysis = new ScheduleAnalysis(state, 
-                                                                ta);
+       ScheduleAnalysis scheduleAnalysis = new ScheduleAnalysis(state,
+                                                                ta);
        // necessary preparation such as read profile info etc.
-       scheduleAnalysis.preparation();  
+       scheduleAnalysis.preparation();
        scheduleAnalysis.preSchedule();
        scheduleAnalysis.scheduleAnalysis();
        //scheduleAnalysis.setCoreNum(scheduleAnalysis.getSEdges4Test().size());
@@ -304,21 +304,21 @@ public class Main {
        scheduleAnalysis.schedule();
 
        //simulate these schedulings
-       ScheduleSimulator scheduleSimulator = new ScheduleSimulator(scheduleAnalysis.getCoreNum(), 
-                                                                   state, 
-                                                                   ta);
+       ScheduleSimulator scheduleSimulator = new ScheduleSimulator(scheduleAnalysis.getCoreNum(),
+                                                                   state,
+                                                                   ta);
        Vector<Vector<Schedule>> schedulings = scheduleAnalysis.getSchedulings();
        Vector<Integer> selectedScheduling = scheduleSimulator.simulate(schedulings);
 
        if(state.MULTICORE) {
          Vector<Schedule> scheduling = scheduleAnalysis.getSchedulings().elementAt(selectedScheduling.firstElement());
-         BuildCodeMultiCore bcm=new BuildCodeMultiCore(state, 
-                                                       bf.getMap(), 
-                                                       tu, 
-                                                       sa, 
-                                                       scheduling, 
-                                                       scheduleAnalysis.getCoreNum(), 
-                                                       pa);
+         BuildCodeMultiCore bcm=new BuildCodeMultiCore(state,
+                                                       bf.getMap(),
+                                                       tu,
+                                                       sa,
+                                                       scheduling,
+                                                       scheduleAnalysis.getCoreNum(),
+                                                       pa);
          bcm.setOwnershipAnalysis(oa);
          bcm.buildCode();
          scheduling = null;
index 7e10dc38ba844e09c2154ec2ee3cf93e06fb1576..2ea3cdb61d6f99051db73a700806e0dbdd0b3a33 100644 (file)
@@ -6,11 +6,11 @@
 #define RW_LOCK_UNLOCKED          { RW_LOCK_BIAS }
 //#define LOCK_PREFIX ""
 #define LOCK_PREFIX \
-                ".section .smp_locks,\"a\"\n"   \
-                "  .align 4\n"                  \
-                "  .long 661f\n" /* address */  \
-                ".previous\n"                   \
-                "661:\n\tlock; "
+  ".section .smp_locks,\"a\"\n"   \
+  "  .align 4\n"                  \
+  "  .long 661f\n"             /* address */\
+  ".previous\n"                   \
+  "661:\n\tlock; "
 
 
 
index ee0c37e1544d7a425c7e64c6871adfa23834607e..74a8bdd84ffce67ca0239576b01019650e819ee4 100644 (file)
@@ -57,10 +57,10 @@ int listcount=0;
 #elif defined(FASTCHECK)
 #define ENQUEUE(orig, dst) \
   if (((unsigned int)orig)!=1) { \
-  void *copy; \
-  if (gc_createcopy(orig,&copy)) \
-    enqueue(orig);\
-  dst=copy; }
+    void *copy; \
+    if (gc_createcopy(orig,&copy)) \
+      enqueue(orig);\
+    dst=copy; }
 #else
 #define ENQUEUE(orig, dst) \
   void *copy; \