fix bugs
authorbdemsky <bdemsky>
Thu, 21 Jul 2011 03:46:37 +0000 (03:46 +0000)
committerbdemsky <bdemsky>
Thu, 21 Jul 2011 03:46:37 +0000 (03:46 +0000)
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/RayTracer/RayTracer.java
Robust/src/Benchmarks/Scheduling/GC/NON_BAMBOO/RayTracer/TestRunner.p

index 73b330923e7d4882c3573c85b2040305e1037a21..e3a6ef5e2dd4d11f13360f1b04653f1adc39d68b 100644 (file)
@@ -232,7 +232,6 @@ public class RayTracer extends Thread {
         // Sets the pixels
         row[x]= alpha | (red << 16) | (green << 8) | (blue);
       } // end for (x)
-
       image[y]=row;
     } // end for (y)
 
index 6224535f18cced01a4952df11091b25c65893506..981f0e126d46671dfb063e12c3f2145ab834f186 100644 (file)
@@ -67,20 +67,20 @@ public class TestRunner extends RayTracer {
   }
 
   public void run() {
-    this.init();
-
-    int heightPerCore=height/numCore;
-    int startidx=heightPerCore * this.id;
-    int endidx=startidx + heightPerCore;
-    Interval interval = new Interval(0, width, height, startidx, endidx, 1);
-    render(interval);
-
+                   this.init();
+                   float heightPerCore=height/numCore;
+                   int startidx=(height*this.id)/numCore;
+                   int endidx=(height*(this.id+1))/numCore;
+                   if (id==(THREADNUM-1))
+                   endidx=height;
+                   Interval interval = new Interval(0, width, height, startidx, endidx, 1);
+                   render(interval);
     //System.out.println("CHECKSUM="+checksum);
 
   }
   public static void main(String[] args) {
     int threadnum = THREADNUM; // 56;
-    int size = 62*25; //threadnum * 25;
+    int size = 500; //threadnum * 25;
     System.setgcprofileflag();
     Composer comp = new Composer(threadnum, size);
     RayTracer rt = new RayTracer();