Looking for writing parallel foreach kind of statement for nested for-loops

Sparsh Mittal sparsh0mittal at gmail.com
Sun Feb 10 05:55:12 PST 2013


>> Think again if you need that. Things start getting pretty 
>> ugly. :)
>
Yes, it is not at all intuitive.
> Indeed... Sparsh, any reason you need the calculation to be 
> done on 2d
> blocks instead of independent slots?

For my problem, original answer was fine, since parallel 
calculations are not at all dependent on each others.

Sometime there are calculations to be done on 2d grid, where 
calculations are not uniform across the grid(see paper "An 
overview of parallel visualisation methods for Mandelbrot and 
Julia sets" where you can see Julia sets parallelization), and 
hence, dividing in a particular way leads to better 
load-balancing than others.

Thanks a lot for your answer and time.




More information about the Digitalmars-d-learn mailing list