1 /**************************************************************************
2 * * Java Grande Forum Benchmark Suite - Version 2.0 * * produced by * * Java
3 * Grande Benchmarking Project * * at * * Edinburgh Parallel Computing Centre *
4 * * email: epcc-javagrande@epcc.ed.ac.uk * * * This version copyright (c) The
5 * University of Edinburgh, 1999. * All rights reserved. * *
6 **************************************************************************/
8 public class JGFRayTracerBench extends RayTracer {
11 public JGFRayTracerBench(JGFInstrumentor instr) {
16 public void JGFsetsize(int size) {
20 public void JGFinitialise() {
22 // instr.startTimer("Section3:RayTracer:Init");
25 // width = height = datasizes[size];
26 width = datasizes[size];
27 height = datasizes[size];
29 // create the objects to be rendered
30 scene = createScene();
32 // get lights, objects etc. from scene.
35 numobjects = scene.getObjects();
37 // instr.stopTimer("Section3:RayTracer:Init");
41 public void JGFapplication() {
43 // instr.startTimer("Section3:RayTracer:Run");
45 // Set interval to be rendered to the whole picture
46 // (overkill, but will be useful to retain this for parallel versions)
47 Interval interval = new Interval(0, width, height, 0, height, 1);
51 // System.out.println("DONE");
52 // instr.stopTimer("Section3:RayTracer:Run");
56 public void JGFvalidate() {
57 // long refval[] = {2676692,29827635};
58 long refval[] = new long[2];
61 long dev = checksum - refval[size];
63 System.out.println("Validation failed");
64 System.out.println("Pixel checksum = " + checksum);
65 System.out.println("Reference value = " + refval[size]);
69 public void JGFtidyup() {
79 public void JGFrun(int size, JGFInstrumentor instr) {
81 // instr.addTimer("Section3:RayTracer:Total", "Solutions", size);
82 // instr.addTimer("Section3:RayTracer:Init", "Objects", size);
83 // instr.addTimer("Section3:RayTracer:Run", "Pixels", size);
87 // instr.startTimer("Section3:RayTracer:Total");
94 // instr.stopTimer("Section3:RayTracer:Total");
96 // instr.addOpsToTimer("Section3:RayTracer:Init", (double) numobjects);
97 // instr.addOpsToTimer("Section3:RayTracer:Run",(double) (width * height));
98 // instr.addOpsToTimer("Section3:RayTracer:Total", 1);
100 // instr.printTimer("Section3:RayTracer:Init");
101 // instr.printTimer("Section3:RayTracer:Run");
102 // instr.printTimer("Section3:RayTracer:Total");