[vtkusers] vtkMultiThreader question

Dan Lipsa dan.lipsa at kitware.com
Fri Oct 9 17:18:53 EDT 2015


Laurent,
Did you look at the tests that come with this class. Do they work?

http://www.vtk.org/doc/nightly/html/c2_vtk_t_12.html#c2_vtk_t_vtkMultiThreader

Dan


On Fri, Oct 9, 2015 at 5:00 PM, Chauvin, Laurent,Ph.D. <
lchauvin at bwh.harvard.edu> wrote:

> 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.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151009/f3ddcad1/attachment.html>


More information about the vtkusers mailing list