aa2f0f582be258a12550a13c71ba773fc0266bc7
[IRC.git] / Robust / src / Benchmarks / Scheduling / GC / NON_BAMBOO / voronoi / TestRunner.java
1
2
3 /**
4  * A Java implementation of the <tt>voronoi</tt> Olden benchmark. Voronoi
5  * generates a random set of points and computes a Voronoi diagram for
6  * the points.
7  * <p>
8  * <cite>
9  * L. Guibas and J. Stolfi.  "General Subdivisions and Voronoi Diagrams"
10  * ACM Trans. on Graphics 4(2):74-123, 1985.
11  * </cite>
12  * <p>
13  * The Java version of voronoi (slightly) differs from the C version
14  * in several ways.  The C version allocates an array of 4 edges and
15  * uses pointer addition to implement quick rotate operations.  The
16  * Java version does not use pointer addition to implement these
17  * operations.
18  **/
19 public class TestRunner extends Thread
20 {
21   
22   /**
23    * The number of points in the diagram
24    **/
25   private int points;
26   
27   public TestRunner(int npoints) {
28     this.points = npoints;
29   }
30
31   /**
32    * The main routine which creates the points and then performs
33    * the delaunay triagulation.
34    * @param args the command line parameters
35    **/
36   public void run()
37   {
38     Vertex v = new Vertex();
39     v.seed = 1023;
40     Vertex extra = v.createPoints(1, new MyDouble(1.0f), points);
41     Vertex point = v.createPoints(points-1, new MyDouble(extra.X()), points-1);
42     Edge edge = point.buildDelaunayTriangulation(extra);
43   }
44   
45   public static void main(String[] args) {
46     int threadnum = 62;
47     int npoints = 32000;
48     for(int i = 0; i < threadnum; ++i) {
49       TestRunner tr = new TestRunner(npoints);
50       tr.run();
51     }
52   }
53 }