From 022c98718285eeca7690ece036e3d1ac0191cfa3 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 18 Jan 2018 15:27:40 -0500 Subject: [PATCH] Correct warnings and errors found with MSVC2017+CUDA9 --- CMake/VTKmCompilerFlags.cmake | 10 +-- vtkm/Bounds.h | 2 - vtkm/Range.h | 2 - vtkm/VirtualObjectBase.h | 11 +++- vtkm/cont/ArrayHandleConcatenate.h | 1 + .../internal/DeviceAdapterAlgorithmGeneral.h | 10 --- vtkm/exec/AtomicArray.h | 2 + vtkm/exec/internal/ReduceByKeyLookup.h | 1 + vtkm/exec/internal/TaskSingular.h | 2 +- vtkm/exec/serial/internal/TaskTiling.h | 16 ++--- vtkm/rendering/TextRenderer.cxx | 8 +-- vtkm/rendering/raytracing/RayTracer.cxx | 3 +- .../rendering/raytracing/RayTracingTypeDefs.h | 8 +-- .../raytracing/TriangleIntersector.h | 2 + vtkm/worklet/contourtree/FillSupernodes.h | 1 + vtkm/worklet/internal/DispatcherBase.h | 21 ++++++- vtkm/worklet/particleadvection/Particles.h | 3 - vtkm/worklet/wavelets/WaveletTransforms.h | 63 ------------------- 18 files changed, 59 insertions(+), 107 deletions(-) diff --git a/CMake/VTKmCompilerFlags.cmake b/CMake/VTKmCompilerFlags.cmake index 251cee11d..1b421ce80 100644 --- a/CMake/VTKmCompilerFlags.cmake +++ b/CMake/VTKmCompilerFlags.cmake @@ -56,8 +56,8 @@ endif() # Enable large object support so we can have 2^32 addressable sections if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -bigobj") - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=-bigobj") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/bigobj\" -Xcudafe=\"--diag_suppress=1394 --diag_suppress=766 --display_error_number\"") endif() # Setup the include directories that are needed for vtkm @@ -96,14 +96,14 @@ if(VTKM_COMPILER_IS_MSVC) #CMake COMPILE_LANGUAGE doesn't work with MSVC, ans since we want these flags #only for C++ compilation we have to resort to setting CMAKE_CXX_FLAGS :( - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4702 -wd4505") - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"-wd4702 -wd4505\"") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4702 /wd4505") + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/wd4702 /wd4505\"") if(MSVC_VERSION LESS 1900) # In VS2013 the C4127 warning has a bug in the implementation and # generates false positive warnings for lots of template code set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4127") - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"-wd4127\"") + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/wd4127\"") endif() elseif(VTKM_COMPILER_IS_ICC) diff --git a/vtkm/Bounds.h b/vtkm/Bounds.h index 9e8546e68..978fce4ff 100644 --- a/vtkm/Bounds.h +++ b/vtkm/Bounds.h @@ -45,7 +45,6 @@ struct Bounds VTKM_EXEC_CONT Bounds() {} - VTKM_EXEC_CONT Bounds(const Bounds&) = default; VTKM_EXEC_CONT @@ -91,7 +90,6 @@ struct Bounds { } - VTKM_EXEC_CONT vtkm::Bounds& operator=(const vtkm::Bounds& src) = default; /// \b Determine if the bounds are valid (i.e. has at least one valid point). diff --git a/vtkm/Range.h b/vtkm/Range.h index 07c22dd0a..e3428f4d1 100644 --- a/vtkm/Range.h +++ b/vtkm/Range.h @@ -49,7 +49,6 @@ struct Range { } - VTKM_EXEC_CONT Range(const Range&) = default; template @@ -59,7 +58,6 @@ struct Range { } - VTKM_EXEC_CONT vtkm::Range& operator=(const vtkm::Range& src) = default; /// \b Determine if the range is valid (i.e. has at least one valid point). diff --git a/vtkm/VirtualObjectBase.h b/vtkm/VirtualObjectBase.h index e1e94fe72..8fa60c032 100644 --- a/vtkm/VirtualObjectBase.h +++ b/vtkm/VirtualObjectBase.h @@ -42,7 +42,10 @@ namespace vtkm class VTKM_ALWAYS_EXPORT VirtualObjectBase { public: - VTKM_EXEC_CONT virtual ~VirtualObjectBase() = default; + VTKM_EXEC_CONT virtual ~VirtualObjectBase(){ + //we implement this as we need a destructor with cuda markup + //but using =default causes warnings with CUDA 9 + }; VTKM_EXEC_CONT void Modified() { this->ModifiedCount++; } @@ -54,7 +57,11 @@ protected: { } - VTKM_EXEC_CONT VirtualObjectBase(const VirtualObjectBase&) = default; + VTKM_EXEC_CONT VirtualObjectBase(const VirtualObjectBase& other) + { //we implement this as we need a copy constructor with cuda markup + //but using =default causes warnings with CUDA 9 + this->ModifiedCount = other.ModifiedCount; + } VTKM_EXEC_CONT VirtualObjectBase(VirtualObjectBase&& other) : ModifiedCount(other.ModifiedCount) diff --git a/vtkm/cont/ArrayHandleConcatenate.h b/vtkm/cont/ArrayHandleConcatenate.h index 16ad249dc..c9aa4c42d 100644 --- a/vtkm/cont/ArrayHandleConcatenate.h +++ b/vtkm/cont/ArrayHandleConcatenate.h @@ -37,6 +37,7 @@ class VTKM_ALWAYS_EXPORT ArrayPortalConcatenate public: using ValueType = typename PortalType1::ValueType; + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT ArrayPortalConcatenate() : portal1() diff --git a/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h b/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h index c459b8503..baa61e183 100644 --- a/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h +++ b/vtkm/cont/internal/DeviceAdapterAlgorithmGeneral.h @@ -870,7 +870,6 @@ public: { } - VTKM_EXEC T Add(vtkm::Id index, const T& value) const { T* lockedValue; @@ -886,7 +885,6 @@ public: #endif } - VTKM_EXEC T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const { T* lockedValue; @@ -910,19 +908,16 @@ private: IteratorsType Iterators; #if defined(VTKM_MSVC) //MSVC atomics - VTKM_EXEC vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { return InterlockedExchangeAdd(reinterpret_cast(address), value); } - VTKM_EXEC vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { return InterlockedExchangeAdd64(reinterpret_cast(address), value); } - VTKM_EXEC vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, const vtkm::Int32& newValue, const vtkm::Int32& oldValue) const @@ -931,7 +926,6 @@ private: reinterpret_cast(address), newValue, oldValue); } - VTKM_EXEC vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, const vtkm::Int64& newValue, const vtkm::Int64& oldValue) const @@ -942,19 +936,16 @@ private: #else //gcc built-in atomics - VTKM_EXEC vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const { return __sync_fetch_and_add(address, value); } - VTKM_EXEC vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const { return __sync_fetch_and_add(address, value); } - VTKM_EXEC vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, const vtkm::Int32& newValue, const vtkm::Int32& oldValue) const @@ -962,7 +953,6 @@ private: return __sync_val_compare_and_swap(address, oldValue, newValue); } - VTKM_EXEC vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, const vtkm::Int64& newValue, const vtkm::Int64& oldValue) const diff --git a/vtkm/exec/AtomicArray.h b/vtkm/exec/AtomicArray.h index f00f889cc..e0a7d01f3 100644 --- a/vtkm/exec/AtomicArray.h +++ b/vtkm/exec/AtomicArray.h @@ -68,6 +68,7 @@ public: { } + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC T Add(vtkm::Id index, const T& value) const { @@ -79,6 +80,7 @@ public: // the index is equal to oldValue, then newValue is written to the index. // The operation was successful if return value is equal to oldValue // + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const { diff --git a/vtkm/exec/internal/ReduceByKeyLookup.h b/vtkm/exec/internal/ReduceByKeyLookup.h index 98636b2f7..472d67089 100644 --- a/vtkm/exec/internal/ReduceByKeyLookup.h +++ b/vtkm/exec/internal/ReduceByKeyLookup.h @@ -66,6 +66,7 @@ struct ReduceByKeyLookup : vtkm::exec::ExecutionObjectBase { } + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT ReduceByKeyLookup() {} }; diff --git a/vtkm/exec/internal/TaskSingular.h b/vtkm/exec/internal/TaskSingular.h index 39cd6e28c..5bcda3207 100644 --- a/vtkm/exec/internal/TaskSingular.h +++ b/vtkm/exec/internal/TaskSingular.h @@ -48,7 +48,7 @@ public: VTKM_CONT TaskSingular(const WorkletType& worklet, const InvocationType& invocation, - const vtkm::Id& globalIndexOffset = 0) + vtkm::Id globalIndexOffset = 0) : Worklet(worklet) , Invocation(invocation) , GlobalIndexOffset(globalIndexOffset) diff --git a/vtkm/exec/serial/internal/TaskTiling.h b/vtkm/exec/serial/internal/TaskTiling.h index c8ffab6d3..b170fb61c 100644 --- a/vtkm/exec/serial/internal/TaskTiling.h +++ b/vtkm/exec/serial/internal/TaskTiling.h @@ -172,9 +172,7 @@ public: /// This constructor supports any vtkm worklet and the associated invocation /// parameters that go along with it template - TaskTiling1D(WorkletType& worklet, - InvocationType& invocation, - const vtkm::Id& globalIndexOffset = 0) + TaskTiling1D(WorkletType& worklet, InvocationType& invocation, vtkm::Id globalIndexOffset) : Worklet(nullptr) , Invocation(nullptr) , ExecuteFunction(nullptr) @@ -193,7 +191,7 @@ public: /// explicit Copy constructor. /// Note this required so that compilers don't use the templated constructor /// as the copy constructor which will cause compile issues - TaskTiling1D(const TaskTiling1D& task) + TaskTiling1D(TaskTiling1D& task) : Worklet(task.Worklet) , Invocation(task.Invocation) , ExecuteFunction(task.ExecuteFunction) @@ -202,6 +200,8 @@ public: { } + TaskTiling1D(TaskTiling1D&& task) = default; + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) { this->SetErrorBufferFunction(this->Worklet, buffer); @@ -262,9 +262,7 @@ public: } template - TaskTiling3D(WorkletType& worklet, - InvocationType& invocation, - const vtkm::Id& globalIndexOffset = 0) + TaskTiling3D(WorkletType& worklet, InvocationType& invocation, vtkm::Id globalIndexOffset = 0) : Worklet(nullptr) , Invocation(nullptr) , ExecuteFunction(nullptr) @@ -283,7 +281,7 @@ public: /// explicit Copy constructor. /// Note this required so that compilers don't use the templated constructor /// as the copy constructor which will cause compile issues - TaskTiling3D(const TaskTiling3D& task) + TaskTiling3D(TaskTiling3D& task) : Worklet(task.Worklet) , Invocation(task.Invocation) , ExecuteFunction(task.ExecuteFunction) @@ -292,6 +290,8 @@ public: { } + TaskTiling3D(TaskTiling3D&& task) = default; + void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) { this->SetErrorBufferFunction(this->Worklet, buffer); diff --git a/vtkm/rendering/TextRenderer.cxx b/vtkm/rendering/TextRenderer.cxx index 67c7c7f50..7033392dc 100644 --- a/vtkm/rendering/TextRenderer.cxx +++ b/vtkm/rendering/TextRenderer.cxx @@ -81,10 +81,10 @@ struct RenderBitmapFont : public vtkm::worklet::WorkletMapField } template - void Plot(vtkm::Float32 x, - vtkm::Float32 y, - vtkm::Float32 intensity, - ColorBufferPortal& colorBuffer) const + VTKM_EXEC void Plot(vtkm::Float32 x, + vtkm::Float32 y, + vtkm::Float32 intensity, + ColorBufferPortal& colorBuffer) const { vtkm::Id index = static_cast(vtkm::Round(y)) * Width + static_cast(vtkm::Round(x)); diff --git a/vtkm/rendering/raytracing/RayTracer.cxx b/vtkm/rendering/raytracing/RayTracer.cxx index 42beeaf95..b96c6faa7 100644 --- a/vtkm/rendering/raytracing/RayTracer.cxx +++ b/vtkm/rendering/raytracing/RayTracer.cxx @@ -346,7 +346,8 @@ public: vtkm::Vec reflect = 2.f * vtkm::dot(lightDir, normal) * normal - lightDir; vtkm::Normalize(reflect); Precision cosPhi = vtkm::dot(reflect, viewDir); - Precision specularConstant = Precision(pow(vtkm::Max(cosPhi, zero), SpecularExponent)); + Precision specularConstant = + Precision(pow(vtkm::Max(cosPhi, zero), (Precision)SpecularExponent)); vtkm::Int32 colorIdx = vtkm::Int32(scalar * Precision(ColorMapSize - 1)); //Just in case clamp the value to the valid range diff --git a/vtkm/rendering/raytracing/RayTracingTypeDefs.h b/vtkm/rendering/raytracing/RayTracingTypeDefs.h index 14727da8b..0344ab54a 100644 --- a/vtkm/rendering/raytracing/RayTracingTypeDefs.h +++ b/vtkm/rendering/raytracing/RayTracingTypeDefs.h @@ -45,10 +45,10 @@ namespace rendering #endif template -inline void BoundsCheck(const ArrayHandleType& handle, - const vtkm::Id& index, - const char* file, - int line) +VTKM_EXEC inline void BoundsCheck(const ArrayHandleType& handle, + const vtkm::Id& index, + const char* file, + int line) { if (index < 0 || index >= handle.GetNumberOfValues()) printf("Bad Index %d at file %s line %d\n", (int)index, file, line); diff --git a/vtkm/rendering/raytracing/TriangleIntersector.h b/vtkm/rendering/raytracing/TriangleIntersector.h index d5b2e7ca4..c22e7404b 100644 --- a/vtkm/rendering/raytracing/TriangleIntersector.h +++ b/vtkm/rendering/raytracing/TriangleIntersector.h @@ -726,6 +726,7 @@ public: { return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); } + VTKM_EXEC inline vtkm::Float64 rcp(vtkm::Float64 f) const { return 1.0 / f; } VTKM_EXEC inline vtkm::Float64 rcp_safe(vtkm::Float64 f) const @@ -884,6 +885,7 @@ public: { return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); } + VTKM_EXEC inline vtkm::Float32 rcp_safe(vtkm::Float32 f) const { return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); diff --git a/vtkm/worklet/contourtree/FillSupernodes.h b/vtkm/worklet/contourtree/FillSupernodes.h index dc6cc6947..d87d79bad 100644 --- a/vtkm/worklet/contourtree/FillSupernodes.h +++ b/vtkm/worklet/contourtree/FillSupernodes.h @@ -90,6 +90,7 @@ public: VTKM_EXEC_CONT FillSupernodes() {} + VTKM_EXEC vtkm::Id operator()(const vtkm::Id& upCandidate, const vtkm::Id& downCandidate) const { vtkm::Id isSupernode = ((upCandidate != 1) || (downCandidate != 1)); diff --git a/vtkm/worklet/internal/DispatcherBase.h b/vtkm/worklet/internal/DispatcherBase.h index 6c2f7ff4e..7c7ffb885 100644 --- a/vtkm/worklet/internal/DispatcherBase.h +++ b/vtkm/worklet/internal/DispatcherBase.h @@ -438,22 +438,39 @@ private: static_assert(isAllValid::value == expectedLen::value, "All arguments failed the TypeCheck pass"); -#if defined __NVCC__ +#if defined(__CUDACC__) // Disable warning "calling a __host__ function from a __host__ __device__" // In some cases nv_exec_check_disable doesn't work and therefore you need // to use the following suppressions // This have been found by eigen: // https://github.com/RLovelett/eigen/blame/master/Eigen/src/Core/util/DisableStupidWarnings.h // To discover new dia_supress values use -Xcudafe "--display_error_number" +#if defined(VTKM_MSVC) +#pragma warning(push) +#pragma warning(disable : 4068) //unknown pragma +#endif + #pragma push #pragma diag_suppress 2737 #pragma diag_suppress 2739 #pragma diag_suppress 2828 + +#if defined(VTKM_MSVC) +#pragma warning(pop) +#endif + #endif auto fi = vtkm::internal::make_FunctionInterface::type...>(args...); -#if defined __NVCC__ +#if defined __CUDACC__ +#if defined(VTKM_MSVC) +#pragma warning(push) +#pragma warning(disable : 4068) //unknown pragma +#endif #pragma pop +#if defined(VTKM_MSVC) +#pragma warning(pop) +#endif #endif auto ivc = vtkm::internal::Invocation>& posArray, vtkm::cont::ArrayHandle& stepsArray, vtkm::cont::ArrayHandle& statusArray, @@ -248,7 +247,6 @@ public: { } - VTKM_EXEC_CONT StateRecordingParticles(vtkm::cont::ArrayHandle>& posArray, vtkm::cont::ArrayHandle>& historyArray, vtkm::cont::ArrayHandle& stepsArray, @@ -266,7 +264,6 @@ public: History = historyArray.PrepareForOutput(NumPos * HistSize, DeviceAdapterTag()); } - VTKM_EXEC_CONT StateRecordingParticles(vtkm::cont::ArrayHandle>& posArray, vtkm::cont::ArrayHandle>& historyArray, vtkm::cont::ArrayHandle& stepsArray, diff --git a/vtkm/worklet/wavelets/WaveletTransforms.h b/vtkm/worklet/wavelets/WaveletTransforms.h index 587166fa5..bf2da4adb 100644 --- a/vtkm/worklet/wavelets/WaveletTransforms.h +++ b/vtkm/worklet/wavelets/WaveletTransforms.h @@ -226,7 +226,6 @@ public: else { sigPretendX = sigPretendY = sigPretendZ = 0; // so the compiler doesn't complain - vtkm::cont::ErrorInternal("Invalid extension mode for cubes!"); } if (sigPretendX == sigPretendDimX || // decides to pad a zero @@ -329,10 +328,6 @@ public: cube = 3; idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -407,10 +402,6 @@ public: cube = 3; idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -483,10 +474,6 @@ public: cube = 3; idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -614,10 +601,6 @@ public: cube = 4; // ext4 idx = inZ * dimX4 * dimY4 + inY * dimX4 + inX_local; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -734,10 +717,6 @@ public: cube = 4; // ext4 idx = inZ * dimX4 * dimY4 + inY_local * dimX4 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -851,10 +830,6 @@ public: cube = 4; // ext4 idx = inZ_local * dimX4 * dimY4 + inY * dimX4 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } private: @@ -878,7 +853,6 @@ public: typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef _4 InputDomain; - VTKM_EXEC_CONT ForwardTransform3DLeftRight(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filter_len, @@ -963,7 +937,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid cube index!"); return -1; } } @@ -1034,7 +1007,6 @@ public: typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef _4 InputDomain; - VTKM_EXEC_CONT ForwardTransform3DTopDown(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filter_len, @@ -1119,7 +1091,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid cube index!"); return -1; } } @@ -1190,7 +1161,6 @@ public: typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef _4 InputDomain; - VTKM_EXEC_CONT ForwardTransform3DFrontBack(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filter_len, @@ -1275,7 +1245,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid cube index!"); return -1; } } @@ -1362,7 +1331,6 @@ public: typedef _6 InputDomain; // Constructor - VTKM_EXEC_CONT InverseTransform3DLeftRight(const vtkm::cont::ArrayHandle& lo_fil, const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, @@ -1470,7 +1438,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); return -1; } } @@ -1596,7 +1563,6 @@ public: typedef _6 InputDomain; // Constructor - VTKM_EXEC_CONT InverseTransform3DTopDown(const vtkm::cont::ArrayHandle& lo_fil, const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, @@ -1704,7 +1670,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); return -1; } } @@ -1830,7 +1795,6 @@ public: typedef _6 InputDomain; // Constructor - VTKM_EXEC_CONT InverseTransform3DFrontBack(const vtkm::cont::ArrayHandle& lo_fil, const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, @@ -1940,7 +1904,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); return -1; } } @@ -2156,10 +2119,6 @@ public: mat = 4; // ext4 idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd); } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } else // top-down mode { @@ -2193,10 +2152,6 @@ public: mat = 4; // ext4 idx = (inY - y1 - ya - y2 - y3 - yd) * x4 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } } @@ -2268,10 +2223,6 @@ public: mat = 3; idx = inY * dimX3 + (inX - dimX1 - pretendDimX2); } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } else // top-down mode { @@ -2290,10 +2241,6 @@ public: mat = 3; idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX; } - else - { - vtkm::cont::ErrorInternal("Invalid index!"); - } } } @@ -2430,10 +2377,6 @@ public: sigPretendY++; } } - else - { - vtkm::cont::ErrorInternal("Invalid extension mode for matrices!"); - } if (sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY) { @@ -2466,7 +2409,6 @@ public: typedef _4 InputDomain; // Constructor - VTKM_EXEC_CONT ForwardTransform2D(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filter_len, @@ -2529,7 +2471,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); return -1; } } @@ -2657,7 +2598,6 @@ public: typedef _6 InputDomain; // Constructor - VTKM_EXEC_CONT InverseTransform2D(const vtkm::cont::ArrayHandle& lo_fil, const vtkm::cont::ArrayHandle& hi_fil, vtkm::Id fil_len, @@ -2759,7 +2699,6 @@ public: } else { - vtkm::cont::ErrorInternal("Invalid matrix index!"); return -1; } } @@ -2963,7 +2902,6 @@ public: typedef _1 InputDomain; // Constructor - VTKM_EXEC_CONT ForwardTransform(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filLen, @@ -3130,7 +3068,6 @@ public: typedef _1 InputDomain; // Constructor - VTKM_EXEC_CONT InverseTransformEven(const vtkm::cont::ArrayHandle& loFilter, const vtkm::cont::ArrayHandle& hiFilter, vtkm::Id filtL,