Re: Why is amap implemented as a member function of TaskPool?

2014-09-22 Thread Atila Neves via Digitalmars-d-learn
On Saturday, 20 September 2014 at 06:46:43 UTC, Nordlöw wrote: On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: I had to roll my own parallel map today, but at least I did get a nice 3x speedup. Is your own parallel map public somewhere? It would be interesting to see it.

Re: Why is amap implemented as a member function of TaskPool?

2014-09-22 Thread Atila Neves via Digitalmars-d-learn
On Saturday, 20 September 2014 at 07:25:45 UTC, Russel Winder via Digitalmars-d-learn wrote: On Sat, 2014-09-20 at 06:46 +, "Nordlöw" via Digitalmars-d-learn wrote: On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: > I had to roll my own parallel map today, but at least I d

Re: Why is amap implemented as a member function of TaskPool?

2014-09-20 Thread Russel Winder via Digitalmars-d-learn
On Sat, 2014-09-20 at 06:46 +, "Nordlöw" via Digitalmars-d-learn wrote: > On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: > > I had to roll my own parallel map today, but at least I did get > > a nice 3x speedup. How many cores? Is the problem a data parallel one and hence

Re: Why is amap implemented as a member function of TaskPool?

2014-09-19 Thread Nordlöw
On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: I had to roll my own parallel map today, but at least I did get a nice 3x speedup. Is your own parallel map public somewhere? It would be interesting to see it.

Re: Why is amap implemented as a member function of TaskPool?

2014-09-19 Thread Jared via Digitalmars-d-learn
On Friday, 19 September 2014 at 07:17:50 UTC, Atila Neves wrote: The point is I _want_ a delegate. Atila On Thursday, 18 September 2014 at 20:51:30 UTC, Jared wrote: On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: Or what I really want to ask: why can't I call amap from std

Re: Why is amap implemented as a member function of TaskPool?

2014-09-19 Thread Atila Neves via Digitalmars-d-learn
The point is I _want_ a delegate. Atila On Thursday, 18 September 2014 at 20:51:30 UTC, Jared wrote: On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: Or what I really want to ask: why can't I call amap from std.parallelism with a lambda? I assume it's because it's a member f

Re: Why is amap implemented as a member function of TaskPool?

2014-09-18 Thread Jared via Digitalmars-d-learn
On Thursday, 18 September 2014 at 19:49:00 UTC, Atila Neves wrote: Or what I really want to ask: why can't I call amap from std.parallelism with a lambda? I assume it's because it's a member function but I'm not 100% sure. Atila You have to tell DMD that the lambda is not in fact a delegate.

Why is amap implemented as a member function of TaskPool?

2014-09-18 Thread Atila Neves via Digitalmars-d-learn
Or what I really want to ask: why can't I call amap from std.parallelism with a lambda? I assume it's because it's a member function but I'm not 100% sure. I hardly ever call map with a named function (named local functions don't work with TaskPool.amap either), it's always a closure. Not jus