[vtkusers] vtkMultiThreader question

Chauvin, Laurent,Ph.D. lchauvin at bwh.harvard.edu
Fri Oct 9 17:00:54 EDT 2015


Hello,

I’m trying to use a vtkMultiThreader to compute several thing in parallel.
However I’m not sure how it works.

Here is what I did.
I created a single method that calculate some metric pairwise. So I have 2 for loops in this method.
What I want to do, is to have one thread per iteration (kind of), so I can calculate all metrics simultaneously.

So I created a vtkMultiThreader and set the single method, which contains the loops, and executed it. However when I do that, I can only see one core working. I thought SingleMethod was using multiple thread to run this method. Is it true ? Why then it is not using all my other cores ?

Should I put the loops out of the single method then, and spawn a thread for each iteration, with different data as input ?

Thank you very much.
-Laurent


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151009/7ff462cd/attachment.html>


More information about the vtkusers mailing list