Good demo for showing benefits of parallelism

Kevin Bealer kevinbealer at gmail.com
Fri Jan 26 19:12:36 PST 2007


Bill Baxter wrote:
> I don't remember where it was, but somebody in some thread said 
> something like gee it would be great if we had a demo that showed the 
> benefits of having parallel threads.  (It was probably in either the 
> Futures lib thread or in the discussion about varargs_reduce).
> 
> Anyway, a raytracer is a perfect example of "embarrasingly 
> parallelizeable" code.  In the simplest case you can state it simply as 
> "for each pixel do trace_ray(ray_dir)".
> 
> Bradley Smith posted code for a little raytracer over on D.learn under 
> the heading "Why is this code slower than C++".  If anyone is interested 
> in turning this into a parallel raytracer that would be a nice little demo.
> 
> Along the same lines, almost any image processing algorithm is in the 
> same category where the top loop looks like "foreach pixel do ___". This 
> is a big part of why GPUs just keep getting faster and faster, because 
> the basic problem is just so inherently parallelizable.
> 
> --bb

I think it was me -- thanks for the pointer, I may have a look at this.

Kevin



More information about the Digitalmars-d mailing list