[vtkusers] Question about 64-bit ids and long

Mathieu Malaterre mathieu.malaterre at gmail.com
Mon Sep 22 09:51:33 EDT 2008


Oooops sorry.

Looking back the CVS history, I could find:

http://public.kitware.com/cgi-bin/viewcvs.cgi/Common/vtkSystemIncludes.h?view=log&pathrev=MAIN#rev1.46

COMP: Temporarily disabling the possibility of using long for a 64-bit
vtkIdType until some compilation problems can be resolved.

I do not know why it was done. Can you decide of the size of long
using some compiler flags that would not be garanteed to be set at
cmake configure time ?

2cts

On Mon, Sep 22, 2008 at 3:29 PM, Amy Squillacote <ahs at cfdrc.com> wrote:
> I think Nick was referring to the code in vtkType.h; that's where the code
> for vtkIdType is now, and the line numbers match what he listed below. The
> problem still exists, it just isn't in vtkIdType.h.
>
> - Amy
>
> Mathieu Malaterre wrote:
>>
>> vtkIdType.h was last shipped with VTK 4.2:
>>
>>
>> http://public.kitware.com/cgi-bin/viewcvs.cgi/Common/vtkIdType.h?hideattic=0&view=log
>>
>> 2cts
>> -Mathieu
>>
>> On Sat, Sep 20, 2008 at 6:09 PM, Nick Gnedin <gnedin at fnal.gov> wrote:
>>
>>>
>>> I noticed that in vtkIdType.h (VTK 5.2.0) a choice of long as a 64-bit
>>> id is manually blocked ( && 0 at the end of line 00235). Does anyone
>>> know why? I see nothing wrong with using long as a vtkIdType on a
>>> 64-bit machine. In fact, vtkIdType should always be long - then the id
>>> type is always consistent with the address space of the hardware.
>>>
>>> Nick Gnedin
>>>
>>>
>>> vtkIdType.h:
>>> 00233 #define VTK_HAS_ID_TYPE
>>> 00234 #ifdef VTK_USE_64BIT_IDS
>>> 00235 # if defined(VTK_SIZEOF_LONG) && VTK_SIZEOF_LONG == 8 && 0
>>> 00236 typedef long vtkIdType;
>>> _______________________________________________
>>> This is the private VTK discussion list.
>>> Please keep messages on-topic. Check the FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>>
>>
>
> --
> Amy Squillacote                    Phone: (256) 726-4839
> Computer Scientist                 Fax: (256) 726-4806
> CFD Research Corporation           Web: http://www.cfdrc.com
> 215 Wynn Drive, Suite 501
> Huntsville, AL  35805
>
>
>



-- 
Mathieu



More information about the vtkusers mailing list