Parallel processing and further use of output
John Colvin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 26 10:44:24 PDT 2015
On Saturday, 26 September 2015 at 17:20:34 UTC, Jay Norwood wrote:
> This is a work-around to get a ulong result without having the
> ulong as the range variable.
>
> ulong getTerm(int i)
> {
> return i;
> }
> auto sum4 = taskPool.reduce!"a +
> b"(std.algorithm.map!getTerm(iota(1000000001)));
or
auto sum4 = taskPool.reduce!"a + b"(0UL, iota(1_000_000_001));
works for me
More information about the Digitalmars-d-learn
mailing list