3 /**************************************************************************
4 * * Java Grande Forum Benchmark Suite - Version 2.0 * * produced by * * Java
5 * Grande Benchmarking Project * * at * * Edinburgh Parallel Computing Centre *
6 * * email: epcc-javagrande@epcc.ed.ac.uk * * * This version copyright (c) The
7 * University of Edinburgh, 1999. * All rights reserved. * *
8 **************************************************************************/
10 public class TestRunner extends RayTracer {
15 public TestRunner(int id,
22 this.numCore = numCore;
25 // create the objects to be rendered
26 this.scene = scene; //createScene();
31 // get lights, objects etc. from scene.
34 numobjects = this.scene.getObjects();
35 /*this.image=new int[size][];
37 // get lights, objects etc. from scene.
40 numobjects = scene.getObjects();*/
47 public void JGFvalidate() {
48 // long refval[] = {2676692,29827635};
49 // long refval[] = new long[2];
50 // refval[0] = 2676692;
51 // refval[1] = 29827635;
52 // long dev = checksum - refval[size];
54 // System.out.println("Validation failed");
55 // System.out.println("Pixel checksum = " + checksum);
56 // System.out.println("Reference value = " + refval[size]);
60 public void JGFtidyup() {
71 float heightPerCore=height/numCore;
72 int startidx=(height*this.id)/numCore;
73 int endidx=(height*(this.id+1))/numCore;
74 if (id==(THREADNUM-1))
76 Interval interval = new Interval(0, width, height, startidx, endidx, 1);
78 //System.out.println("CHECKSUM="+checksum);
81 public static void main(String[] args) {
82 int threadnum = THREADNUM; // 56;
83 int size = 1000; //threadnum * 25;
84 System.setgcprofileflag();
85 Composer comp = new Composer(threadnum, size);
86 RayTracer rt = new RayTracer();
87 Scene scene = rt.createScene();
88 int image[][]=new int[size][];
89 TestRunner trarray[]=new TestRunner[threadnum];
90 for(int i = 1; i < threadnum; ++i) {
91 TestRunner tr = new TestRunner(i, threadnum, size, image, scene);
95 TestRunner tr0 = new TestRunner(0, threadnum, size, image, scene);
97 for(int i = 1; i < threadnum; ++i) {