March 07, 2011
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:russel.winder at ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at russel.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/phobos/attachments/20110307/f8691c0f/attachment-0001.pgp>
1 2 3
Next ›   Last »