[Shootout-list] Compiled/Interpreted/JIT

Jon Harrop jon@ffconsultancy.com
Tue, 31 May 2005 23:49:40 +0100


On Tuesday 31 May 2005 23:29, Isaac Gouy wrote:
> The Java code is almost there - it seems to be missing an
> implementation of intersect(Intersect i, Ray ray) for Group,

Is this code not there?

	// Accumulate the first intersection of the given ray with this group
	// This function is used both for primary and shadow rays.
	public Intersect intersect(Intersect i, Ray ray) {
	    double l = bound.ray_sphere(ray);
	    if (l >= i.lambda) return i;
	    // Loop over the list of child nodes, accumulating the result.
	    ListIterator it = objs.listIterator(0);
	    while (it.hasNext()) {
		Scene scene = (Scene)it.next();
		i = scene.intersect(i, ray);
	    }
	    return i;
	}

Maybe there's something wrong with my declaration of that function.

> and some other problems that stop it compiling with Sun J2SE.

It should work for gcj and gij. Can you put it up so that I can see the errors 
from Sun's Java compile and try to fix them. I'll have a go at installing 
J2SE as well...

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
Objective CAML for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists