Recommendation for parallelism with nested for loops?

Adam D Ruppe destructionator at gmail.com
Fri Aug 19 02:02:57 UTC 2022


On Friday, 19 August 2022 at 01:49:43 UTC, Shriramana Sharma 
wrote:
> Also, what is the best way to do parallelism in such a 
> situation?

If the inner loops are about the same size for each pass of the 
outer loop, you can just simply parallel on the outer loop and 
get the same benefit.

Even if they aren't equal, you'll get decent benefit from 
parallel on the outer one alone, but not as good since the work 
won't be balanced.

Still, that's what I'd try.


More information about the Digitalmars-d-learn mailing list