mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Corrects ignorable warnings with msvc and cuda enabled.
These constant value warnings are ignorable as we are trying to throw an assert.
This commit is contained in:
parent
799277e515
commit
9148bea396
@ -68,7 +68,9 @@ public:
|
||||
void Set(vtkm::Id vtkmNotUsed(index),
|
||||
const ValueType &vtkmNotUsed(value)) const
|
||||
{
|
||||
#if !(defined(VTKM_MSVC) && defined(VTKM_CUDA))
|
||||
VTKM_ASSERT(false && "Cannot write to read-only implicit array.");
|
||||
#endif
|
||||
}
|
||||
|
||||
typedef vtkm::cont::internal::IteratorFromArrayPortal<
|
||||
|
@ -93,7 +93,9 @@ public:
|
||||
void Set(vtkm::Id vtkmNotUsed(index),
|
||||
const ValueType &vtkmNotUsed(value)) const
|
||||
{
|
||||
#if !(defined(VTKM_MSVC) && defined(VTKM_CUDA))
|
||||
VTKM_ASSERT(false && "Cannot write to read-only transform array. (No inverse transform given.)");
|
||||
#endif
|
||||
}
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
|
@ -185,7 +185,9 @@ public:
|
||||
VTKM_EXEC_CONT
|
||||
void Set(vtkm::Id vtkmNotUsed(index), const ValueType& vtkmNotUsed(value)) const
|
||||
{
|
||||
#if ! (defined(VTKM_MSVC) && defined(VTKM_CUDA))
|
||||
VTKM_ASSERT(false && "Attempted to write to constant array.");
|
||||
#endif
|
||||
}
|
||||
|
||||
VTKM_SUPPRESS_EXEC_WARNINGS
|
||||
|
@ -337,18 +337,24 @@ public:
|
||||
ValueType Get(vtkm::Id index) const {
|
||||
return vtkm::exec::cuda::internal::load_through_texture<ValueType>::get( this->BeginIterator + index );
|
||||
}
|
||||
|
||||
__device__
|
||||
void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const {
|
||||
}
|
||||
|
||||
#else
|
||||
__host__
|
||||
ValueType Get(vtkm::Id vtkmNotUsed(index) ) const {
|
||||
return ValueType();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
__host__ __device__
|
||||
__host__
|
||||
void Set(vtkm::Id vtkmNotUsed(index), ValueType vtkmNotUsed(value)) const {
|
||||
VTKM_ASSERT("Cannot set to const array.");
|
||||
#if ! (defined(VTKM_MSVC) && defined(VTKM_CUDA))
|
||||
VTKM_ASSERT(true && "Cannot set to const array.");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
VTKM_EXEC_CONT
|
||||
IteratorType GetIteratorBegin() const { return this->BeginIterator; }
|
||||
|
Loading…
Reference in New Issue
Block a user