On Sun, 2011-03-06 at 13:50 -0500, David Simcha wrote:
> Russel,
> 
> You're making this way more complicated than it needs to be, and I
> think unintentionally making the parallelism much more fine-grained
> than it should be.  (This may be my fault for not making the docs
> better.)  You manually create blocks for the various threads to work
> on, and then reduce(), etc. does the same thing again.  I've attached
> a version that's much simpler and more idiomatic and gives near-linear
> speedups.  I've also put something very similar in the documentation
> (http://cis.jhu.edu/~dsimcha/d/phobos/std_parallelism.html#reduce) as
> an example of using std.algorithm.map with TaskPool.reduce() and given
> you credit for the idea.

Actually, you were being very kind with your comment, I was being a
complete dork.  I was trying to use parallel reduce but still thinking
it was sequential reduce.  Too much MPI.

Parallel reduce in std.parallelism is actually a real parallel reduce à
la TBB :-)))

I shall remove the silly code from the repository.  Sadly though the
history remains both in the repository and in the archives of this mail
list.  Hopefully though no-one other than the two of us will notice so
there will be nothing I have to live down. 

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to