[ITK-users] ITK number of cores

Brecht Heyde Brecht.Heyde at med.kuleuven.be
Tue May 20 11:43:40 EDT 2014


Dear all,

 

When migrating from ITK 3.# to ITK 4.#, I've noticed that the total number
of cores are not being read/set properly anymore.

 

Taking the itkSystemInformation.cxx example in the
...\Modules\Core\Common\test directory and printing
mySys.GetNumberOfPhysicalCPU() gives me:

- 4 (in ITK3.#), which is correct for my quad-core machine

- 0 (in ITK4.#), which is wrong

 

Could someone provide me a hint as to why I'm seeing this behavior in the
first place? Is a global variable set wrong when building ITK?

 

Furthermore, initializing a filter which supports multithreading and
printing

myfilter->GetNumberOfThreads()

gives me:

- 4 (in ITK3.#)

- 1 (in ITK4.#)

 

I assumed that ITK sets the default number of threads always equal to the
total number of cores?

How can I know if my filter is actually using all my cores?

 

Kind regards,

Brecht Heyde

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140520/cc74821b/attachment.html>


More information about the Insight-users mailing list