3 ms·
No. What Walter is talking about in D is if you have Foo[] foo = ...; foreach(f; foo) { f.bar.baz.quux; } and the computation is parallelisable then you
by nicwilson 9y ago
No. What Walter is talking about in D is if you have
Foo[] foo = ...;
foreach(f; foo)
{
f.bar.baz.quux;
}
and the computation is parallelisable then you can write
import std.parallelism;
foreach(f; parallel(foo))
{
f.bar.baz.quux;
}
and it will parallelised across threads.
I guess std.parallelism's parallel might be more analogous to an "instance" of an executor.
- VHRanger 9y agoSo that's similar to OpenMP parallel for looping?