Correct warnings and errors found with MSVC2017+CUDA9

This commit is contained in:
Robert Maynard 2018-01-18 15:27:40 -05:00
parent 668b30864e
commit 022c987182
18 changed files with 59 additions and 107 deletions

@ -56,8 +56,8 @@ endif()
# Enable large object support so we can have 2^32 addressable sections # Enable large object support so we can have 2^32 addressable sections
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -bigobj") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=-bigobj") set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/bigobj\" -Xcudafe=\"--diag_suppress=1394 --diag_suppress=766 --display_error_number\"")
endif() endif()
# Setup the include directories that are needed for vtkm # 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 #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 :( #only for C++ compilation we have to resort to setting CMAKE_CXX_FLAGS :(
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4702 -wd4505") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4702 /wd4505")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"-wd4702 -wd4505\"") set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xcompiler=\"/wd4702 /wd4505\"")
if(MSVC_VERSION LESS 1900) if(MSVC_VERSION LESS 1900)
# In VS2013 the C4127 warning has a bug in the implementation and # In VS2013 the C4127 warning has a bug in the implementation and
# generates false positive warnings for lots of template code # generates false positive warnings for lots of template code
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -wd4127") 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() endif()
elseif(VTKM_COMPILER_IS_ICC) elseif(VTKM_COMPILER_IS_ICC)

@ -45,7 +45,6 @@ struct Bounds
VTKM_EXEC_CONT VTKM_EXEC_CONT
Bounds() {} Bounds() {}
VTKM_EXEC_CONT
Bounds(const Bounds&) = default; Bounds(const Bounds&) = default;
VTKM_EXEC_CONT VTKM_EXEC_CONT
@ -91,7 +90,6 @@ struct Bounds
{ {
} }
VTKM_EXEC_CONT
vtkm::Bounds& operator=(const vtkm::Bounds& src) = default; vtkm::Bounds& operator=(const vtkm::Bounds& src) = default;
/// \b Determine if the bounds are valid (i.e. has at least one valid point). /// \b Determine if the bounds are valid (i.e. has at least one valid point).

@ -49,7 +49,6 @@ struct Range
{ {
} }
VTKM_EXEC_CONT
Range(const Range&) = default; Range(const Range&) = default;
template <typename T1, typename T2> template <typename T1, typename T2>
@ -59,7 +58,6 @@ struct Range
{ {
} }
VTKM_EXEC_CONT
vtkm::Range& operator=(const vtkm::Range& src) = default; vtkm::Range& operator=(const vtkm::Range& src) = default;
/// \b Determine if the range is valid (i.e. has at least one valid point). /// \b Determine if the range is valid (i.e. has at least one valid point).

@ -42,7 +42,10 @@ namespace vtkm
class VTKM_ALWAYS_EXPORT VirtualObjectBase class VTKM_ALWAYS_EXPORT VirtualObjectBase
{ {
public: 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++; } 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) VTKM_EXEC_CONT VirtualObjectBase(VirtualObjectBase&& other)
: ModifiedCount(other.ModifiedCount) : ModifiedCount(other.ModifiedCount)

@ -37,6 +37,7 @@ class VTKM_ALWAYS_EXPORT ArrayPortalConcatenate
public: public:
using ValueType = typename PortalType1::ValueType; using ValueType = typename PortalType1::ValueType;
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT VTKM_EXEC_CONT
ArrayPortalConcatenate() ArrayPortalConcatenate()
: portal1() : portal1()

@ -870,7 +870,6 @@ public:
{ {
} }
VTKM_EXEC
T Add(vtkm::Id index, const T& value) const T Add(vtkm::Id index, const T& value) const
{ {
T* lockedValue; T* lockedValue;
@ -886,7 +885,6 @@ public:
#endif #endif
} }
VTKM_EXEC
T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const
{ {
T* lockedValue; T* lockedValue;
@ -910,19 +908,16 @@ private:
IteratorsType Iterators; IteratorsType Iterators;
#if defined(VTKM_MSVC) //MSVC atomics #if defined(VTKM_MSVC) //MSVC atomics
VTKM_EXEC
vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const
{ {
return InterlockedExchangeAdd(reinterpret_cast<volatile long*>(address), value); return InterlockedExchangeAdd(reinterpret_cast<volatile long*>(address), value);
} }
VTKM_EXEC
vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const
{ {
return InterlockedExchangeAdd64(reinterpret_cast<volatile long long*>(address), value); return InterlockedExchangeAdd64(reinterpret_cast<volatile long long*>(address), value);
} }
VTKM_EXEC
vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address,
const vtkm::Int32& newValue, const vtkm::Int32& newValue,
const vtkm::Int32& oldValue) const const vtkm::Int32& oldValue) const
@ -931,7 +926,6 @@ private:
reinterpret_cast<volatile long*>(address), newValue, oldValue); reinterpret_cast<volatile long*>(address), newValue, oldValue);
} }
VTKM_EXEC
vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address,
const vtkm::Int64& newValue, const vtkm::Int64& newValue,
const vtkm::Int64& oldValue) const const vtkm::Int64& oldValue) const
@ -942,19 +936,16 @@ private:
#else //gcc built-in atomics #else //gcc built-in atomics
VTKM_EXEC
vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const vtkm::Int32 vtkmAtomicAdd(vtkm::Int32* address, const vtkm::Int32& value) const
{ {
return __sync_fetch_and_add(address, value); return __sync_fetch_and_add(address, value);
} }
VTKM_EXEC
vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const vtkm::Int64 vtkmAtomicAdd(vtkm::Int64* address, const vtkm::Int64& value) const
{ {
return __sync_fetch_and_add(address, value); return __sync_fetch_and_add(address, value);
} }
VTKM_EXEC
vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address, vtkm::Int32 vtkmCompareAndSwap(vtkm::Int32* address,
const vtkm::Int32& newValue, const vtkm::Int32& newValue,
const vtkm::Int32& oldValue) const const vtkm::Int32& oldValue) const
@ -962,7 +953,6 @@ private:
return __sync_val_compare_and_swap(address, oldValue, newValue); return __sync_val_compare_and_swap(address, oldValue, newValue);
} }
VTKM_EXEC
vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address, vtkm::Int64 vtkmCompareAndSwap(vtkm::Int64* address,
const vtkm::Int64& newValue, const vtkm::Int64& newValue,
const vtkm::Int64& oldValue) const const vtkm::Int64& oldValue) const

@ -68,6 +68,7 @@ public:
{ {
} }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC VTKM_EXEC
T Add(vtkm::Id index, const T& value) const 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 index is equal to oldValue, then newValue is written to the index.
// The operation was successful if return value is equal to oldValue // The operation was successful if return value is equal to oldValue
// //
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC VTKM_EXEC
T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const T CompareAndSwap(vtkm::Id index, const T& newValue, const T& oldValue) const
{ {

@ -66,6 +66,7 @@ struct ReduceByKeyLookup : vtkm::exec::ExecutionObjectBase
{ {
} }
VTKM_SUPPRESS_EXEC_WARNINGS
VTKM_EXEC_CONT VTKM_EXEC_CONT
ReduceByKeyLookup() {} ReduceByKeyLookup() {}
}; };

@ -48,7 +48,7 @@ public:
VTKM_CONT VTKM_CONT
TaskSingular(const WorkletType& worklet, TaskSingular(const WorkletType& worklet,
const InvocationType& invocation, const InvocationType& invocation,
const vtkm::Id& globalIndexOffset = 0) vtkm::Id globalIndexOffset = 0)
: Worklet(worklet) : Worklet(worklet)
, Invocation(invocation) , Invocation(invocation)
, GlobalIndexOffset(globalIndexOffset) , GlobalIndexOffset(globalIndexOffset)

@ -172,9 +172,7 @@ public:
/// This constructor supports any vtkm worklet and the associated invocation /// This constructor supports any vtkm worklet and the associated invocation
/// parameters that go along with it /// parameters that go along with it
template <typename WorkletType, typename InvocationType> template <typename WorkletType, typename InvocationType>
TaskTiling1D(WorkletType& worklet, TaskTiling1D(WorkletType& worklet, InvocationType& invocation, vtkm::Id globalIndexOffset)
InvocationType& invocation,
const vtkm::Id& globalIndexOffset = 0)
: Worklet(nullptr) : Worklet(nullptr)
, Invocation(nullptr) , Invocation(nullptr)
, ExecuteFunction(nullptr) , ExecuteFunction(nullptr)
@ -193,7 +191,7 @@ public:
/// explicit Copy constructor. /// explicit Copy constructor.
/// Note this required so that compilers don't use the templated constructor /// Note this required so that compilers don't use the templated constructor
/// as the copy constructor which will cause compile issues /// as the copy constructor which will cause compile issues
TaskTiling1D(const TaskTiling1D& task) TaskTiling1D(TaskTiling1D& task)
: Worklet(task.Worklet) : Worklet(task.Worklet)
, Invocation(task.Invocation) , Invocation(task.Invocation)
, ExecuteFunction(task.ExecuteFunction) , ExecuteFunction(task.ExecuteFunction)
@ -202,6 +200,8 @@ public:
{ {
} }
TaskTiling1D(TaskTiling1D&& task) = default;
void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer)
{ {
this->SetErrorBufferFunction(this->Worklet, buffer); this->SetErrorBufferFunction(this->Worklet, buffer);
@ -262,9 +262,7 @@ public:
} }
template <typename WorkletType, typename InvocationType> template <typename WorkletType, typename InvocationType>
TaskTiling3D(WorkletType& worklet, TaskTiling3D(WorkletType& worklet, InvocationType& invocation, vtkm::Id globalIndexOffset = 0)
InvocationType& invocation,
const vtkm::Id& globalIndexOffset = 0)
: Worklet(nullptr) : Worklet(nullptr)
, Invocation(nullptr) , Invocation(nullptr)
, ExecuteFunction(nullptr) , ExecuteFunction(nullptr)
@ -283,7 +281,7 @@ public:
/// explicit Copy constructor. /// explicit Copy constructor.
/// Note this required so that compilers don't use the templated constructor /// Note this required so that compilers don't use the templated constructor
/// as the copy constructor which will cause compile issues /// as the copy constructor which will cause compile issues
TaskTiling3D(const TaskTiling3D& task) TaskTiling3D(TaskTiling3D& task)
: Worklet(task.Worklet) : Worklet(task.Worklet)
, Invocation(task.Invocation) , Invocation(task.Invocation)
, ExecuteFunction(task.ExecuteFunction) , ExecuteFunction(task.ExecuteFunction)
@ -292,6 +290,8 @@ public:
{ {
} }
TaskTiling3D(TaskTiling3D&& task) = default;
void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer) void SetErrorMessageBuffer(const vtkm::exec::internal::ErrorMessageBuffer& buffer)
{ {
this->SetErrorBufferFunction(this->Worklet, buffer); this->SetErrorBufferFunction(this->Worklet, buffer);

@ -81,10 +81,10 @@ struct RenderBitmapFont : public vtkm::worklet::WorkletMapField
} }
template <typename ColorBufferPortal> template <typename ColorBufferPortal>
void Plot(vtkm::Float32 x, VTKM_EXEC void Plot(vtkm::Float32 x,
vtkm::Float32 y, vtkm::Float32 y,
vtkm::Float32 intensity, vtkm::Float32 intensity,
ColorBufferPortal& colorBuffer) const ColorBufferPortal& colorBuffer) const
{ {
vtkm::Id index = vtkm::Id index =
static_cast<vtkm::Id>(vtkm::Round(y)) * Width + static_cast<vtkm::Id>(vtkm::Round(x)); static_cast<vtkm::Id>(vtkm::Round(y)) * Width + static_cast<vtkm::Id>(vtkm::Round(x));

@ -346,7 +346,8 @@ public:
vtkm::Vec<Precision, 3> reflect = 2.f * vtkm::dot(lightDir, normal) * normal - lightDir; vtkm::Vec<Precision, 3> reflect = 2.f * vtkm::dot(lightDir, normal) * normal - lightDir;
vtkm::Normalize(reflect); vtkm::Normalize(reflect);
Precision cosPhi = vtkm::dot(reflect, viewDir); 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)); vtkm::Int32 colorIdx = vtkm::Int32(scalar * Precision(ColorMapSize - 1));
//Just in case clamp the value to the valid range //Just in case clamp the value to the valid range

@ -45,10 +45,10 @@ namespace rendering
#endif #endif
template <typename ArrayHandleType> template <typename ArrayHandleType>
inline void BoundsCheck(const ArrayHandleType& handle, VTKM_EXEC inline void BoundsCheck(const ArrayHandleType& handle,
const vtkm::Id& index, const vtkm::Id& index,
const char* file, const char* file,
int line) int line)
{ {
if (index < 0 || index >= handle.GetNumberOfValues()) if (index < 0 || index >= handle.GetNumberOfValues())
printf("Bad Index %d at file %s line %d\n", (int)index, file, line); printf("Bad Index %d at file %s line %d\n", (int)index, file, line);

@ -726,6 +726,7 @@ public:
{ {
return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); return rcp((fabs(f) < 1e-8f) ? 1e-8f : f);
} }
VTKM_EXEC
inline vtkm::Float64 rcp(vtkm::Float64 f) const { return 1.0 / f; } inline vtkm::Float64 rcp(vtkm::Float64 f) const { return 1.0 / f; }
VTKM_EXEC VTKM_EXEC
inline vtkm::Float64 rcp_safe(vtkm::Float64 f) const inline vtkm::Float64 rcp_safe(vtkm::Float64 f) const
@ -884,6 +885,7 @@ public:
{ {
return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); return rcp((fabs(f) < 1e-8f) ? 1e-8f : f);
} }
VTKM_EXEC
inline vtkm::Float32 rcp_safe(vtkm::Float32 f) const inline vtkm::Float32 rcp_safe(vtkm::Float32 f) const
{ {
return rcp((fabs(f) < 1e-8f) ? 1e-8f : f); return rcp((fabs(f) < 1e-8f) ? 1e-8f : f);

@ -90,6 +90,7 @@ public:
VTKM_EXEC_CONT VTKM_EXEC_CONT
FillSupernodes() {} FillSupernodes() {}
VTKM_EXEC
vtkm::Id operator()(const vtkm::Id& upCandidate, const vtkm::Id& downCandidate) const vtkm::Id operator()(const vtkm::Id& upCandidate, const vtkm::Id& downCandidate) const
{ {
vtkm::Id isSupernode = ((upCandidate != 1) || (downCandidate != 1)); vtkm::Id isSupernode = ((upCandidate != 1) || (downCandidate != 1));

@ -438,22 +438,39 @@ private:
static_assert(isAllValid::value == expectedLen::value, static_assert(isAllValid::value == expectedLen::value,
"All arguments failed the TypeCheck pass"); "All arguments failed the TypeCheck pass");
#if defined __NVCC__ #if defined(__CUDACC__)
// Disable warning "calling a __host__ function from a __host__ __device__" // Disable warning "calling a __host__ function from a __host__ __device__"
// In some cases nv_exec_check_disable doesn't work and therefore you need // In some cases nv_exec_check_disable doesn't work and therefore you need
// to use the following suppressions // to use the following suppressions
// This have been found by eigen: // This have been found by eigen:
// https://github.com/RLovelett/eigen/blame/master/Eigen/src/Core/util/DisableStupidWarnings.h // https://github.com/RLovelett/eigen/blame/master/Eigen/src/Core/util/DisableStupidWarnings.h
// To discover new dia_supress values use -Xcudafe "--display_error_number" // 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 push
#pragma diag_suppress 2737 #pragma diag_suppress 2737
#pragma diag_suppress 2739 #pragma diag_suppress 2739
#pragma diag_suppress 2828 #pragma diag_suppress 2828
#if defined(VTKM_MSVC)
#pragma warning(pop)
#endif
#endif #endif
auto fi = auto fi =
vtkm::internal::make_FunctionInterface<void, typename std::decay<Args>::type...>(args...); vtkm::internal::make_FunctionInterface<void, typename std::decay<Args>::type...>(args...);
#if defined __NVCC__ #if defined __CUDACC__
#if defined(VTKM_MSVC)
#pragma warning(push)
#pragma warning(disable : 4068) //unknown pragma
#endif
#pragma pop #pragma pop
#if defined(VTKM_MSVC)
#pragma warning(pop)
#endif
#endif #endif
auto ivc = vtkm::internal::Invocation<ParameterInterface, auto ivc = vtkm::internal::Invocation<ParameterInterface,

@ -85,7 +85,6 @@ public:
{ {
} }
VTKM_EXEC_CONT
Particles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray, Particles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray,
vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray, vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray,
vtkm::cont::ArrayHandle<vtkm::Id>& statusArray, vtkm::cont::ArrayHandle<vtkm::Id>& statusArray,
@ -248,7 +247,6 @@ public:
{ {
} }
VTKM_EXEC_CONT
StateRecordingParticles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray, StateRecordingParticles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray,
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& historyArray, vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& historyArray,
vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray, vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray,
@ -266,7 +264,6 @@ public:
History = historyArray.PrepareForOutput(NumPos * HistSize, DeviceAdapterTag()); History = historyArray.PrepareForOutput(NumPos * HistSize, DeviceAdapterTag());
} }
VTKM_EXEC_CONT
StateRecordingParticles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray, StateRecordingParticles(vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& posArray,
vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& historyArray, vtkm::cont::ArrayHandle<vtkm::Vec<T, 3>>& historyArray,
vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray, vtkm::cont::ArrayHandle<vtkm::Id>& stepsArray,

@ -226,7 +226,6 @@ public:
else else
{ {
sigPretendX = sigPretendY = sigPretendZ = 0; // so the compiler doesn't complain 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 if (sigPretendX == sigPretendDimX || // decides to pad a zero
@ -329,10 +328,6 @@ public:
cube = 3; cube = 3;
idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local; idx = inZ * dimX3 * dimY3 + inY * dimX3 + inX_local;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -407,10 +402,6 @@ public:
cube = 3; cube = 3;
idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX; idx = inZ * dimX3 * dimY3 + inY_local * dimX3 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -483,10 +474,6 @@ public:
cube = 3; cube = 3;
idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX; idx = inZ_local * dimX3 * dimY3 + inY * dimX3 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -614,10 +601,6 @@ public:
cube = 4; // ext4 cube = 4; // ext4
idx = inZ * dimX4 * dimY4 + inY * dimX4 + inX_local; idx = inZ * dimX4 * dimY4 + inY * dimX4 + inX_local;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -734,10 +717,6 @@ public:
cube = 4; // ext4 cube = 4; // ext4
idx = inZ * dimX4 * dimY4 + inY_local * dimX4 + inX; idx = inZ * dimX4 * dimY4 + inY_local * dimX4 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -851,10 +830,6 @@ public:
cube = 4; // ext4 cube = 4; // ext4
idx = inZ_local * dimX4 * dimY4 + inY * dimX4 + inX; idx = inZ_local * dimX4 * dimY4 + inY * dimX4 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
private: private:
@ -878,7 +853,6 @@ public:
typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex);
typedef _4 InputDomain; typedef _4 InputDomain;
VTKM_EXEC_CONT
ForwardTransform3DLeftRight(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, ForwardTransform3DLeftRight(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filter_len, vtkm::Id filter_len,
@ -963,7 +937,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid cube index!");
return -1; return -1;
} }
} }
@ -1034,7 +1007,6 @@ public:
typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex);
typedef _4 InputDomain; typedef _4 InputDomain;
VTKM_EXEC_CONT
ForwardTransform3DTopDown(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, ForwardTransform3DTopDown(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filter_len, vtkm::Id filter_len,
@ -1119,7 +1091,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid cube index!");
return -1; return -1;
} }
} }
@ -1190,7 +1161,6 @@ public:
typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex);
typedef _4 InputDomain; typedef _4 InputDomain;
VTKM_EXEC_CONT
ForwardTransform3DFrontBack(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, ForwardTransform3DFrontBack(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filter_len, vtkm::Id filter_len,
@ -1275,7 +1245,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid cube index!");
return -1; return -1;
} }
} }
@ -1362,7 +1331,6 @@ public:
typedef _6 InputDomain; typedef _6 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
InverseTransform3DLeftRight(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil, InverseTransform3DLeftRight(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil, const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil,
vtkm::Id fil_len, vtkm::Id fil_len,
@ -1470,7 +1438,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid matrix index!");
return -1; return -1;
} }
} }
@ -1596,7 +1563,6 @@ public:
typedef _6 InputDomain; typedef _6 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
InverseTransform3DTopDown(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil, InverseTransform3DTopDown(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil, const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil,
vtkm::Id fil_len, vtkm::Id fil_len,
@ -1704,7 +1670,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid matrix index!");
return -1; return -1;
} }
} }
@ -1830,7 +1795,6 @@ public:
typedef _6 InputDomain; typedef _6 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
InverseTransform3DFrontBack(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil, InverseTransform3DFrontBack(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil, const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil,
vtkm::Id fil_len, vtkm::Id fil_len,
@ -1940,7 +1904,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid matrix index!");
return -1; return -1;
} }
} }
@ -2156,10 +2119,6 @@ public:
mat = 4; // ext4 mat = 4; // ext4
idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd); idx = inY * x4 + (inX - x1 - xa - x2 - x3 - xd);
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
else // top-down mode else // top-down mode
{ {
@ -2193,10 +2152,6 @@ public:
mat = 4; // ext4 mat = 4; // ext4
idx = (inY - y1 - ya - y2 - y3 - yd) * x4 + inX; idx = (inY - y1 - ya - y2 - y3 - yd) * x4 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
} }
@ -2268,10 +2223,6 @@ public:
mat = 3; mat = 3;
idx = inY * dimX3 + (inX - dimX1 - pretendDimX2); idx = inY * dimX3 + (inX - dimX1 - pretendDimX2);
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
else // top-down mode else // top-down mode
{ {
@ -2290,10 +2241,6 @@ public:
mat = 3; mat = 3;
idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX; idx = (inY - dimY1 - pretendDimY2) * dimX3 + inX;
} }
else
{
vtkm::cont::ErrorInternal("Invalid index!");
}
} }
} }
@ -2430,10 +2377,6 @@ public:
sigPretendY++; sigPretendY++;
} }
} }
else
{
vtkm::cont::ErrorInternal("Invalid extension mode for matrices!");
}
if (sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY) if (sigPretendX == sigPretendDimX || sigPretendY == sigPretendDimY)
{ {
@ -2466,7 +2409,6 @@ public:
typedef _4 InputDomain; typedef _4 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
ForwardTransform2D(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, ForwardTransform2D(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filter_len, vtkm::Id filter_len,
@ -2529,7 +2471,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid matrix index!");
return -1; return -1;
} }
} }
@ -2657,7 +2598,6 @@ public:
typedef _6 InputDomain; typedef _6 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
InverseTransform2D(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil, InverseTransform2D(const vtkm::cont::ArrayHandle<vtkm::Float64>& lo_fil,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil, const vtkm::cont::ArrayHandle<vtkm::Float64>& hi_fil,
vtkm::Id fil_len, vtkm::Id fil_len,
@ -2759,7 +2699,6 @@ public:
} }
else else
{ {
vtkm::cont::ErrorInternal("Invalid matrix index!");
return -1; return -1;
} }
} }
@ -2963,7 +2902,6 @@ public:
typedef _1 InputDomain; typedef _1 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
ForwardTransform(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, ForwardTransform(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filLen, vtkm::Id filLen,
@ -3130,7 +3068,6 @@ public:
typedef _1 InputDomain; typedef _1 InputDomain;
// Constructor // Constructor
VTKM_EXEC_CONT
InverseTransformEven(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter, InverseTransformEven(const vtkm::cont::ArrayHandle<vtkm::Float64>& loFilter,
const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter, const vtkm::cont::ArrayHandle<vtkm::Float64>& hiFilter,
vtkm::Id filtL, vtkm::Id filtL,