Parallel For
seany
seany at uni-bonn.de
Tue Jun 15 17:11:33 UTC 2021
On Tuesday, 15 June 2021 at 09:09:29 UTC, Ali Çehreli wrote:
> On 6/14/21 11:39 PM, seany wrote:
>
> > [...]
>
> I gave an example of it in my DConf Online 2020 presentation as
> well:
>
> https://www.youtube.com/watch?v=dRORNQIB2wA&t=1324s
>
> > [...]
>
> That is violating a parallelism requirement that loop bodies
> must be independent. (I use a similar example during my
> presentation above.) You need to either pre-allocate the array
> (as jfondren said) or not store the elements at all but use
> them independently in the loop body.
>
> Yes, std.concurrency is another option. I show a "recipe" of
> usage here:
>
> https://www.youtube.com/watch?v=dRORNQIB2wA&t=1737s
>
> Ali
Ali Chehreli is an angel, Thank you.
More information about the Digitalmars-d-learn
mailing list