Multithread / Multicore Support

on Fri, Jan 04, 2008 in development

I’ve come to a stumbling point on the latest toolpath updates as I try to come up with a simple way to eliminate some of the unneeded retracting on finish paths. I’ve got a number of ways to approach the problem but none that I believe will work quickly and without a lot of bugs over the following several months. I finally put the problem aside for a few days since I wasn’t making a lot of progress. I decided to try adding multithreading support since I use a dual-core laptop and the new toolpath engine that was introduced over the last year is well suited to parallelism (I planned ahead for a change).

I was able to get one simple function multithreaded within a few hours with good results. Tonight I was able to enable it for the “Offsetting Surface” step that occurs for waterline, pencil, and parallel finishing with a threshold angle. I was able to complete the step in almost half the time as one core alone- really good considering this is nearly the theoretical maximum for a dual-core machine. Users with a quad-core machine should see an even better improvement.

Needless to say I’m very happy about this. Multithreading in the core algorithms should be a big step forward since, from what I can tell, most competitors do not do it. The roadmaps and predictions from Intel and AMD indicate that this type of optimization will be more important in the coming years as more cores are added to offset the lack of potential for new clock speed improvements. The geeks in the crowd can read more here, http://www.gotw.ca/publications/concurrency-ddj.htm . The truly geeky will already have read it.

As luck would have it I came up with a solution to the retract problem about an hour after giving up. Now I just have to write the code.

Recent Posts