Displaying 3 results from an estimated 3 matches for "ray_trace".
2008 Dec 16
0
[LLVMdev] Another compiler shootout
..._sphere(o, d, scene->center, scene->radius);
if (lambda2 < *lambda) {
if (scene->child) {
int i;
for (i=0; i<5; ++i)
intersect(o, d, lambda, t, &scene->child[i]);
} else {
*lambda = lambda2;
*t = scene;
}
}
}
Vec neglight;
real ray_trace(Vec o, Vec d, struct Scene scene) {
real lambda = INFINITY;
struct Scene *t = NULL;
intersect(o, d, &lambda, &t, &scene);
if (lambda == INFINITY) return 0.0;
{
Vec p = add(o, scale(lambda, d));
Vec normal = unitise(sub(p, t->center));
real g = dot(normal, neglig...
2008 Dec 16
6
[LLVMdev] Another compiler shootout
FYI. http://leonardo-m.livejournal.com/73732.html
If anyone is motivated, please file bugs for the losing cases. Also,
it might make sense to incorporate the tests into our nightly tester
test suite.
Thanks,
Evan
2009 Feb 05
0
[LLVMdev] C++ ray tracer performance: gcc 4.3.2 vs llvm-gcc 4.2.1
On the off chance anyone here is interested in more performance results, I
compiled and ran the fastest of the implementations of the ray tracer in C++
from my language comparison:
http://www.ffconsultancy.com/languages/ray_tracer/
This is a small program with a relatively large hotpath. Specifically, around
30% of the time is spend in the ray sphere intersection but another 30% is
also spent in the intersect function that recursively traverses a
hierarchical scene.
This is on an (eight core) 2.1GHz Opteron 2352, compi...