taskPool.reduce vs algorithm.reduce
Malte
no at valid.mail
Thu Jul 19 12:11:10 UTC 2018
On Wednesday, 11 July 2018 at 10:07:33 UTC, Timoses wrote:
> On Wednesday, 11 July 2018 at 08:31:30 UTC, Dorian Haglund
> wrote:
>> [...]
>
> As the error message says taskPool.reduce is a non-global
> template. It's embedded in a taskPool struct. I can't say what
> the reason is that a delegate cannot be used with such a
> template. I'd be interested in hearing what the reason is.
> (See Paul's reply).
>
> I'm trying to trick around it, but can't get this to work...
>
> https://run.dlang.io/is/EGbtuq
You can make it all global: https://run.dlang.io/is/Kf8CLC
From my own experience: Use only parallel foreach and save
yourself a lot of hassle. That just works.
More information about the Digitalmars-d-learn
mailing list