From 3b89e77191ceea14e5ccd4f2970ea356b786e34b Mon Sep 17 00:00:00 2001 From: Brad King <brad.king@kitware.com> Date: Tue, 8 Dec 2015 11:46:54 -0500 Subject: [PATCH] Drop support for compilers without `long long` VTK no longer supports any compilers that do not provide this type. Therefore all code conditional on VTK_TYPE_USE_LONG_LONG can be made unconditional. Leave the macro defined to tell dependent projects that APIs using the type are available in case they still support versions of VTK that make it conditional. --- CMake/vtkTestTypes.cmake | 8 --- Common/Core/CMakeLists.txt | 9 +-- Common/Core/vtkAbstractArray.cxx | 9 +-- Common/Core/vtkArray.cxx | 4 -- Common/Core/vtkByteSwap.cxx | 4 +- Common/Core/vtkByteSwap.h | 4 +- Common/Core/vtkConfigure.h.in | 2 +- Common/Core/vtkDataArray.cxx | 4 -- Common/Core/vtkLargeInteger.cxx | 2 - Common/Core/vtkLargeInteger.h | 2 - Common/Core/vtkMath.cxx | 5 +- Common/Core/vtkOStreamWrapper.cxx | 6 +- Common/Core/vtkOStreamWrapper.h | 6 +- Common/Core/vtkSetGet.h | 33 +++------- Common/Core/vtkSortDataArray.cxx | 4 -- Common/Core/vtkTemplateAliasMacro.h | 12 +--- Common/Core/vtkType.h | 7 +-- Common/Core/vtkTypeTraits.h | 20 +++--- Common/Core/vtkVariant.cxx | 17 ----- Common/Core/vtkVariant.h | 6 -- Common/Core/vtkVariantCast.h | 4 -- Common/Core/vtkVariantCreate.h | 4 -- Common/Core/vtkVariantExtract.h | 4 -- Common/Core/vtkVariantInlineOperators.h | 4 -- Common/Core/vtkVariantToNumeric.cxx | 2 - Common/DataModel/vtkImageIterator.cxx | 6 +- Common/DataModel/vtkXMLDataElement.cxx | 10 +-- Common/DataModel/vtkXMLDataElement.h | 2 - .../vtkImageProgressIterator.cxx | 6 +- IO/Legacy/vtkDataReader.cxx | 14 ----- IO/Legacy/vtkDataReader.h | 2 - IO/Legacy/vtkDataWriter.cxx | 2 - .../vtkMPIMultiBlockPLOT3DReader.cxx | 2 - IO/PostgreSQL/vtkPostgreSQLQuery.cxx | 8 --- IO/SQL/vtkSQLQuery.cxx | 2 - IO/XML/vtkXMLWriter.cxx | 2 - Imaging/Core/vtkImageStencilIterator.cxx | 2 - Infovis/Boost/vtkVariantBoostSerialization.h | 4 -- Parallel/Core/vtkCommunicator.h | 52 ++++------------ Parallel/Core/vtkMultiProcessController.h | 62 +++++-------------- Rendering/Label/vtkDynamic2DLabelMapper.cxx | 2 - Rendering/Label/vtkLabeledDataMapper.cxx | 2 - Rendering/ParallelLIC/vtkMPIPixelTT.cxx | 2 - Rendering/ParallelLIC/vtkMPIPixelTT.h | 2 - Rendering/Tk/vtkTkRenderWidget.cxx | 5 -- Wrapping/Java/vtkJavaUtil.cxx | 2 - Wrapping/Java/vtkJavaUtil.h | 2 - Wrapping/Python/vtk/util/vtkConstants.py | 1 - Wrapping/PythonCore/PyVTKObject.cxx | 4 +- Wrapping/PythonCore/vtkPythonArgs.cxx | 16 ----- Wrapping/PythonCore/vtkPythonArgs.h | 18 ------ Wrapping/PythonCore/vtkPythonUtil.cxx | 19 ------ Wrapping/Tools/vtkParse.tab.c | 8 --- Wrapping/Tools/vtkParse.y | 8 --- Wrapping/Tools/vtkParseExtras.c | 4 -- Wrapping/Tools/vtkWrapPythonConstant.c | 5 -- Wrapping/Tools/vtkWrapPythonMethodDef.c | 2 - Wrapping/Tools/vtkWrapTcl.c | 2 - 58 files changed, 69 insertions(+), 393 deletions(-) diff --git a/CMake/vtkTestTypes.cmake b/CMake/vtkTestTypes.cmake index 62b7635c662..87ac3da0990 100644 --- a/CMake/vtkTestTypes.cmake +++ b/CMake/vtkTestTypes.cmake @@ -7,16 +7,8 @@ CHECK_TYPE_SIZE(char VTK_SIZEOF_CHAR) CHECK_TYPE_SIZE(short VTK_SIZEOF_SHORT) CHECK_TYPE_SIZE(float VTK_SIZEOF_FLOAT) CHECK_TYPE_SIZE(double VTK_SIZEOF_DOUBLE) - CHECK_TYPE_SIZE("long long" VTK_SIZEOF_LONG_LONG) -# Enable the "long long" type if it is available. It is standard in -# C99 and C++03 but not in earlier standards. -SET(VTK_TYPE_USE_LONG_LONG) -IF(VTK_SIZEOF_LONG_LONG) - SET(VTK_TYPE_USE_LONG_LONG 1) -ENDIF() - IF(NOT DEFINED VTK_TYPE_CHAR_IS_SIGNED) MESSAGE(STATUS "Checking signedness of char") TRY_RUN(VTK_TYPE_CHAR_IS_SIGNED VTK_TYPE_CHAR_IS_SIGNED_COMPILED diff --git a/Common/Core/CMakeLists.txt b/Common/Core/CMakeLists.txt index f70f17505eb..ffdcd8d991b 100644 --- a/Common/Core/CMakeLists.txt +++ b/Common/Core/CMakeLists.txt @@ -193,6 +193,7 @@ SET(Module_SRCS vtkIntArray.cxx vtkLargeInteger.cxx vtkLongArray.cxx + vtkLongLongArray.cxx vtkLookupTable.cxx vtkMappedDataArray.txx vtkMath.cxx @@ -231,6 +232,7 @@ SET(Module_SRCS vtkUnsignedCharArray.cxx vtkUnsignedIntArray.cxx vtkUnsignedLongArray.cxx + vtkUnsignedLongLongArray.cxx vtkUnsignedShortArray.cxx vtkVariantArray.cxx vtkVariant.cxx @@ -395,13 +397,6 @@ set_source_files_properties( OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/vtkUnicodeCaseFoldData.h ) -if(VTK_TYPE_USE_LONG_LONG) - list(APPEND Module_SRCS - vtkLongLongArray.cxx - vtkUnsignedLongLongArray.cxx - ) -endif() - # Configure data arrays for platform-independent fixed-size types. # Match the type selection here to that in vtkType.h. if(VTK_TYPE_CHAR_IS_SIGNED) diff --git a/Common/Core/vtkAbstractArray.cxx b/Common/Core/vtkAbstractArray.cxx index 9d13238e048..256fdd8dbb4 100644 --- a/Common/Core/vtkAbstractArray.cxx +++ b/Common/Core/vtkAbstractArray.cxx @@ -23,6 +23,7 @@ #include "vtkInformation.h" #include "vtkIntArray.h" #include "vtkLongArray.h" +#include "vtkLongLongArray.h" #include "vtkMath.h" #include "vtkMinimalStandardRandomSequence.h" #include "vtkShortArray.h" @@ -32,6 +33,7 @@ #include "vtkUnsignedCharArray.h" #include "vtkUnsignedIntArray.h" #include "vtkUnsignedLongArray.h" +#include "vtkUnsignedLongLongArray.h" #include "vtkUnsignedShortArray.h" #include "vtkVariantArray.h" #include "vtkInformationVector.h" @@ -42,11 +44,6 @@ #include "vtkNew.h" #include "vtkUnicodeString.h" // for vtkSuperExtraExtendedTemplateMacro -#if defined(VTK_TYPE_USE_LONG_LONG) -# include "vtkLongLongArray.h" -# include "vtkUnsignedLongLongArray.h" -#endif - #include <algorithm> #include <iterator> #include <set> @@ -354,13 +351,11 @@ vtkAbstractArray* vtkAbstractArray::CreateArray(int dataType) case VTK_UNSIGNED_LONG: return vtkUnsignedLongArray::New(); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: return vtkLongLongArray::New(); case VTK_UNSIGNED_LONG_LONG: return vtkUnsignedLongLongArray::New(); -#endif case VTK_FLOAT: return vtkFloatArray::New(); diff --git a/Common/Core/vtkArray.cxx b/Common/Core/vtkArray.cxx index 3241b5515f2..e4d8ce8a740 100644 --- a/Common/Core/vtkArray.cxx +++ b/Common/Core/vtkArray.cxx @@ -89,12 +89,10 @@ vtkArray* vtkArray::CreateArray(int StorageType, int ValueType) return vtkDenseArray<long>::New(); case VTK_UNSIGNED_LONG: return vtkDenseArray<unsigned long>::New(); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: return vtkDenseArray<long long>::New(); case VTK_UNSIGNED_LONG_LONG: return vtkDenseArray<unsigned long long>::New(); -#endif case VTK_FLOAT: return vtkDenseArray<float>::New(); case VTK_DOUBLE: @@ -133,12 +131,10 @@ vtkArray* vtkArray::CreateArray(int StorageType, int ValueType) return vtkSparseArray<long>::New(); case VTK_UNSIGNED_LONG: return vtkSparseArray<unsigned long>::New(); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: return vtkSparseArray<long long>::New(); case VTK_UNSIGNED_LONG_LONG: return vtkSparseArray<unsigned long long>::New(); -#endif case VTK_FLOAT: return vtkSparseArray<float>::New(); case VTK_DOUBLE: diff --git a/Common/Core/vtkByteSwap.cxx b/Common/Core/vtkByteSwap.cxx index d501c9a9f11..624c9f10c0a 100644 --- a/Common/Core/vtkByteSwap.cxx +++ b/Common/Core/vtkByteSwap.cxx @@ -240,15 +240,13 @@ VTK_BYTE_SWAP_IMPL(char) VTK_BYTE_SWAP_IMPL(short) VTK_BYTE_SWAP_IMPL(int) VTK_BYTE_SWAP_IMPL(long) +VTK_BYTE_SWAP_IMPL(long long) VTK_BYTE_SWAP_IMPL(signed char) VTK_BYTE_SWAP_IMPL(unsigned char) VTK_BYTE_SWAP_IMPL(unsigned short) VTK_BYTE_SWAP_IMPL(unsigned int) VTK_BYTE_SWAP_IMPL(unsigned long) -#if defined(VTK_TYPE_USE_LONG_LONG) -VTK_BYTE_SWAP_IMPL(long long) VTK_BYTE_SWAP_IMPL(unsigned long long) -#endif #undef VTK_BYTE_SWAP_IMPL #if VTK_SIZEOF_SHORT == 2 diff --git a/Common/Core/vtkByteSwap.h b/Common/Core/vtkByteSwap.h index 77e2be13911..2a3ad595bf9 100644 --- a/Common/Core/vtkByteSwap.h +++ b/Common/Core/vtkByteSwap.h @@ -49,15 +49,13 @@ public: VTK_BYTE_SWAP_DECL(short); VTK_BYTE_SWAP_DECL(int); VTK_BYTE_SWAP_DECL(long); + VTK_BYTE_SWAP_DECL(long long); VTK_BYTE_SWAP_DECL(signed char); VTK_BYTE_SWAP_DECL(unsigned char); VTK_BYTE_SWAP_DECL(unsigned short); VTK_BYTE_SWAP_DECL(unsigned int); VTK_BYTE_SWAP_DECL(unsigned long); -#if defined(VTK_TYPE_USE_LONG_LONG) - VTK_BYTE_SWAP_DECL(long long); VTK_BYTE_SWAP_DECL(unsigned long long); -#endif #undef VTK_BYTE_SWAP_DECL //ETX diff --git a/Common/Core/vtkConfigure.h.in b/Common/Core/vtkConfigure.h.in index 902325767db..93bc1a07851 100644 --- a/Common/Core/vtkConfigure.h.in +++ b/Common/Core/vtkConfigure.h.in @@ -87,7 +87,7 @@ #endif /* Whether type "long long" is enabled as a unique fundamental type. */ -#cmakedefine VTK_TYPE_USE_LONG_LONG +#define VTK_TYPE_USE_LONG_LONG /* Whether type "char" is signed (it may be signed or unsigned). */ #define VTK_TYPE_CHAR_IS_SIGNED @VTK_TYPE_CHAR_IS_SIGNED@ diff --git a/Common/Core/vtkDataArray.cxx b/Common/Core/vtkDataArray.cxx index 934d0d5413a..a9cd8f44924 100644 --- a/Common/Core/vtkDataArray.cxx +++ b/Common/Core/vtkDataArray.cxx @@ -1258,10 +1258,8 @@ double vtkDataArray::GetDataTypeMin(int type) case VTK_INT: return static_cast<double>(VTK_INT_MIN); case VTK_UNSIGNED_LONG: return static_cast<double>(VTK_UNSIGNED_LONG_MIN); case VTK_LONG: return static_cast<double>(VTK_LONG_MIN); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_UNSIGNED_LONG_LONG: return static_cast<double>(VTK_UNSIGNED_LONG_LONG_MIN); case VTK_LONG_LONG: return static_cast<double>(VTK_LONG_LONG_MIN); -#endif case VTK_FLOAT: return static_cast<double>(VTK_FLOAT_MIN); case VTK_DOUBLE: return static_cast<double>(VTK_DOUBLE_MIN); case VTK_ID_TYPE: return static_cast<double>(VTK_ID_MIN); @@ -1284,10 +1282,8 @@ double vtkDataArray::GetDataTypeMax(int type) case VTK_INT: return static_cast<double>(VTK_INT_MAX); case VTK_UNSIGNED_LONG: return static_cast<double>(VTK_UNSIGNED_LONG_MAX); case VTK_LONG: return static_cast<double>(VTK_LONG_MAX); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_UNSIGNED_LONG_LONG: return static_cast<double>(VTK_UNSIGNED_LONG_LONG_MAX); case VTK_LONG_LONG: return static_cast<double>(VTK_LONG_LONG_MAX); -#endif case VTK_FLOAT: return static_cast<double>(VTK_FLOAT_MAX); case VTK_DOUBLE: return static_cast<double>(VTK_DOUBLE_MAX); case VTK_ID_TYPE: return static_cast<double>(VTK_ID_MAX); diff --git a/Common/Core/vtkLargeInteger.cxx b/Common/Core/vtkLargeInteger.cxx index 2412e8a1c73..a02c6b7c301 100644 --- a/Common/Core/vtkLargeInteger.cxx +++ b/Common/Core/vtkLargeInteger.cxx @@ -51,7 +51,6 @@ vtkLargeInteger::vtkLargeInteger(void) this->Sig = 0; } -#if defined(VTK_TYPE_USE_LONG_LONG) vtkLargeInteger::vtkLargeInteger(long long n) { this->Negative = n < 0 ? 1 : 0; @@ -80,7 +79,6 @@ vtkLargeInteger::vtkLargeInteger(unsigned long long n) this->Sig = BIT_INCREMENT - 1; this->Contract(); // remove leading 0s } -#endif vtkLargeInteger::vtkLargeInteger(long n) { diff --git a/Common/Core/vtkLargeInteger.h b/Common/Core/vtkLargeInteger.h index 5d98b1916ea..e46f93ab293 100644 --- a/Common/Core/vtkLargeInteger.h +++ b/Common/Core/vtkLargeInteger.h @@ -29,10 +29,8 @@ public: vtkLargeInteger(int n); vtkLargeInteger(unsigned int n); vtkLargeInteger(const vtkLargeInteger& n); -#if defined(VTK_TYPE_USE_LONG_LONG) vtkLargeInteger(long long n); vtkLargeInteger(unsigned long long n); -#endif ~vtkLargeInteger(void); diff --git a/Common/Core/vtkMath.cxx b/Common/Core/vtkMath.cxx index 606fdbd2f8a..58d3c03e5ba 100644 --- a/Common/Core/vtkMath.cxx +++ b/Common/Core/vtkMath.cxx @@ -2851,16 +2851,13 @@ int vtkMath::GetScalarTypeFittingRange( static_cast<double>(VTK_LONG_MAX) }, { VTK_UNSIGNED_LONG, static_cast<double>(VTK_UNSIGNED_LONG_MIN), - static_cast<double>(VTK_UNSIGNED_LONG_MAX) } -#if defined(VTK_TYPE_USE_LONG_LONG) - , + static_cast<double>(VTK_UNSIGNED_LONG_MAX) }, { VTK_LONG_LONG, static_cast<double>(VTK_LONG_LONG_MIN), static_cast<double>(VTK_LONG_LONG_MAX) }, { VTK_UNSIGNED_LONG_LONG, static_cast<double>(VTK_UNSIGNED_LONG_LONG_MIN), static_cast<double>(VTK_UNSIGNED_LONG_LONG_MAX) } -#endif }; // If the range, scale or shift are decimal number, just browse diff --git a/Common/Core/vtkOStreamWrapper.cxx b/Common/Core/vtkOStreamWrapper.cxx index fac0e17f523..954422f3653 100644 --- a/Common/Core/vtkOStreamWrapper.cxx +++ b/Common/Core/vtkOStreamWrapper.cxx @@ -65,17 +65,15 @@ VTKOSTREAM_OPERATOR(char); VTKOSTREAM_OPERATOR(short); VTKOSTREAM_OPERATOR(int); VTKOSTREAM_OPERATOR(long); +VTKOSTREAM_OPERATOR(long long); VTKOSTREAM_OPERATOR(unsigned char); VTKOSTREAM_OPERATOR(unsigned short); VTKOSTREAM_OPERATOR(unsigned int); VTKOSTREAM_OPERATOR(unsigned long); +VTKOSTREAM_OPERATOR(unsigned long long); VTKOSTREAM_OPERATOR(float); VTKOSTREAM_OPERATOR(double); VTKOSTREAM_OPERATOR(bool); -#if defined(VTK_TYPE_USE_LONG_LONG) -VTKOSTREAM_OPERATOR(long long); -VTKOSTREAM_OPERATOR(unsigned long long); -#endif VTKOSTREAM_OPERATOR_FUNC(void (*a)(void*)); VTKOSTREAM_OPERATOR_FUNC(void* (*a)(void*)); VTKOSTREAM_OPERATOR_FUNC(int (*a)(void*)); diff --git a/Common/Core/vtkOStreamWrapper.h b/Common/Core/vtkOStreamWrapper.h index 5dabbc79d70..e7c14b35aa9 100644 --- a/Common/Core/vtkOStreamWrapper.h +++ b/Common/Core/vtkOStreamWrapper.h @@ -72,16 +72,14 @@ public: vtkOStreamWrapper& operator << (short); vtkOStreamWrapper& operator << (int); vtkOStreamWrapper& operator << (long); + vtkOStreamWrapper& operator << (long long); vtkOStreamWrapper& operator << (unsigned char); vtkOStreamWrapper& operator << (unsigned short); vtkOStreamWrapper& operator << (unsigned int); vtkOStreamWrapper& operator << (unsigned long); + vtkOStreamWrapper& operator << (unsigned long long); vtkOStreamWrapper& operator << (float); vtkOStreamWrapper& operator << (double); -#if defined(VTK_TYPE_USE_LONG_LONG) - vtkOStreamWrapper& operator << (long long); - vtkOStreamWrapper& operator << (unsigned long long); -#endif vtkOStreamWrapper& operator << (bool); // Work-around for IBM Visual Age bug in overload resolution. diff --git a/Common/Core/vtkSetGet.h b/Common/Core/vtkSetGet.h index e4260a6a0b8..6ce507dd0ed 100644 --- a/Common/Core/vtkSetGet.h +++ b/Common/Core/vtkSetGet.h @@ -672,8 +672,8 @@ virtual double *Get##name() \ #define vtkTemplateMacro(call) \ vtkTemplateMacroCase(VTK_DOUBLE, double, call); \ vtkTemplateMacroCase(VTK_FLOAT, float, call); \ - vtkTemplateMacroCase_ll(VTK_LONG_LONG, long long, call) \ - vtkTemplateMacroCase_ll(VTK_UNSIGNED_LONG_LONG, unsigned long long, call) \ + vtkTemplateMacroCase(VTK_LONG_LONG, long long, call); \ + vtkTemplateMacroCase(VTK_UNSIGNED_LONG_LONG, unsigned long long, call); \ vtkTemplateMacroCase(VTK_ID_TYPE, vtkIdType, call); \ vtkTemplateMacroCase(VTK_LONG, long, call); \ vtkTemplateMacroCase(VTK_UNSIGNED_LONG, unsigned long, call); \ @@ -704,8 +704,8 @@ virtual double *Get##name() \ #define vtkTemplate2Macro(call) \ vtkTemplate2MacroCase1(VTK_DOUBLE, double, call); \ vtkTemplate2MacroCase1(VTK_FLOAT, float, call); \ - vtkTemplate2MacroCase1_ll(VTK_LONG_LONG, long long, call) \ - vtkTemplate2MacroCase1_ll(VTK_UNSIGNED_LONG_LONG, unsigned long long, call) \ + vtkTemplate2MacroCase1(VTK_LONG_LONG, long long, call); \ + vtkTemplate2MacroCase1(VTK_UNSIGNED_LONG_LONG, unsigned long long, call); \ vtkTemplate2MacroCase1(VTK_ID_TYPE, vtkIdType, call); \ vtkTemplate2MacroCase1(VTK_LONG, long, call); \ vtkTemplate2MacroCase1(VTK_UNSIGNED_LONG, unsigned long, call); \ @@ -719,8 +719,8 @@ virtual double *Get##name() \ #define vtkTemplate2MacroCase1(type1N, type1, call) \ vtkTemplate2MacroCase2(type1N, type1, VTK_DOUBLE, double, call); \ vtkTemplate2MacroCase2(type1N, type1, VTK_FLOAT, float, call); \ - vtkTemplate2MacroCase2_ll(type1N, type1, VTK_LONG_LONG, long long, call) \ - vtkTemplate2MacroCase2_ll(type1N, type1, VTK_UNSIGNED_LONG_LONG, unsigned long long, call) \ + vtkTemplate2MacroCase2(type1N, type1, VTK_LONG_LONG, long long, call); \ + vtkTemplate2MacroCase2(type1N, type1, VTK_UNSIGNED_LONG_LONG, unsigned long long, call); \ vtkTemplate2MacroCase2(type1N, type1, VTK_ID_TYPE, vtkIdType, call); \ vtkTemplate2MacroCase2(type1N, type1, VTK_LONG, long, call); \ vtkTemplate2MacroCase2(type1N, type1, VTK_UNSIGNED_LONG, unsigned long, call); \ @@ -766,8 +766,8 @@ virtual double *Get##name() \ #define vtkArrayIteratorTemplateMacro(call) \ vtkArrayIteratorTemplateMacroCase(VTK_DOUBLE, double, call); \ vtkArrayIteratorTemplateMacroCase(VTK_FLOAT, float, call); \ - vtkArrayIteratorTemplateMacroCase_ll(VTK_LONG_LONG, long long, call); \ - vtkArrayIteratorTemplateMacroCase_ll(VTK_UNSIGNED_LONG_LONG, unsigned long long, call);\ + vtkArrayIteratorTemplateMacroCase(VTK_LONG_LONG, long long, call); \ + vtkArrayIteratorTemplateMacroCase(VTK_UNSIGNED_LONG_LONG, unsigned long long, call); \ vtkArrayIteratorTemplateMacroCase(VTK_ID_TYPE, vtkIdType, call); \ vtkArrayIteratorTemplateMacroCase(VTK_LONG, long, call); \ vtkArrayIteratorTemplateMacroCase(VTK_UNSIGNED_LONG, unsigned long, call); \ @@ -781,23 +781,6 @@ virtual double *Get##name() \ vtkArrayIteratorTemplateMacroCase(VTK_STRING, vtkStdString, call); \ vtkTemplateMacroCase(VTK_BIT, vtkBitArrayIterator, call); -// Add "long long" to the template macro if it is enabled. -#if defined(VTK_TYPE_USE_LONG_LONG) -# define vtkTemplateMacroCase_ll(typeN, type, call) \ - vtkTemplateMacroCase(typeN, type, call); -# define vtkTemplate2MacroCase1_ll(type1N, type1, call) \ - vtkTemplate2MacroCase1(type1N, type1, call); -# define vtkTemplate2MacroCase2_ll(type1N, type1, type2N, type2, call) \ - vtkTemplate2MacroCase2(type1N, type1, type2N, type2, call); -# define vtkArrayIteratorTemplateMacroCase_ll(typeN, type, call) \ - vtkArrayIteratorTemplateMacroCase(typeN, type, call) -#else -# define vtkTemplateMacroCase_ll(typeN, type, call) -# define vtkTemplate2MacroCase1_ll(type1N, type1, call) -# define vtkTemplate2MacroCase2_ll(type1N, type1, type2N, type2, call) -# define vtkArrayIteratorTemplateMacroCase_ll(typeN, type, call) -#endif - //---------------------------------------------------------------------------- // Setup legacy code policy. diff --git a/Common/Core/vtkSortDataArray.cxx b/Common/Core/vtkSortDataArray.cxx index 4dab4016bde..5f4cb5ce5d8 100644 --- a/Common/Core/vtkSortDataArray.cxx +++ b/Common/Core/vtkSortDataArray.cxx @@ -290,7 +290,6 @@ static int vtkSortDataArrayComponentCompare_VTK_FLOAT( const void* a, const void (((float*)a)[vtkSortDataArrayComp] == ((float*)b)[vtkSortDataArrayComp] ? 0 : 1); } -#ifdef VTK_TYPE_USE_LONG_LONG static int vtkSortDataArrayComponentCompare_VTK_LONG_LONG( const void* a, const void* b ) { return ((long long*)a)[vtkSortDataArrayComp] < ((long long*)b)[vtkSortDataArrayComp] ? -1 : @@ -302,7 +301,6 @@ static int vtkSortDataArrayComponentCompare_VTK_UNSIGNED_LONG_LONG( const void* return ((unsigned long long*)a)[vtkSortDataArrayComp] < ((unsigned long long*)b)[vtkSortDataArrayComp] ? -1 : (((unsigned long long*)a)[vtkSortDataArrayComp] == ((unsigned long long*)b)[vtkSortDataArrayComp] ? 0 : 1); } -#endif // VTK_TYPE_USE_LONG_LONG static int vtkSortDataArrayComponentCompare_VTK_ID_TYPE( const void* a, const void* b ) { @@ -431,7 +429,6 @@ void vtkSortDataArray::SortArrayByComponent( vtkAbstractArray* arr, int k ) static_cast<size_t>(arr->GetDataTypeSize()*nc), vtkSortDataArrayComponentCompare_VTK_FLOAT); break; -#ifdef VTK_TYPE_USE_LONG_LONG case VTK_LONG_LONG: qsort(static_cast<void*>(arr->GetVoidPointer(0)), static_cast<size_t>(arr->GetNumberOfTuples()), @@ -444,7 +441,6 @@ void vtkSortDataArray::SortArrayByComponent( vtkAbstractArray* arr, int k ) static_cast<size_t>(arr->GetDataTypeSize()*nc), vtkSortDataArrayComponentCompare_VTK_UNSIGNED_LONG_LONG); break; -#endif // VTK_TYPE_USE_LONG_LONG case VTK_ID_TYPE: qsort(static_cast<void*>(arr->GetVoidPointer(0)), static_cast<size_t>(arr->GetNumberOfTuples()), diff --git a/Common/Core/vtkTemplateAliasMacro.h b/Common/Core/vtkTemplateAliasMacro.h index bcc67c30b01..c4a1cfce972 100644 --- a/Common/Core/vtkTemplateAliasMacro.h +++ b/Common/Core/vtkTemplateAliasMacro.h @@ -75,21 +75,13 @@ typedef vtkTypeTraits<VTK_TYPE_NAME_##typeN>::SizedType VTK_TT; call; \ }; break -// Add "long long" to the template macro if it is enabled. -#if defined(VTK_TYPE_USE_LONG_LONG) -# define vtkTemplateAliasMacroCase_ll(typeN, call) \ - vtkTemplateAliasMacroCase(typeN, call); -#else -# define vtkTemplateAliasMacroCase_ll(typeN, call) -#endif - // Define a macro to dispatch calls to a template instantiated over // the aliased scalar types. #define vtkTemplateAliasMacro(call) \ vtkTemplateAliasMacroCase(DOUBLE, call); \ vtkTemplateAliasMacroCase(FLOAT, call); \ - vtkTemplateAliasMacroCase_ll(LONG_LONG, call) \ - vtkTemplateAliasMacroCase_ll(UNSIGNED_LONG_LONG, call) \ + vtkTemplateAliasMacroCase(LONG_LONG, call); \ + vtkTemplateAliasMacroCase(UNSIGNED_LONG_LONG, call); \ vtkTemplateAliasMacroCase(ID_TYPE, call); \ vtkTemplateAliasMacroCase(LONG, call); \ vtkTemplateAliasMacroCase(UNSIGNED_LONG, call); \ diff --git a/Common/Core/vtkType.h b/Common/Core/vtkType.h index a096b6cf487..51c11275b11 100644 --- a/Common/Core/vtkType.h +++ b/Common/Core/vtkType.h @@ -41,7 +41,6 @@ #define VTK_STRING 13 #define VTK_OPAQUE 14 -/* These types are enabled if VTK_TYPE_USE_LONG_LONG is defined. */ #define VTK_LONG_LONG 16 #define VTK_UNSIGNED_LONG_LONG 17 @@ -195,7 +194,7 @@ typedef signed long vtkTypeInt32; #endif /* Select a 64-bit integer type. */ -#if defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8 +#if VTK_SIZEOF_LONG_LONG == 8 typedef unsigned long long vtkTypeUInt64; typedef signed long long vtkTypeInt64; # define VTK_TYPE_UINT64 VTK_UNSIGNED_LONG_LONG @@ -229,13 +228,13 @@ typedef double vtkTypeFloat64; /* Choose an implementation for vtkIdType. */ #define VTK_HAS_ID_TYPE #ifdef VTK_USE_64BIT_IDS -# if defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8 +# if VTK_SIZEOF_LONG_LONG == 8 typedef long long vtkIdType; # define VTK_ID_TYPE_IMPL VTK_LONG_LONG # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG_LONG # define VTK_ID_MIN VTK_LONG_LONG_MIN # define VTK_ID_MAX VTK_LONG_LONG_MAX -# elif defined(VTK_SIZEOF_LONG) && VTK_SIZEOF_LONG == 8 +# elif VTK_SIZEOF_LONG == 8 typedef long vtkIdType; # define VTK_ID_TYPE_IMPL VTK_LONG # define VTK_SIZEOF_ID_TYPE VTK_SIZEOF_LONG diff --git a/Common/Core/vtkTypeTraits.h b/Common/Core/vtkTypeTraits.h index 06806cf60fd..15c4a982268 100644 --- a/Common/Core/vtkTypeTraits.h +++ b/Common/Core/vtkTypeTraits.h @@ -120,21 +120,19 @@ VTK_TYPE_TRAITS(unsigned long, UNSIGNED_LONG, 0, UInt64, unsigned long, "%lu"); #endif // Define traits for long long types if they are enabled. -#if defined(VTK_TYPE_USE_LONG_LONG) -# define VTK_TYPE_NAME_LONG_LONG long long -# define VTK_TYPE_NAME_UNSIGNED_LONG_LONG unsigned long long -# if VTK_SIZEOF_LONG_LONG == 8 -# define VTK_TYPE_SIZED_LONG_LONG INT64 -# define VTK_TYPE_SIZED_UNSIGNED_LONG_LONG UINT64 -# define VTK_TYPE_LONG_LONG_FORMAT "%ll" +#define VTK_TYPE_NAME_LONG_LONG long long +#define VTK_TYPE_NAME_UNSIGNED_LONG_LONG unsigned long long +#if VTK_SIZEOF_LONG_LONG == 8 +# define VTK_TYPE_SIZED_LONG_LONG INT64 +# define VTK_TYPE_SIZED_UNSIGNED_LONG_LONG UINT64 +# define VTK_TYPE_LONG_LONG_FORMAT "%ll" VTK_TYPE_TRAITS(long long, LONG_LONG, 1, Int64, long long, VTK_TYPE_LONG_LONG_FORMAT "d"); VTK_TYPE_TRAITS(unsigned long long, UNSIGNED_LONG_LONG, 0, UInt64, unsigned long long, VTK_TYPE_LONG_LONG_FORMAT "u"); -# undef VTK_TYPE_LONG_LONG_FORMAT -# else -# error "Type long long is not 8 bytes in size." -# endif +# undef VTK_TYPE_LONG_LONG_FORMAT +#else +# error "Type long long is not 8 bytes in size." #endif // Define traits for vtkIdType. The template specialization is diff --git a/Common/Core/vtkVariant.cxx b/Common/Core/vtkVariant.cxx index 826c5e0ef1c..0ccd50e5722 100644 --- a/Common/Core/vtkVariant.cxx +++ b/Common/Core/vtkVariant.cxx @@ -103,13 +103,11 @@ bool vtkVariantStrictWeakOrder::operator()(const vtkVariant& s1, const vtkVarian case VTK_UNSIGNED_LONG: return (s1.Data.UnsignedLong < s2.Data.UnsignedLong); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: return (s1.Data.LongLong < s2.Data.LongLong); case VTK_UNSIGNED_LONG_LONG: return (s1.Data.UnsignedLongLong < s2.Data.UnsignedLongLong); -#endif case VTK_FLOAT: return (s1.Data.Float < s2.Data.Float); @@ -189,13 +187,11 @@ vtkVariantStrictEquality::operator()(const vtkVariant &s1, const vtkVariant &s2) case VTK_UNSIGNED_LONG: return (s1.Data.UnsignedLong == s2.Data.UnsignedLong); -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: return (s1.Data.LongLong == s2.Data.LongLong); case VTK_UNSIGNED_LONG_LONG: return (s1.Data.UnsignedLongLong == s2.Data.UnsignedLongLong); -#endif case VTK_FLOAT: return (s1.Data.Float == s2.Data.Float); @@ -318,7 +314,6 @@ vtkVariant::vtkVariant(const vtkVariant &s2, unsigned int type) this->Data.UnsignedLong = s2.ToUnsignedLong(&valid); break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: this->Data.LongLong = s2.ToLongLong(&valid); break; @@ -326,7 +321,6 @@ vtkVariant::vtkVariant(const vtkVariant &s2, unsigned int type) case VTK_UNSIGNED_LONG_LONG: this->Data.UnsignedLongLong = s2.ToUnsignedLongLong(&valid); break; -#endif case VTK_FLOAT: this->Data.Float = s2.ToFloat(&valid); @@ -478,7 +472,6 @@ vtkVariant::vtkVariant(unsigned long value) this->Type = VTK_UNSIGNED_LONG; } -#if defined(VTK_TYPE_USE_LONG_LONG) vtkVariant::vtkVariant(long long value) { this->Data.LongLong = value; @@ -492,7 +485,6 @@ vtkVariant::vtkVariant(unsigned long long value) this->Valid = 1; this->Type = VTK_UNSIGNED_LONG_LONG; } -#endif vtkVariant::vtkVariant(float value) { @@ -782,7 +774,6 @@ vtkStdString vtkVariant::ToString() const ostr << this->Data.UnsignedLong; return vtkStdString(ostr.str()); } -#if defined(VTK_TYPE_USE_LONG_LONG) if (this->IsLongLong()) { std::ostringstream ostr; @@ -797,7 +788,6 @@ vtkStdString vtkVariant::ToString() const ostr << this->Data.UnsignedLongLong; return vtkStdString(ostr.str()); } -#endif if (this->IsArray()) { vtkAbstractArray* arr = vtkAbstractArray::SafeDownCast(this->Data.VTKObject); @@ -940,11 +930,8 @@ vtkVariantToNumericInstantiateMacro(int); vtkVariantToNumericInstantiateMacro(unsigned int); vtkVariantToNumericInstantiateMacro(long); vtkVariantToNumericInstantiateMacro(unsigned long); - -#if defined(VTK_TYPE_USE_LONG_LONG) vtkVariantToNumericInstantiateMacro(long long); vtkVariantToNumericInstantiateMacro(unsigned long long); -#endif #endif @@ -1006,7 +993,6 @@ unsigned long vtkVariant::ToUnsignedLong(bool *valid) const return this->ToNumeric(valid, static_cast<unsigned long *>(0)); } -#if defined(VTK_TYPE_USE_LONG_LONG) long long vtkVariant::ToLongLong(bool *valid) const { return this->ToNumeric(valid, static_cast<long long *>(0)); @@ -1016,7 +1002,6 @@ unsigned long long vtkVariant::ToUnsignedLongLong(bool *valid) const { return this->ToNumeric(valid, static_cast<unsigned long long *>(0)); } -#endif vtkTypeInt64 vtkVariant::ToTypeInt64(bool *valid) const { @@ -1095,14 +1080,12 @@ ostream& operator << ( ostream& os, const vtkVariant& val ) case VTK_UNSIGNED_LONG: os << val.Data.UnsignedLong; break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: os << val.Data.LongLong; break; case VTK_UNSIGNED_LONG_LONG: os << val.Data.UnsignedLongLong; break; -#endif case VTK_OBJECT: if ( val.Data.VTKObject ) { diff --git a/Common/Core/vtkVariant.h b/Common/Core/vtkVariant.h index 018542c7e32..a20f3c62d0a 100644 --- a/Common/Core/vtkVariant.h +++ b/Common/Core/vtkVariant.h @@ -124,7 +124,6 @@ public: // Create an unsigned long variant. vtkVariant(unsigned long value); -#if defined(VTK_TYPE_USE_LONG_LONG) // Description: // Create a long long variant. vtkVariant(long long value); @@ -132,7 +131,6 @@ public: // Description: // Create an unsigned long long variant. vtkVariant(unsigned long long value); -#endif // Description: // Create a float variant. @@ -307,14 +305,12 @@ public: unsigned long ToUnsignedLong(bool *valid) const; unsigned long ToUnsignedLong() const { return this->ToUnsignedLong(0); }; -#if defined(VTK_TYPE_USE_LONG_LONG) long long ToLongLong(bool *valid) const; long long ToLongLong() const { return this->ToLongLong(0); }; unsigned long long ToUnsignedLongLong(bool *valid) const; unsigned long long ToUnsignedLongLong() const { return this->ToUnsignedLongLong(0); }; -#endif vtkTypeInt64 ToTypeInt64(bool *valid) const; vtkTypeInt64 ToTypeInt64() const { return this->ToTypeInt64(0); }; @@ -401,10 +397,8 @@ private: unsigned int UnsignedInt; long Long; unsigned long UnsignedLong; -#if defined(VTK_TYPE_USE_LONG_LONG) long long LongLong; unsigned long long UnsignedLongLong; -#endif vtkObjectBase* VTKObject; } Data; diff --git a/Common/Core/vtkVariantCast.h b/Common/Core/vtkVariantCast.h index fc70235a104..ddedfbbae49 100644 --- a/Common/Core/vtkVariantCast.h +++ b/Common/Core/vtkVariantCast.h @@ -101,8 +101,6 @@ inline unsigned long vtkVariantCast<unsigned long>(const vtkVariant& value, bool return value.ToUnsignedLong(valid); } -#ifdef VTK_TYPE_USE_LONG_LONG - template<> inline long long vtkVariantCast<long long>(const vtkVariant& value, bool* valid) { @@ -115,8 +113,6 @@ inline unsigned long long vtkVariantCast<unsigned long long>(const vtkVariant& v return value.ToUnsignedLongLong(valid); } -#endif - template<> inline float vtkVariantCast<float>(const vtkVariant& value, bool* valid) { diff --git a/Common/Core/vtkVariantCreate.h b/Common/Core/vtkVariantCreate.h index 907f80c7df8..8b5c08c9555 100644 --- a/Common/Core/vtkVariantCreate.h +++ b/Common/Core/vtkVariantCreate.h @@ -91,8 +91,6 @@ inline vtkVariant vtkVariantCreate<unsigned long>(const unsigned long& value) return value; } -#ifdef VTK_TYPE_USE_LONG_LONG - template<> inline vtkVariant vtkVariantCreate<long long>(const long long& value) { @@ -105,8 +103,6 @@ inline vtkVariant vtkVariantCreate<unsigned long long>(const unsigned long long& return value; } -#endif - template<> inline vtkVariant vtkVariantCreate<float>(const float& value) { diff --git a/Common/Core/vtkVariantExtract.h b/Common/Core/vtkVariantExtract.h index c17baf01b90..a8edf7aebb6 100644 --- a/Common/Core/vtkVariantExtract.h +++ b/Common/Core/vtkVariantExtract.h @@ -106,8 +106,6 @@ inline unsigned long vtkVariantExtract<unsigned long>(const vtkVariant& value, b return valid ? value.ToUnsignedLong() : 0; } -#ifdef VTK_TYPE_USE_LONG_LONG - template<> inline long long vtkVariantExtract<long long>(const vtkVariant& value, bool& valid) { @@ -122,8 +120,6 @@ inline unsigned long long vtkVariantExtract<unsigned long long>(const vtkVariant return valid ? value.ToUnsignedLongLong() : 0; } -#endif - template<> inline float vtkVariantExtract<float>(const vtkVariant& value, bool& valid) { diff --git a/Common/Core/vtkVariantInlineOperators.h b/Common/Core/vtkVariantInlineOperators.h index 415ce3fa091..38b8df8c572 100644 --- a/Common/Core/vtkVariantInlineOperators.h +++ b/Common/Core/vtkVariantInlineOperators.h @@ -12,12 +12,8 @@ inline bool IsSigned64Bit(int VariantType) { -#if defined(VTK_TYPE_USE_LONG_LONG) return ((VariantType == VTK_LONG_LONG) || (VariantType == VTK_TYPE_INT64)); -#else - return (VariantType == VTK_TYPE_INT64); -#endif } inline bool diff --git a/Common/Core/vtkVariantToNumeric.cxx b/Common/Core/vtkVariantToNumeric.cxx index c7e0f22651f..01fe7482f27 100644 --- a/Common/Core/vtkVariantToNumeric.cxx +++ b/Common/Core/vtkVariantToNumeric.cxx @@ -78,7 +78,6 @@ T vtkVariant::ToNumeric(bool* valid, T* vtkNotUsed(ignored)) const { return static_cast<T>(this->Data.UnsignedLong); } -#if defined(VTK_TYPE_USE_LONG_LONG) if (this->IsLongLong()) { return static_cast<T>(this->Data.LongLong); @@ -87,7 +86,6 @@ T vtkVariant::ToNumeric(bool* valid, T* vtkNotUsed(ignored)) const { return static_cast<T>(this->Data.UnsignedLongLong); } -#endif // For arrays, convert the first value to the appropriate type. if (this->IsArray()) { diff --git a/Common/DataModel/vtkImageIterator.cxx b/Common/DataModel/vtkImageIterator.cxx index 9ed4a0fbe96..a964627dcae 100644 --- a/Common/DataModel/vtkImageIterator.cxx +++ b/Common/DataModel/vtkImageIterator.cxx @@ -19,14 +19,12 @@ template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<signed char>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<char>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<int>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<long>; +template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<long long>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<short>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<float>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<double>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned long>; +template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned long long>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned short>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned char>; template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned int>; -#if defined(VTK_TYPE_USE_LONG_LONG) -template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<long long>; -template class VTKCOMMONDATAMODEL_EXPORT vtkImageIterator<unsigned long long>; -#endif diff --git a/Common/DataModel/vtkXMLDataElement.cxx b/Common/DataModel/vtkXMLDataElement.cxx index 9ed1ad5fa9b..63a2f4a0a6c 100644 --- a/Common/DataModel/vtkXMLDataElement.cxx +++ b/Common/DataModel/vtkXMLDataElement.cxx @@ -722,7 +722,6 @@ int vtkXMLDataElement::GetScalarAttribute(const char* name, } //---------------------------------------------------------------------------- -#ifdef VTK_TYPE_USE_LONG_LONG int vtkXMLDataElement::GetScalarAttribute(const char* name, long long& value) { @@ -733,7 +732,6 @@ int vtkXMLDataElement::GetScalarAttribute(const char* name, { return this->GetVectorAttribute(name, 1, &value); } -#endif //---------------------------------------------------------------------------- template <class T> @@ -785,7 +783,6 @@ int vtkXMLDataElement::GetVectorAttribute(const char* name, int length, } //---------------------------------------------------------------------------- -#ifdef VTK_TYPE_USE_LONG_LONG int vtkXMLDataElement::GetVectorAttribute(const char* name, int length, long long* data) { @@ -798,7 +795,6 @@ int vtkXMLDataElement::GetVectorAttribute(const char* name, int length, return vtkXMLDataElementVectorAttributeParse(this->GetAttribute(name), length, data); } -#endif //---------------------------------------------------------------------------- int vtkXMLDataElement::GetWordTypeAttribute(const char* name, int& value) @@ -926,7 +922,7 @@ int vtkXMLDataElement::GetWordTypeAttribute(const char* name, int& value) #elif VTK_SIZEOF_LONG == 8 value = VTK_LONG; return 1; -#elif defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8 +#elif VTK_SIZEOF_LONG_LONG == 8 value = VTK_LONG_LONG; return 1; #else @@ -945,7 +941,7 @@ int vtkXMLDataElement::GetWordTypeAttribute(const char* name, int& value) #elif VTK_SIZEOF_LONG == 8 value = VTK_UNSIGNED_LONG; return 1; -#elif defined(VTK_TYPE_USE_LONG_LONG) && VTK_SIZEOF_LONG_LONG == 8 +#elif VTK_SIZEOF_LONG_LONG == 8 value = VTK_UNSIGNED_LONG_LONG; return 1; #else @@ -1042,7 +1038,6 @@ void vtkXMLDataElement::SetVectorAttribute(const char* name, int length, } //---------------------------------------------------------------------------- -#ifdef VTK_TYPE_USE_LONG_LONG void vtkXMLDataElement::SetVectorAttribute(const char* name, int length, long long const* data) { @@ -1053,7 +1048,6 @@ void vtkXMLDataElement::SetVectorAttribute(const char* name, int length, { vtkXMLDataElementVectorAttributeSet(this, name, length, data); } -#endif //---------------------------------------------------------------------------- int vtkXMLDataElement::IsSpace(char c) diff --git a/Common/DataModel/vtkXMLDataElement.h b/Common/DataModel/vtkXMLDataElement.h index 7ae0005214e..b9ff535a81b 100644 --- a/Common/DataModel/vtkXMLDataElement.h +++ b/Common/DataModel/vtkXMLDataElement.h @@ -97,14 +97,12 @@ public: void SetVectorAttribute(const char* name, int length, const unsigned long* value); //BTX -#ifdef VTK_TYPE_USE_LONG_LONG int GetScalarAttribute(const char* name, long long& value); int GetVectorAttribute(const char* name, int length, long long* value); void SetVectorAttribute(const char* name, int length, long long const* value); int GetScalarAttribute(const char* name, unsigned long long& value); int GetVectorAttribute(const char* name, int length, unsigned long long* value); void SetVectorAttribute(const char* name, int length, unsigned long long const* value); -#endif //ETX // Description: diff --git a/Common/ExecutionModel/vtkImageProgressIterator.cxx b/Common/ExecutionModel/vtkImageProgressIterator.cxx index 69bf6318591..9eddc9d6a97 100644 --- a/Common/ExecutionModel/vtkImageProgressIterator.cxx +++ b/Common/ExecutionModel/vtkImageProgressIterator.cxx @@ -34,14 +34,12 @@ template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<signed ch template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<char>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<int>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<long>; +template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<long long>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<short>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<float>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<double>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned long>; +template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned long long>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned short>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned char>; template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned int>; -#if defined(VTK_TYPE_USE_LONG_LONG) -template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<long long>; -template class VTKCOMMONEXECUTIONMODEL_EXPORT vtkImageProgressIterator<unsigned long long>; -#endif diff --git a/IO/Legacy/vtkDataReader.cxx b/IO/Legacy/vtkDataReader.cxx index 7de49c175f5..9b9c40e4dd0 100644 --- a/IO/Legacy/vtkDataReader.cxx +++ b/IO/Legacy/vtkDataReader.cxx @@ -47,10 +47,7 @@ #include "vtkVariantArray.h" #include <sstream> -// We only have vtkTypeUInt64Array if we have long long -#if defined(VTK_TYPE_USE_LONG_LONG) #include "vtkTypeUInt64Array.h" -#endif #include <ctype.h> #include <sys/stat.h> @@ -319,7 +316,6 @@ int vtkDataReader::Read(unsigned long *result) return 1; } -#if defined(VTK_TYPE_USE_LONG_LONG) int vtkDataReader::Read(long long *result) { *this->IS >> *result; @@ -339,7 +335,6 @@ int vtkDataReader::Read(unsigned long long *result) } return 1; } -#endif int vtkDataReader::Read(float *result) { @@ -1587,8 +1582,6 @@ vtkAbstractArray *vtkDataReader::ReadArray(const char *dataType, int numTuples, else if ( ! strncmp(type, "vtktypeuint64", 13) ) { -// We only have vtkTypeUInt64Array if we have long long -#if defined(VTK_TYPE_USE_LONG_LONG) array = vtkTypeUInt64Array::New(); array->SetNumberOfComponents(numComp); vtkTypeUInt64 *ptr = ((vtkTypeUInt64Array *)array)->WritePointer(0,numTuples*numComp); @@ -1602,11 +1595,6 @@ vtkAbstractArray *vtkDataReader::ReadArray(const char *dataType, int numTuples, { vtkReadASCIIData(this, ptr, numTuples, numComp); } -#else - vtkErrorMacro("This version of VTK cannot read unsigned 64-bit integers."); - free(type); - return NULL; -#endif } else if ( ! strncmp(type, "float", 5) ) @@ -1855,14 +1843,12 @@ vtkAbstractArray *vtkDataReader::ReadArray(const char *dataType, int numTuples, case VTK_DOUBLE: v = sv.ToDouble(); break; -#ifdef VTK_TYPE_USE_LONG_LONG case VTK_LONG_LONG: v = sv.ToLongLong(); break; case VTK_UNSIGNED_LONG_LONG: v = sv.ToUnsignedLongLong(); break; -#endif case VTK_STRING: v = sv.ToString(); break; diff --git a/IO/Legacy/vtkDataReader.h b/IO/Legacy/vtkDataReader.h index f58f87bcbc1..401ec3487a0 100644 --- a/IO/Legacy/vtkDataReader.h +++ b/IO/Legacy/vtkDataReader.h @@ -310,10 +310,8 @@ public: int Read(unsigned int *); int Read(long *); int Read(unsigned long *); -#if defined(VTK_TYPE_USE_LONG_LONG) int Read(long long *result); int Read(unsigned long long *result); -#endif int Read(float *); int Read(double *); //ETX diff --git a/IO/Legacy/vtkDataWriter.cxx b/IO/Legacy/vtkDataWriter.cxx index d2494f10ddf..68ede07352e 100644 --- a/IO/Legacy/vtkDataWriter.cxx +++ b/IO/Legacy/vtkDataWriter.cxx @@ -1122,7 +1122,6 @@ int vtkDataWriter::WriteArray(ostream *fp, int dataType, vtkAbstractArray *data, } break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: { sprintf (str, format, "vtktypeint64"); *fp << str; @@ -1143,7 +1142,6 @@ int vtkDataWriter::WriteArray(ostream *fp, int dataType, vtkAbstractArray *data, vtkWriteDataArray(fp, s, this->FileType, outputFormat, num, numComp); } break; -#endif case VTK_FLOAT: { diff --git a/IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.cxx b/IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.cxx index f7ed6c6ea33..4740e3871a5 100644 --- a/IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.cxx +++ b/IO/MPIParallel/vtkMPIMultiBlockPLOT3DReader.cxx @@ -44,10 +44,8 @@ namespace DEFINE_MPI_TYPE(unsigned long, MPI_UNSIGNED_LONG); DEFINE_MPI_TYPE(float, MPI_FLOAT); DEFINE_MPI_TYPE(double, MPI_DOUBLE); -#if defined(VTK_TYPE_USE_LONG_LONG) DEFINE_MPI_TYPE(long long, MPI_LONG_LONG); DEFINE_MPI_TYPE(unsigned long long, MPI_UNSIGNED_LONG_LONG); -#endif class MPIPlot3DException : public std::exception { diff --git a/IO/PostgreSQL/vtkPostgreSQLQuery.cxx b/IO/PostgreSQL/vtkPostgreSQLQuery.cxx index 9b6fed806c3..1f0e1c10749 100644 --- a/IO/PostgreSQL/vtkPostgreSQLQuery.cxx +++ b/IO/PostgreSQL/vtkPostgreSQLQuery.cxx @@ -50,10 +50,8 @@ DECLARE_CONVERTER(Float); DECLARE_CONVERTER(Double); DECLARE_CONVERTER(VtkIdType); DECLARE_CONVERTER(String); -#ifdef VTK_TYPE_USE_LONG_LONG DECLARE_CONVERTER(SignedLongLong); DECLARE_CONVERTER(UnsignedLongLong); -#endif template<typename T> void ConvertFromNetworkOrder(T &target, const char *rawBytes) @@ -163,7 +161,6 @@ vtkVariant vtkPostgreSQLQuery::DataValue( vtkIdType column ) { return ConvertStringToUnsignedLong(isBinary, rawData); } -#ifdef VTK_TYPE_USE_LONG_LONG case VTK_LONG_LONG: { return ConvertStringToSignedLongLong(isBinary, rawData); @@ -172,7 +169,6 @@ vtkVariant vtkPostgreSQLQuery::DataValue( vtkIdType column ) { return ConvertStringToUnsignedLongLong(isBinary, rawData); } -#endif // VTK_TYPE_USE_LONG_LONG case VTK_FLOAT: { return ConvertStringToFloat(isBinary, rawData); @@ -783,8 +779,6 @@ vtkVariant ConvertStringToUnsignedLong(bool isBinary, const char *rawData) // ---------------------------------------------------------------------- -#ifdef VTK_TYPE_USE_LONG_LONG - vtkVariant ConvertStringToSignedLongLong(bool isBinary, const char *rawData) { if (isBinary) @@ -817,8 +811,6 @@ vtkVariant ConvertStringToUnsignedLongLong(bool isBinary, const char *rawData) } } -#endif // VTK_TYPE_USE_LONG_LONG - // ---------------------------------------------------------------------- vtkVariant ConvertStringToFloat(bool isBinary, const char *rawData) diff --git a/IO/SQL/vtkSQLQuery.cxx b/IO/SQL/vtkSQLQuery.cxx index bcf6cb9cb0a..e0dbb852fa3 100644 --- a/IO/SQL/vtkSQLQuery.cxx +++ b/IO/SQL/vtkSQLQuery.cxx @@ -213,10 +213,8 @@ bool vtkSQLQuery::BindParameter(int index, vtkVariant data) VTK_VARIANT_BIND_PARAMETER(VTK_UNSIGNED_INT,ToUnsignedInt); VTK_VARIANT_BIND_PARAMETER(VTK_LONG,ToLong); VTK_VARIANT_BIND_PARAMETER(VTK_UNSIGNED_LONG,ToUnsignedLong); -#if defined(VTK_TYPE_USE_LONG_LONG) VTK_VARIANT_BIND_PARAMETER(VTK_LONG_LONG,ToLongLong); VTK_VARIANT_BIND_PARAMETER(VTK_UNSIGNED_LONG_LONG,ToUnsignedLongLong); -#endif case VTK_OBJECT: vtkErrorMacro(<<"Variants of type VTK_OBJECT cannot be inserted into a database."); return false; diff --git a/IO/XML/vtkXMLWriter.cxx b/IO/XML/vtkXMLWriter.cxx index c1d4e459146..5209ed70a58 100644 --- a/IO/XML/vtkXMLWriter.cxx +++ b/IO/XML/vtkXMLWriter.cxx @@ -1583,10 +1583,8 @@ const char* vtkXMLWriter::GetWordTypeName(int dataType) case VTK_UNSIGNED_INT: isSigned = 0; size = sizeof(unsigned int); break; case VTK_UNSIGNED_LONG: isSigned = 0; size = sizeof(unsigned long); break; case VTK_UNSIGNED_SHORT: isSigned = 0; size = sizeof(unsigned short); break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: isSigned = 1; size = sizeof(long long); break; case VTK_UNSIGNED_LONG_LONG: isSigned = 0; size = sizeof(unsigned long long); break; -#endif default: { vtkWarningMacro("Unsupported data type: " << dataType); } break; diff --git a/Imaging/Core/vtkImageStencilIterator.cxx b/Imaging/Core/vtkImageStencilIterator.cxx index 0de4271b58c..ad081fc1ea7 100644 --- a/Imaging/Core/vtkImageStencilIterator.cxx +++ b/Imaging/Core/vtkImageStencilIterator.cxx @@ -26,7 +26,5 @@ template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<unsigned long>; template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<unsigned short>; template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<unsigned char>; template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<unsigned int>; -#if defined(VTK_TYPE_USE_LONG_LONG) template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<long long>; template class VTKIMAGINGCORE_EXPORT vtkImageStencilIterator<unsigned long long>; -#endif diff --git a/Infovis/Boost/vtkVariantBoostSerialization.h b/Infovis/Boost/vtkVariantBoostSerialization.h index 90c751cf0ca..4b864e8d49b 100644 --- a/Infovis/Boost/vtkVariantBoostSerialization.h +++ b/Infovis/Boost/vtkVariantBoostSerialization.h @@ -120,11 +120,9 @@ void save(Archiver& ar, const vtkVariant& variant, VTK_VARIANT_SAVE(VTK_UNSIGNED_INT,unsigned int,ToUnsignedInt); VTK_VARIANT_SAVE(VTK_LONG,long,ToLong); VTK_VARIANT_SAVE(VTK_UNSIGNED_LONG,unsigned long,ToUnsignedLong); -#if defined(VTK_TYPE_USE_LONG_LONG) VTK_VARIANT_SAVE(VTK_LONG_LONG,long long,ToLongLong); VTK_VARIANT_SAVE(VTK_UNSIGNED_LONG_LONG,unsigned long long, ToUnsignedLongLong); -#endif default: cerr << "cannot serialize variant with type " << variant.GetType() << '\n'; @@ -163,10 +161,8 @@ void load(Archiver& ar, vtkVariant& variant, VTK_VARIANT_LOAD(VTK_UNSIGNED_INT,unsigned int); VTK_VARIANT_LOAD(VTK_LONG,long); VTK_VARIANT_LOAD(VTK_UNSIGNED_LONG,unsigned long); -#if defined(VTK_TYPE_USE_LONG_LONG) VTK_VARIANT_LOAD(VTK_LONG_LONG,long long); VTK_VARIANT_LOAD(VTK_UNSIGNED_LONG_LONG,unsigned long long); -#endif default: cerr << "cannot deserialize variant with type " << static_cast<unsigned int>(Type) << '\n'; variant = vtkVariant(); diff --git a/Parallel/Core/vtkCommunicator.h b/Parallel/Core/vtkCommunicator.h index f346713e775..8f9c8529a25 100644 --- a/Parallel/Core/vtkCommunicator.h +++ b/Parallel/Core/vtkCommunicator.h @@ -179,16 +179,14 @@ public: int Send(const vtkIdType* data, vtkIdType length, int remoteHandle, int tag) { return this->SendVoidArray(data, length, VTK_ID_TYPE, remoteHandle, tag); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Send(const long long* data, vtkIdType length, int remoteHandle, int tag) { return this->SendVoidArray(data, length, VTK_LONG_LONG, remoteHandle, tag); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Send(const unsigned long long* data, vtkIdType length, int remoteHandle, int tag) { return this->SendVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag); } -#endif //BTX int Send(const vtkMultiProcessStream& stream, int remoteId, int tag); //ETX @@ -262,16 +260,14 @@ public: int Receive(vtkIdType* data, vtkIdType maxlength, int remoteHandle, int tag) { return this->ReceiveVoidArray(data, maxlength, VTK_ID_TYPE, remoteHandle, tag); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Receive(long long* data, vtkIdType maxlength, int remoteHandle, int tag) { return this->ReceiveVoidArray(data, maxlength, VTK_LONG_LONG, remoteHandle, tag); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Receive(unsigned long long* data, vtkIdType maxlength, int remoteHandle, int tag) { return this->ReceiveVoidArray(data, maxlength, VTK_UNSIGNED_LONG_LONG, remoteHandle, tag); } -#endif //BTX int Receive(vtkMultiProcessStream& stream, int remoteId, int tag); //ETX @@ -333,16 +329,14 @@ public: int Broadcast(vtkIdType *data, vtkIdType length, int srcProcessId) { return this->BroadcastVoidArray(data, length, VTK_ID_TYPE, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Broadcast(long long *data, vtkIdType length, int srcProcessId) { return this->BroadcastVoidArray(data, length, VTK_LONG_LONG, srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Broadcast(unsigned long long *data, vtkIdType length, int srcProcessId) { return this->BroadcastVoidArray(data, length, VTK_UNSIGNED_LONG_LONG, srcProcessId); } -#endif int Broadcast(vtkDataObject *data, int srcProcessId); int Broadcast(vtkDataArray *data, int srcProcessId); //BTX @@ -418,20 +412,18 @@ public: return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Gather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId) { return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId) { return this->GatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, destProcessId); } -#endif int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId); @@ -530,7 +522,7 @@ public: sendLength, recvLengths, offsets, VTK_ID_TYPE, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId) { @@ -539,7 +531,6 @@ public: offsets, VTK_LONG_LONG, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId) { @@ -547,7 +538,6 @@ public: sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG_LONG, destProcessId); } -#endif // Description: // For the first GatherV variant, \c recvLenghts and \c offsets known on // \c destProcessId and are passed in as parameters @@ -643,20 +633,18 @@ public: return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Scatter(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId) { return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Scatter(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int srcProcessId) { return this->ScatterVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, srcProcessId); } -#endif int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId); @@ -751,7 +739,7 @@ public: sendLengths, offsets, recvLength, VTK_ID_TYPE, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int ScatterV(const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId) { @@ -760,7 +748,6 @@ public: VTK_LONG_LONG, srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int ScatterV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId) { @@ -768,7 +755,6 @@ public: sendLengths, offsets, recvLength, VTK_UNSIGNED_LONG_LONG, srcProcessId); } -#endif // Description: // Same as gather except that the result ends up on all processes. @@ -822,20 +808,18 @@ public: return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length) { return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllGather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length) { return this->AllGatherVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG); } -#endif int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer); // Description: @@ -925,7 +909,7 @@ public: sendLength, recvLengths, offsets, VTK_ID_TYPE); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets) { @@ -934,7 +918,6 @@ public: offsets, VTK_LONG_LONG); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets) { @@ -942,7 +925,6 @@ public: sendLength, recvLengths, offsets, VTK_UNSIGNED_LONG_LONG); } -#endif int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets); int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer); @@ -1012,20 +994,18 @@ public: return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, operation, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId) { return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation, int destProcessId) { return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId); } -#endif int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId); @@ -1093,20 +1073,18 @@ public: return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, operation, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId) { return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation, int destProcessId) { return this->ReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation, destProcessId); } -#endif int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation, int destProcessId); @@ -1173,20 +1151,18 @@ public: return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, operation); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation) { return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation) { return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation); } -#endif int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation); int AllReduce(const int *sendBuffer, int *recvBuffer, @@ -1250,20 +1226,18 @@ public: return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_ID_TYPE, operation); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, Operation *operation) { return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_LONG_LONG, operation); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, Operation *operation) { return this->AllReduceVoidArray(sendBuffer, recvBuffer, length, VTK_UNSIGNED_LONG_LONG, operation); } -#endif int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, Operation *operation); diff --git a/Parallel/Core/vtkMultiProcessController.h b/Parallel/Core/vtkMultiProcessController.h index 7e43d30d5c0..3d2f542d164 100644 --- a/Parallel/Core/vtkMultiProcessController.h +++ b/Parallel/Core/vtkMultiProcessController.h @@ -369,12 +369,10 @@ public: int Send(const double* data, vtkIdType length, int remoteProcessId, int tag); #ifdef VTK_USE_64BIT_IDS int Send(const vtkIdType* data, vtkIdType length, int remoteProcessId, int tag); -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Send(const long long* data, vtkIdType length, int remoteProcessId, int tag); #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Send(const unsigned long long* data, vtkIdType length, int remoteProcessId, int tag); -#endif int Send(vtkDataObject *data, int remoteId, int tag); int Send(vtkDataArray *data, int remoteId, int tag); @@ -410,12 +408,10 @@ public: int Receive(double* data, vtkIdType maxlength, int remoteProcessId, int tag); #ifdef VTK_USE_64BIT_IDS int Receive(vtkIdType* data, vtkIdType maxlength, int remoteProcessId, int tag); -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Receive(long long* data, vtkIdType maxLength, int remoteProcessId, int tag); #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Receive(unsigned long long* data, vtkIdType maxLength, int remoteProcessId, int tag); -#endif int Receive(vtkDataObject* data, int remoteId, int tag); int Receive(vtkDataArray* data, int remoteId, int tag); //BTX @@ -478,16 +474,14 @@ public: int Broadcast(vtkIdType *data, vtkIdType length, int srcProcessId) { return this->Communicator->Broadcast(data, length, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Broadcast(long long *data, vtkIdType length, int srcProcessId) { return this->Communicator->Broadcast(data, length, srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Broadcast(unsigned long long *data, vtkIdType length, int srcProcessId) { return this->Communicator->Broadcast(data, length, srcProcessId); } -#endif int Broadcast(vtkDataObject *data, int srcProcessId) { return this->Communicator->Broadcast(data, srcProcessId); } @@ -569,20 +563,18 @@ public: return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Gather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int destProcessId) { return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Gather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int destProcessId) { return this->Communicator->Gather(sendBuffer, recvBuffer, length, destProcessId); } -#endif int Gather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int destProcessId) { return this->Communicator->Gather(sendBuffer, recvBuffer, destProcessId); @@ -683,7 +675,7 @@ public: sendLength, recvLengths, offsets, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int GatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId) { @@ -692,7 +684,6 @@ public: offsets, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int GatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets, int destProcessId) { @@ -701,7 +692,6 @@ public: offsets, destProcessId); } -#endif int GatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets, int destProcessId) { return this->Communicator->GatherV(sendBuffer, recvBuffer, @@ -800,20 +790,18 @@ public: return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Scatter(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int srcProcessId) { return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Scatter(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int srcProcessId) { return this->Communicator->Scatter(sendBuffer, recvBuffer, length, srcProcessId); } -#endif int Scatter(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int srcProcessId) { return this->Communicator->Scatter(sendBuffer, recvBuffer, srcProcessId); @@ -910,7 +898,7 @@ public: sendLengths, offsets, recvLength, srcProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int ScatterV(const long long *sendBuffer, long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId) { @@ -919,7 +907,6 @@ public: srcProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int ScatterV(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType *sendLengths, vtkIdType *offsets, vtkIdType recvLength, int srcProcessId) { @@ -927,7 +914,6 @@ public: sendLengths, offsets, recvLength, srcProcessId); } -#endif // Description: // Same as gather except that the result ends up on all processes. @@ -972,16 +958,14 @@ public: vtkIdType length) { return this->Communicator->AllGather(sendBuffer, recvBuffer, length); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllGather(const long long *sendBuffer, long long *recvBuffer, vtkIdType length) { return this->Communicator->AllGather(sendBuffer, recvBuffer, length); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllGather(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length) { return this->Communicator->AllGather(sendBuffer, recvBuffer, length); } -#endif int AllGather(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer) { return this->Communicator->AllGather(sendBuffer, recvBuffer); } @@ -1073,7 +1057,7 @@ public: sendLength, recvLengths, offsets); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllGatherV(const long long* sendBuffer, long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets) { @@ -1082,7 +1066,6 @@ public: offsets); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllGatherV(const unsigned long long* sendBuffer, unsigned long long* recvBuffer, vtkIdType sendLength, vtkIdType* recvLengths, vtkIdType* offsets) { @@ -1090,7 +1073,6 @@ public: sendLength, recvLengths, offsets); } -#endif int AllGatherV(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkIdType *recvLengths, vtkIdType *offsets) { return this->Communicator->AllGatherV(sendBuffer, recvBuffer, @@ -1171,20 +1153,18 @@ public: return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation, int destProcessId) { return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation, int destProcessId) { return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId); } -#endif int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation, int destProcessId) { return this->Communicator->Reduce(sendBuffer, recvBuffer, @@ -1268,7 +1248,7 @@ public: return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int Reduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId) { @@ -1276,14 +1256,12 @@ public: operation, destProcessId); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int Reduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation, int destProcessId) { return this->Communicator->Reduce(sendBuffer, recvBuffer, length, operation, destProcessId); } -#endif int Reduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation, int destProcessId) { return this->Communicator->Reduce(sendBuffer, recvBuffer, @@ -1354,20 +1332,18 @@ public: return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, int operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, int operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } -#endif int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, int operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation); @@ -1434,20 +1410,18 @@ public: return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else int AllReduce(const long long *sendBuffer, long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } #endif -#ifdef VTK_TYPE_USE_LONG_LONG int AllReduce(const unsigned long long *sendBuffer, unsigned long long *recvBuffer, vtkIdType length, vtkCommunicator::Operation *operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, length, operation); } -#endif int AllReduce(vtkDataArray *sendBuffer, vtkDataArray *recvBuffer, vtkCommunicator::Operation *operation) { return this->Communicator->AllReduce(sendBuffer, recvBuffer, operation); @@ -1708,7 +1682,7 @@ inline int vtkMultiProcessController::Send(const vtkIdType* data, return 0; } } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else inline int vtkMultiProcessController::Send(const long long* data, vtkIdType length, int remoteProcessId, int tag) @@ -1723,7 +1697,6 @@ inline int vtkMultiProcessController::Send(const long long* data, } } #endif -#ifdef VTK_TYPE_USE_LONG_LONG inline int vtkMultiProcessController::Send(const unsigned long long* data, vtkIdType length, @@ -1739,8 +1712,6 @@ inline int vtkMultiProcessController::Send(const unsigned long long* data, } } -#endif - inline int vtkMultiProcessController::Send(const vtkMultiProcessStream& stream, int remoteId, int tag) { @@ -1952,7 +1923,7 @@ inline int vtkMultiProcessController::Receive(vtkIdType* data, return 0; } } -#elif defined(VTK_TYPE_USE_LONG_LONG) +#else inline int vtkMultiProcessController::Receive(long long* data, vtkIdType length, int remoteProcessId, int tag) { @@ -1967,7 +1938,6 @@ inline int vtkMultiProcessController::Receive(long long* data, vtkIdType length, } #endif -#ifdef VTK_TYPE_USE_LONG_LONG inline int vtkMultiProcessController::Receive(unsigned long long* data, vtkIdType length, int remoteProcessId, int tag) { @@ -1980,8 +1950,6 @@ inline int vtkMultiProcessController::Receive(unsigned long long* data, vtkIdTyp return 0; } } -#endif - inline int vtkMultiProcessController::Receive(vtkMultiProcessStream& stream, int remoteId, int tag) diff --git a/Rendering/Label/vtkDynamic2DLabelMapper.cxx b/Rendering/Label/vtkDynamic2DLabelMapper.cxx index b97c42be71b..0104b4c90c2 100644 --- a/Rendering/Label/vtkDynamic2DLabelMapper.cxx +++ b/Rendering/Label/vtkDynamic2DLabelMapper.cxx @@ -303,12 +303,10 @@ void vtkDynamic2DLabelMapper::RenderOpaqueGeometry(vtkViewport *viewport, case VTK_ID_TYPE: FormatString = vtkTypeTraits<vtkIdType>::ParseFormat(); break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: FormatString = vtkTypeTraits<long long>::ParseFormat(); break; case VTK_UNSIGNED_LONG_LONG: FormatString = vtkTypeTraits<unsigned long long>::ParseFormat(); break; -#endif case VTK_FLOAT: FormatString = vtkTypeTraits<float>::ParseFormat(); break; diff --git a/Rendering/Label/vtkLabeledDataMapper.cxx b/Rendering/Label/vtkLabeledDataMapper.cxx index 3e65cdf2fca..622b9bc5f91 100644 --- a/Rendering/Label/vtkLabeledDataMapper.cxx +++ b/Rendering/Label/vtkLabeledDataMapper.cxx @@ -491,12 +491,10 @@ void vtkLabeledDataMapper::BuildLabelsInternal(vtkDataSet* input) case VTK_ID_TYPE: FormatString = vtkTypeTraits<vtkIdType>::ParseFormat(); break; -#if defined(VTK_TYPE_USE_LONG_LONG) case VTK_LONG_LONG: FormatString = vtkTypeTraits<long long>::ParseFormat(); break; case VTK_UNSIGNED_LONG_LONG: FormatString = vtkTypeTraits<unsigned long long>::ParseFormat(); break; -#endif case VTK_FLOAT: FormatString = vtkTypeTraits<float>::ParseFormat(); break; diff --git a/Rendering/ParallelLIC/vtkMPIPixelTT.cxx b/Rendering/ParallelLIC/vtkMPIPixelTT.cxx index f92b6b62ab2..ea60e5cca45 100644 --- a/Rendering/ParallelLIC/vtkMPIPixelTT.cxx +++ b/Rendering/ParallelLIC/vtkMPIPixelTT.cxx @@ -31,7 +31,5 @@ vtkMPIPixelTTMacro2(unsigned long, MPI_UNSIGNED_LONG, VTK_UNSIGNED_LONG) vtkMPIPixelTTMacro2(float, MPI_FLOAT, VTK_FLOAT) vtkMPIPixelTTMacro2(double, MPI_DOUBLE, VTK_DOUBLE) //vtkMPIPixelTTMacro2(vtkIdType, MPI_LONG_LONG, VTK_IDTYPE) -#ifdef VTK_TYPE_USE_LONG_LONG vtkMPIPixelTTMacro2(long long, MPI_LONG_LONG, VTK_LONG_LONG) vtkMPIPixelTTMacro2(unsigned long long, MPI_UNSIGNED_LONG_LONG, VTK_UNSIGNED_LONG_LONG) -#endif diff --git a/Rendering/ParallelLIC/vtkMPIPixelTT.h b/Rendering/ParallelLIC/vtkMPIPixelTT.h index f047a5a6931..84f5ee658b9 100644 --- a/Rendering/ParallelLIC/vtkMPIPixelTT.h +++ b/Rendering/ParallelLIC/vtkMPIPixelTT.h @@ -46,10 +46,8 @@ vtkMPIPixelTTMacro1(unsigned long) vtkMPIPixelTTMacro1(float) vtkMPIPixelTTMacro1(double) //vtkMPIPixelTTMacro1(vtkIdType) -#ifdef VTK_TYPE_USE_LONG_LONG vtkMPIPixelTTMacro1(long long) vtkMPIPixelTTMacro1(unsigned long long) -#endif //ETX #endif // VTK-HeaderTest-Exclude: vtkMPIPixelTT.h diff --git a/Rendering/Tk/vtkTkRenderWidget.cxx b/Rendering/Tk/vtkTkRenderWidget.cxx index ae7e877a691..57c6923ef1d 100644 --- a/Rendering/Tk/vtkTkRenderWidget.cxx +++ b/Rendering/Tk/vtkTkRenderWidget.cxx @@ -172,13 +172,8 @@ extern "C" { // Find the image #ifdef VTK_PYTHON_BUILD char typeCheck[256]; -#if defined(VTK_TYPE_USE_LONG_LONG) unsigned long long l; sscanf ( argv[1], "_%llx_%s", &l, typeCheck); -#else - unsigned long l; - sscanf ( argv[1], "_%lx_%s", &l, typeCheck); -#endif union { void *p; uintptr_t l; } u; u.l = static_cast<uintptr_t>(l); // Various historical pointer manglings diff --git a/Wrapping/Java/vtkJavaUtil.cxx b/Wrapping/Java/vtkJavaUtil.cxx index a25e93f0a63..6729de3e709 100644 --- a/Wrapping/Java/vtkJavaUtil.cxx +++ b/Wrapping/Java/vtkJavaUtil.cxx @@ -148,7 +148,6 @@ JNIEXPORT jarray vtkJavaMakeJArrayOfIntFromIdType(JNIEnv *env, vtkIdType *ptr, i return ret; } -#if defined(VTK_TYPE_USE_LONG_LONG) JNIEXPORT jarray vtkJavaMakeJArrayOfIntFromLongLong(JNIEnv *env, long long *ptr, int size) { jintArray ret; @@ -173,7 +172,6 @@ JNIEXPORT jarray vtkJavaMakeJArrayOfIntFromLongLong(JNIEnv *env, long long *ptr, env->ReleaseIntArrayElements(ret,array,0); return ret; } -#endif JNIEXPORT jarray vtkJavaMakeJArrayOfIntFromSignedChar(JNIEnv *env, signed char *ptr, int size) { diff --git a/Wrapping/Java/vtkJavaUtil.h b/Wrapping/Java/vtkJavaUtil.h index c6038f307da..c23bffd481f 100644 --- a/Wrapping/Java/vtkJavaUtil.h +++ b/Wrapping/Java/vtkJavaUtil.h @@ -39,9 +39,7 @@ extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfDoubleFromDouble(JNIEnv extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfShortFromShort(JNIEnv *env, short *arr, int size); extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromInt(JNIEnv *env, int *arr, int size); extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromIdType(JNIEnv *env, vtkIdType *arr, int size); -#if defined(VTK_TYPE_USE_LONG_LONG) extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromLongLong(JNIEnv *env, long long *arr, int size); -#endif extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfIntFromSignedChar(JNIEnv *env, signed char *arr, int size); extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfLongFromLong(JNIEnv *env, long *arr, int size); extern VTKWRAPPINGJAVA_EXPORT jarray vtkJavaMakeJArrayOfByteFromUnsignedChar(JNIEnv *env, unsigned char *arr, int size); diff --git a/Wrapping/Python/vtk/util/vtkConstants.py b/Wrapping/Python/vtk/util/vtkConstants.py index 7541a47b2da..b77a0857be2 100644 --- a/Wrapping/Python/vtk/util/vtkConstants.py +++ b/Wrapping/Python/vtk/util/vtkConstants.py @@ -29,7 +29,6 @@ VTK_ID_TYPE =12 VTK_STRING =13 VTK_OPAQUE =14 -# These types are enabled if VTK_TYPE_USE_LONG_LONG is defined. VTK_LONG_LONG =16 VTK_UNSIGNED_LONG_LONG =17 diff --git a/Wrapping/PythonCore/PyVTKObject.cxx b/Wrapping/PythonCore/PyVTKObject.cxx index 7ff47a30a19..9724c5e0a6f 100644 --- a/Wrapping/PythonCore/PyVTKObject.cxx +++ b/Wrapping/PythonCore/PyVTKObject.cxx @@ -356,10 +356,8 @@ static const char *pythonTypeFormat(int t) case VTK_DOUBLE: b = "d"; break; #ifndef VTK_USE_64BIT_IDS case VTK_ID_TYPE: b = "i"; break; -#elif defined(VTK_TYPE_USE_LONG_LONG) || (VTK_SIZEOF_LONG != 8) - case VTK_ID_TYPE: b = "q"; break; #else - case VTK_ID_TYPE: b = "l"; break; + case VTK_ID_TYPE: b = "q"; break; #endif } diff --git a/Wrapping/PythonCore/vtkPythonArgs.cxx b/Wrapping/PythonCore/vtkPythonArgs.cxx index db25fb61291..e4e0c93cd31 100644 --- a/Wrapping/PythonCore/vtkPythonArgs.cxx +++ b/Wrapping/PythonCore/vtkPythonArgs.cxx @@ -473,7 +473,6 @@ bool vtkPythonGetValue(PyObject *o, unsigned int &a) #endif } -#ifdef VTK_TYPE_USE_LONG_LONG inline bool vtkPythonGetValue(PyObject *o, long long &a) { @@ -485,7 +484,6 @@ bool vtkPythonGetValue(PyObject *o, unsigned long long &a) { return vtkPythonGetUnsignedLongLongValue(o, a); } -#endif //-------------------------------------------------------------------- // Method for setting a C++ array from a Python sequence. @@ -818,10 +816,8 @@ VTK_PYTHON_BUILD_TUPLE(int) VTK_PYTHON_BUILD_TUPLE(unsigned int) VTK_PYTHON_BUILD_TUPLE(long) VTK_PYTHON_BUILD_TUPLE(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_BUILD_TUPLE(long long) VTK_PYTHON_BUILD_TUPLE(unsigned long long) -#endif //-------------------------------------------------------------------- // If "self" is a class, get real "self" from arg list @@ -1024,10 +1020,8 @@ VTK_PYTHON_GET_ARG(int) VTK_PYTHON_GET_ARG(unsigned int) VTK_PYTHON_GET_ARG(long) VTK_PYTHON_GET_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_GET_ARG(long long) VTK_PYTHON_GET_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Define all the GetArray methods in the class. @@ -1056,10 +1050,8 @@ VTK_PYTHON_GET_ARRAY_ARG(int) VTK_PYTHON_GET_ARRAY_ARG(unsigned int) VTK_PYTHON_GET_ARRAY_ARG(long) VTK_PYTHON_GET_ARRAY_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_GET_ARRAY_ARG(long long) VTK_PYTHON_GET_ARRAY_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Define all the GetNArray methods in the class. @@ -1088,10 +1080,8 @@ VTK_PYTHON_GET_NARRAY_ARG(int) VTK_PYTHON_GET_NARRAY_ARG(unsigned int) VTK_PYTHON_GET_NARRAY_ARG(long) VTK_PYTHON_GET_NARRAY_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_GET_NARRAY_ARG(long long) VTK_PYTHON_GET_NARRAY_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Define the special function pointer GetValue method @@ -1171,10 +1161,8 @@ VTK_PYTHON_SET_ARG(int) VTK_PYTHON_SET_ARG(unsigned int) VTK_PYTHON_SET_ARG(long) VTK_PYTHON_SET_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_SET_ARG(long long) VTK_PYTHON_SET_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Define all the SetArgValue methods for setting array args @@ -1207,10 +1195,8 @@ VTK_PYTHON_SET_ARRAY_ARG(int) VTK_PYTHON_SET_ARRAY_ARG(unsigned int) VTK_PYTHON_SET_ARRAY_ARG(long) VTK_PYTHON_SET_ARRAY_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_SET_ARRAY_ARG(long long) VTK_PYTHON_SET_ARRAY_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Define all the SetArgValue methods for setting multi-dim array args @@ -1244,10 +1230,8 @@ VTK_PYTHON_SET_NARRAY_ARG(int) VTK_PYTHON_SET_NARRAY_ARG(unsigned int) VTK_PYTHON_SET_NARRAY_ARG(long) VTK_PYTHON_SET_NARRAY_ARG(unsigned long) -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PYTHON_SET_NARRAY_ARG(long long) VTK_PYTHON_SET_NARRAY_ARG(unsigned long long) -#endif //-------------------------------------------------------------------- // Raise an exception about incorrect arg count. diff --git a/Wrapping/PythonCore/vtkPythonArgs.h b/Wrapping/PythonCore/vtkPythonArgs.h index 40e4624ae55..e8eb33174b1 100644 --- a/Wrapping/PythonCore/vtkPythonArgs.h +++ b/Wrapping/PythonCore/vtkPythonArgs.h @@ -256,12 +256,10 @@ public: static bool GetValue(PyObject *o, long &v); bool GetValue(unsigned long &v); static bool GetValue(PyObject *o, unsigned long &v); -#ifdef VTK_TYPE_USE_LONG_LONG bool GetValue(long long &v); static bool GetValue(PyObject *o, long long &v); bool GetValue(unsigned long long &v); static bool GetValue(PyObject *o, unsigned long long &v); -#endif // Description: // Get the next argument as an array. @@ -277,10 +275,8 @@ public: bool GetArray(unsigned int *v, int n); bool GetArray(long *v, int n); bool GetArray(unsigned long *v, int n); -#ifdef VTK_TYPE_USE_LONG_LONG bool GetArray(long long *v, int n); bool GetArray(unsigned long long *v, int n); -#endif // Description: // Get the next argument as a multi-dimensional array. @@ -296,10 +292,8 @@ public: bool GetNArray(unsigned int *v, int ndims, const int *dims); bool GetNArray(long *v, int ndims, const int *dims); bool GetNArray(unsigned long *v, int ndims, const int *dims); -#ifdef VTK_TYPE_USE_LONG_LONG bool GetNArray(long long *v, int ndims, const int *dims); bool GetNArray(unsigned long long *v, int ndims, const int *dims); -#endif // Description: // Set the value of an argument if it is an assignable type. @@ -317,10 +311,8 @@ public: bool SetArgValue(int i, unsigned int v); bool SetArgValue(int i, long v); bool SetArgValue(int i, unsigned long v); -#ifdef VTK_TYPE_USE_LONG_LONG bool SetArgValue(int i, long long v); bool SetArgValue(int i, unsigned long long v); -#endif // Description: // Set the values in an array argument. @@ -336,10 +328,8 @@ public: bool SetArray(int i, const unsigned int *v, int n); bool SetArray(int i, const long *v, int n); bool SetArray(int i, const unsigned long *v, int n); -#ifdef VTK_TYPE_USE_LONG_LONG bool SetArray(int i, const long long *v, int n); bool SetArray(int i, const unsigned long long *v, int n); -#endif // Description: // Set the values in a multi-dimensional array argument. @@ -355,10 +345,8 @@ public: bool SetNArray(int i, const unsigned int *v, int n, const int *d); bool SetNArray(int i, const long *v, int n, const int *d); bool SetNArray(int i, const unsigned long *v, int n, const int *d); -#ifdef VTK_TYPE_USE_LONG_LONG bool SetNArray(int i, const long long *v, int n, const int *d); bool SetNArray(int i, const unsigned long long *v, int n, const int *d); -#endif // Description: // Build a value of None. @@ -410,10 +398,8 @@ public: static PyObject *BuildValue(unsigned int v); static PyObject *BuildValue(long v); static PyObject *BuildValue(unsigned long v); -#ifdef VTK_TYPE_USE_LONG_LONG static PyObject *BuildValue(long long v); static PyObject *BuildValue(unsigned long long v); -#endif // Description: // Build a bytes object (or string). @@ -432,10 +418,8 @@ public: static PyObject *BuildTuple(const unsigned int *v, int n); static PyObject *BuildTuple(const long *v, int n); static PyObject *BuildTuple(const unsigned long *v, int n); -#ifdef VTK_TYPE_USE_LONG_LONG static PyObject *BuildTuple(const long long *v, int n); static PyObject *BuildTuple(const unsigned long long *v, int n); -#endif // Description: // Copy an array. @@ -779,7 +763,6 @@ PyObject *vtkPythonArgs::BuildValue(unsigned long a) return PyLong_FromUnsignedLong(a); } -#if defined(VTK_TYPE_USE_LONG_LONG) inline PyObject *vtkPythonArgs::BuildValue(long long a) { @@ -791,7 +774,6 @@ PyObject *vtkPythonArgs::BuildValue(unsigned long long a) { return PyLong_FromUnsignedLongLong(a); } -#endif inline PyObject *vtkPythonArgs::BuildBytes(const char *a, int n) diff --git a/Wrapping/PythonCore/vtkPythonUtil.cxx b/Wrapping/PythonCore/vtkPythonUtil.cxx index a3286d9d647..7882ee09cda 100644 --- a/Wrapping/PythonCore/vtkPythonUtil.cxx +++ b/Wrapping/PythonCore/vtkPythonUtil.cxx @@ -736,22 +736,13 @@ PyObject *vtkPythonUtil::GetObjectFromObject( char *ptrText = PyBytes_AsString(arg); char typeCheck[1024]; // typeCheck is currently not used -#if defined(VTK_TYPE_USE_LONG_LONG) unsigned long long l; int i = sscanf(ptrText,"_%llx_%s", &l, typeCheck); -#else - unsigned long l; - int i = sscanf(ptrText,"_%lx_%s", &l, typeCheck); -#endif u.l = static_cast<uintptr_t>(l); if (i <= 0) { -#if defined(VTK_TYPE_USE_LONG_LONG) i = sscanf(ptrText,"Addr=0x%llx", &l); -#else - i = sscanf(ptrText,"Addr=0x%lx", &l); -#endif u.l = static_cast<uintptr_t>(l); } if (i <= 0) @@ -972,13 +963,8 @@ char *vtkPythonUtil::ManglePointer(const void *ptr, const char *type) int ndigits = 2*(int)sizeof(void *); union vtkPythonUtilConstPointerUnion u; u.p = ptr; -#if defined(VTK_TYPE_USE_LONG_LONG) sprintf(ptrText, "_%*.*llx_%s", ndigits, ndigits, static_cast<unsigned long long>(u.l), type); -#else - sprintf(ptrText, "_%*.*lx_%s", ndigits, ndigits, - static_cast<unsigned long>(u.l), type); -#endif return ptrText; } @@ -1013,13 +999,8 @@ void *vtkPythonUtil::UnmanglePointer(char *ptrText, int *len, const char *type) // If no null bytes, then do a full check for a swig pointer if (i == 0) { -#if defined(VTK_TYPE_USE_LONG_LONG) unsigned long long l; i = sscanf(text, "_%llx_%s", &l ,typeCheck); -#else - unsigned long l; - i = sscanf(text, "_%lx_%s", &l ,typeCheck); -#endif u.l = static_cast<uintptr_t>(l); if (strcmp(type,typeCheck) == 0) diff --git a/Wrapping/Tools/vtkParse.tab.c b/Wrapping/Tools/vtkParse.tab.c index b9307cbfcb7..9fa75dc6c50 100644 --- a/Wrapping/Tools/vtkParse.tab.c +++ b/Wrapping/Tools/vtkParse.tab.c @@ -11220,11 +11220,7 @@ unsigned int guess_constant_type(const char *valstring) } else { -#if defined(VTK_TYPE_USE_LONG_LONG) return VTK_PARSE_UNSIGNED_LONG_LONG; -#else - return VTK_PARSE_UNSIGNED_LONG; -#endif } } else @@ -11235,11 +11231,7 @@ unsigned int guess_constant_type(const char *valstring) } else { -#if defined(VTK_TYPE_USE_LONG_LONG) return VTK_PARSE_LONG_LONG; -#else - return VTK_PARSE_LONG; -#endif } } } diff --git a/Wrapping/Tools/vtkParse.y b/Wrapping/Tools/vtkParse.y index 6c39801baf5..af5772554b2 100644 --- a/Wrapping/Tools/vtkParse.y +++ b/Wrapping/Tools/vtkParse.y @@ -3822,11 +3822,7 @@ unsigned int guess_constant_type(const char *valstring) } else { -#if defined(VTK_TYPE_USE_LONG_LONG) return VTK_PARSE_UNSIGNED_LONG_LONG; -#else - return VTK_PARSE_UNSIGNED_LONG; -#endif } } else @@ -3837,11 +3833,7 @@ unsigned int guess_constant_type(const char *valstring) } else { -#if defined(VTK_TYPE_USE_LONG_LONG) return VTK_PARSE_LONG_LONG; -#else - return VTK_PARSE_LONG; -#endif } } } diff --git a/Wrapping/Tools/vtkParseExtras.c b/Wrapping/Tools/vtkParseExtras.c index c059e37be42..ac649d037af 100644 --- a/Wrapping/Tools/vtkParseExtras.c +++ b/Wrapping/Tools/vtkParseExtras.c @@ -1772,9 +1772,7 @@ const char **vtkParse_GetTemplateMacroTypes() static const char *types[] = { "char", "signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", "long", "unsigned long", -#ifdef VTK_TYPE_USE_LONG_LONG "long long", "unsigned long long", -#endif "float", "double", NULL }; return types; @@ -1786,9 +1784,7 @@ const char **vtkParse_GetArrayTypes() static const char *types[] = { "char", "signed char", "unsigned char", "short", "unsigned short", "int", "unsigned int", "long", "unsigned long", -#ifdef VTK_TYPE_USE_LONG_LONG "long long", "unsigned long long", -#endif "float", "double", "vtkStdString", "vtkUnicodeString", "vtkVariant", NULL }; diff --git a/Wrapping/Tools/vtkWrapPythonConstant.c b/Wrapping/Tools/vtkWrapPythonConstant.c index a911999f82b..b03e0cfbba1 100644 --- a/Wrapping/Tools/vtkWrapPythonConstant.c +++ b/Wrapping/Tools/vtkWrapPythonConstant.c @@ -16,9 +16,6 @@ #include "vtkWrapPythonConstant.h" #include "vtkWrap.h" -/* for VTK_TYPE_USE_LONG_LONG */ -#include "vtkConfigure.h" - #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -150,7 +147,6 @@ void vtkWrapPython_AddConstantHelper( objcreated = 1; break; -#ifdef VTK_TYPE_USE_LONG_LONG case VTK_PARSE_LONG_LONG: fprintf(fp, "%s%s = PyLong_FromLongLong(%s);\n", @@ -164,7 +160,6 @@ void vtkWrapPython_AddConstantHelper( indent, objvar, valstring); objcreated = 1; break; -#endif case VTK_PARSE_BOOL: fprintf(fp, diff --git a/Wrapping/Tools/vtkWrapPythonMethodDef.c b/Wrapping/Tools/vtkWrapPythonMethodDef.c index 1e9f43e1d55..b2a8552c625 100644 --- a/Wrapping/Tools/vtkWrapPythonMethodDef.c +++ b/Wrapping/Tools/vtkWrapPythonMethodDef.c @@ -453,9 +453,7 @@ static int vtkWrapPython_IsValueWrappable( VTK_PARSE_ID_TYPE, VTK_PARSE_UNSIGNED_ID_TYPE, VTK_PARSE_SSIZE_T, VTK_PARSE_SIZE_T, VTK_PARSE_UNKNOWN, -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PARSE_LONG_LONG, VTK_PARSE_UNSIGNED_LONG_LONG, -#endif VTK_PARSE_OBJECT, VTK_PARSE_QOBJECT, VTK_PARSE_STRING, #ifndef VTK_PYTHON_NO_UNICODE VTK_PARSE_UNICODE_STRING, diff --git a/Wrapping/Tools/vtkWrapTcl.c b/Wrapping/Tools/vtkWrapTcl.c index 42997c8b7ee..53d077bf550 100644 --- a/Wrapping/Tools/vtkWrapTcl.c +++ b/Wrapping/Tools/vtkWrapTcl.c @@ -725,9 +725,7 @@ int checkFunctionSignature(ClassInfo *data) VTK_PARSE_SHORT, VTK_PARSE_UNSIGNED_SHORT, VTK_PARSE_LONG, VTK_PARSE_UNSIGNED_LONG, VTK_PARSE_ID_TYPE, VTK_PARSE_UNSIGNED_ID_TYPE, -#ifdef VTK_TYPE_USE_LONG_LONG VTK_PARSE_LONG_LONG, VTK_PARSE_UNSIGNED_LONG_LONG, -#endif VTK_PARSE_OBJECT, VTK_PARSE_STRING, VTK_PARSE_UNKNOWN, 0 }; -- GitLab