for loops possible candidate for multi threading ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

for loops possible candidate for multi threading ?

codifies
out of the blue a few things occurred to me

I suspect (but don't know!) that all geometry is "rendered"
independently with CGAL and then (assuming the loop is in some other
operation ie hull or difference) those separate geometries are sent to
CGAL together once the loop has finished.

Do to the nature of the language trying to fix all values just before
run time (as it were - almost like verilog!) each iteration of a loop
basically independent from another.

Off hand I can't think of any way you could effect a different iteration
of a loop from within the loop.

Assuming my assumptions are correct! does it not follow that each
iteration of a loop could be evaluated in any order.

In that case could you not have a pool of slots (number chosen in
settings) and assign a thread to each slot as each thread finishes it
iteration of the loop (which it wouldn't even know was a loop) that slot
put the geometry in the "world" and then creates another thread for the
next un-rendered iteration.

Okay I probably could have worded that better and do appreciate I know
next to nothing about the code base, but does this idea even sound
plausible ?

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: for loops possible candidate for multi threading ?

MichaelAtOz
Administrator
https://github.com/openscad/openscad/pull/1980
Admin - PM me if you need anything,
or if I've done something stupid...

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work.
Obviously inclusion of works of previous authors is not included in the above.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Loading...