[vtk-developers] Multithreading with Win32 threads

David Cole david.cole at kitware.com
Mon Jan 24 11:37:01 EST 2011


It appears to be used as a "lazy man's" thread local storage in
vtkMultiThreader (and a couple other scattered uses) -- there are simply
many arrays of length VTK_MAX_THREADS stored inside an instance of
vtkMultiThreader. Which could certainly be changed to a single array of
stuff, and probably even one that's dynamically allocated so that
VTK_MAX_THREADS is actually unnecessary.

But..... unless somebody goes through and eliminates VTK_MAX_THREADS usage
(also a valid option, if one is ambitious enough and has sufficient
time...), then we need an increased "hard coded" value for now.


On Mon, Jan 24, 2011 at 11:14 AM, Moreland, Kenneth <kmorel at sandia.gov>wrote:

>  Why is there a hardcoded maximum in the first place?  It seems to me that
> whatever number you choose now will be excessively high and/or obsolete in
> the coming years as the number of cores per processor grows.
>
> -Ken
>
>
>
> On 1/24/11 8:04 AM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
>
> ITK has had the max set to 128 for quite a while.
>
> On Mon, Jan 24, 2011 at 9:53 AM, David Partyka
> <david.partyka at kitware.com> wrote:
> > Sure thing, especially considering one can get a machine with dual
> > Hexa-cores + Hyper Threading resulting in 24 available cores.
> >
> > On Mon, Jan 24, 2011 at 9:39 AM, David Cole <david.cole at kitware.com>
> wrote:
> >>
> >> I think it's just old and leftover, and nobody has yet found a
> compelling
> >> need for more than 8 threads on Windows. It should be fine to increase
> this
> >> number, especially if you actually have a Windows box with more than 8
> >> processors on it.
> >>
> >> Feel free to change your build locally to increase that value. Perhaps
> >> somebody here on the VTK developers list is also contemplating more
> powerful
> >> Window machines these days... Anybody here want to bump this up and
> commit
> >> the change?
> >>
> >>
> >> On Mon, Jan 24, 2011 at 5:11 AM, Pavel Pokutnev
> >> <pavel.pokutnev at googlemail.com> wrote:
> >>>
> >>> Hello vtk-devs,
> >>>
> >>> sorry, but I would like to repeat my question.
> >>> There is a define VTK_MAX_THREADS in "Common/vtkSystemIncludes.h". It
> >>> is defined to 8 for Win32 threads, but for all other platforms to 32.
> >>> What is the cause for this non-conformity?
> >>>
> >>> Best regards,
> >>> Pavel
> >>> _______________________________________________
> >>> Powered by www.kitware.com
> >>>
> >>> Visit other Kitware open-source projects at
> >>> http://www.kitware.com/opensource/opensource.html
> >>>
> >>> Follow this link to subscribe/unsubscribe:
> >>> http://www.vtk.org/mailman/listinfo/vtk-developers
> >>>
> >>
> >>
> >> _______________________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.vtk.org/mailman/listinfo/vtk-developers
> >>
> >>
> >
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtk-developers
> >
> >
> >
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
>
>
>    ****      Kenneth Moreland
>     ***      Sandia National Laboratories
> ***********
> *** *** ***  email: kmorel at sandia.gov
> **  ***  **  phone: (505) 844-8919
>     ***      web:   http://www.cs.unm.edu/~kmorel<http://www.cs.unm.edu/%7Ekmorel>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110124/1a09a206/attachment.html>


More information about the vtk-developers mailing list