[Insight-users] Multi-threading image source

Juan Carlos Prieto prieto at creatis.insa-lyon.fr
Tue May 3 09:37:38 EDT 2011


Hello All,

I would like to know if there is a way to calculate the number of 
threads that are going to be created depending on the size of the region 
of the output image.

The function GetNumberOfThreads() will return the number of "possible" 
threads that could be created but not the actual number of threads 
created when the ThreadedGenerateData() is called.
This represents a problem because I'm only using the scheme proposed to 
create a parallel algorithm i.e. implementing the methods allocate, 
before, after and ThreadedGenerateData, to perform operation on a some 
data, not necessarily an image thus not depending on the 
'outputregionofthread' parameter. As I said, the function 
GetNumberOfThreads() will return the number of threads that could be 
created but not the actual number of threads launched that depend on the 
output image region of the image. I use the GetNumberOfThreads() to 
calculate which parts of the data should be threaded by each thread, 
when the number of threads from GetNumberOfThreads and the actual number
changes then the algorithm fails.

Please help,
Any comments or suggestions are welcomed.

Thank you,
-- 
Juan Carlos Prieto
Phd Student
CREATIS <http://www.creatis.insa-lyon.fr> Tel:+33472438918
7 Av Jean Capelle
69621 Villeurbanne Cedex
France
Personal page <http://www.creatis.insa-lyon.fr/%7Eprieto>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110503/771cba06/attachment.htm>


More information about the Insight-users mailing list