diff --git a/vtkm/cont/ArrayHandleGroupVec.h b/vtkm/cont/ArrayHandleGroupVec.h index 774415634..f95d52922 100644 --- a/vtkm/cont/ArrayHandleGroupVec.h +++ b/vtkm/cont/ArrayHandleGroupVec.h @@ -143,11 +143,6 @@ public: VTKM_CONT static vtkm::Id GetNumberOfValues(const vtkm::cont::internal::Buffer* buffers) { vtkm::Id componentsSize = ComponentsStorage::GetNumberOfValues(buffers); - if (componentsSize % NUM_COMPONENTS != 0) - { - throw vtkm::cont::ErrorBadValue( - "ArrayHandleGroupVec's components array does not divide evenly into Vecs."); - } return componentsSize / NUM_COMPONENTS; } @@ -155,6 +150,11 @@ public: vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) { + if ((ComponentsStorage::GetNumberOfValues(buffers) % NUM_COMPONENTS) != 0) + { + VTKM_LOG_S(vtkm::cont::LogLevel::Warn, + "ArrayHandleGroupVec's components array does not divide evenly into Vecs."); + } return ReadPortalType(ComponentsStorage::CreateReadPortal(buffers, device, token)); } @@ -162,6 +162,11 @@ public: vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) { + if ((ComponentsStorage::GetNumberOfValues(buffers) % NUM_COMPONENTS) != 0) + { + VTKM_LOG_S(vtkm::cont::LogLevel::Warn, + "ArrayHandleGroupVec's components array does not divide evenly into Vecs."); + } return WritePortalType(ComponentsStorage::CreateWritePortal(buffers, device, token)); } }; @@ -183,6 +188,11 @@ VTKM_ARRAY_HANDLE_NEW_STYLE(T, VTKM_PASS_COMMAS(vtkm::cont::StorageTagGroupVec class ArrayHandleGroupVec : public vtkm::cont::ArrayHandle<