[Insight-developers] suggestion: use environment variable to limit number of parallel threads

Sean McBride sean at rogue-research.com
Thu Sep 20 12:23:00 EDT 2007


On 9/20/07 9:11 AM, Torsten Rohlfing said:

>Well, no, that's not quite what I meant. See, the function you're 
>referring to allows you to set the number of threads from INSIDE an ITK 
>application, whereas I was suggesting a way of setting it from OUTSIDE 
>the application.

hmmm, perhaps I need more caffeine... :)  but ITK is just a big library
that is linked into an executable.  Can't your application just call
SetGlobalDefaultNumberOfThreads() early on (before you call other ITK
APIs), based on whatever env var you want?

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list