[vtk-developers] Checking SMP backend at runtime/compiletime?

Sujin Philip sujin.philip at kitware.com
Tue Feb 9 09:13:48 EST 2016


Hi David,

I get what you are saying. Thanks for the correction :).

Why would you want to continue using vtkMultiThreader when Sequential or
Simple is used? In fact, now that there is an openmp backend, we should be
removing simple. It was only there to ease debugging since tbb had very
complex back-traces. Openmp back-traces are much more readable. Do you want
the algorithm to be multithreaded even when Sequential is used?

I think it should be quite easy to add a compile time "#define" based on
VTK_SMP_IMPLEMENTATION_TYPE.

Thanks
Sujin


On Mon, Feb 8, 2016 at 5:50 PM, David Gobbi <david.gobbi at gmail.com> wrote:

> On Mon, Feb 8, 2016 at 3:37 PM, Sujin Philip <sujin.philip at kitware.com>
> wrote:
>
>> Hi David,
>>
>> There is no official API to find out what the back-end is. I don't think
>> there is a simple hack either. The back-end is supposed to be transparent
>> to the user with the only visible difference being the performance. Why do
>> you want to know?
>>
>
> It's for the new vtkSMPTools implementation of vtkThreadedImageAlgorithm.
> It would be nice if it could automatically default to using vtkSMPTools if
> a suitable backend is present, or use vtkMultiThreader if a vtkSMPTools
> backend is "Sequential" or "Simple".
>
> Also, if there is no way to know what the backend is, then isn't it
> "opaque" rather than "transparent"?  :)
>
>  - David
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20160209/f774ed92/attachment.html>


More information about the vtk-developers mailing list