diff --git a/vtkm/cont/ArrayHandleExtractComponent.h b/vtkm/cont/ArrayHandleExtractComponent.h index 25fcbac4a..49b6f2f5a 100644 --- a/vtkm/cont/ArrayHandleExtractComponent.h +++ b/vtkm/cont/ArrayHandleExtractComponent.h @@ -51,6 +51,9 @@ public: { } + ArrayPortalExtractComponent& operator=(const ArrayPortalExtractComponent& src) = default; + ArrayPortalExtractComponent& operator=(ArrayPortalExtractComponent&& src) = default; + VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { return this->Portal.GetNumberOfValues(); } diff --git a/vtkm/cont/ArrayHandleSwizzle.h b/vtkm/cont/ArrayHandleSwizzle.h index 42f426ed5..c6eb00336 100644 --- a/vtkm/cont/ArrayHandleSwizzle.h +++ b/vtkm/cont/ArrayHandleSwizzle.h @@ -144,6 +144,9 @@ public: { } + ArrayPortalSwizzle& operator=(const ArrayPortalSwizzle& src) = default; + ArrayPortalSwizzle& operator=(ArrayPortalSwizzle&& src) = default; + VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { return this->Portal.GetNumberOfValues(); } diff --git a/vtkm/exec/ConnectivityPermuted.h b/vtkm/exec/ConnectivityPermuted.h index 6870f1e05..da47f187b 100644 --- a/vtkm/exec/ConnectivityPermuted.h +++ b/vtkm/exec/ConnectivityPermuted.h @@ -50,6 +50,11 @@ public: { } + ConnectivityPermutedVisitCellsWithPoints& operator=( + const ConnectivityPermutedVisitCellsWithPoints& src) = default; + ConnectivityPermutedVisitCellsWithPoints& operator=( + ConnectivityPermutedVisitCellsWithPoints&& src) = default; + VTKM_EXEC vtkm::Id GetNumberOfElements() const { return this->Portal.GetNumberOfValues(); } diff --git a/vtkm/exec/ConnectivityStructured.h b/vtkm/exec/ConnectivityStructured.h index e702f4ec6..7a8c55845 100644 --- a/vtkm/exec/ConnectivityStructured.h +++ b/vtkm/exec/ConnectivityStructured.h @@ -59,6 +59,11 @@ public: { } + + ConnectivityStructured& operator=(const ConnectivityStructured& src) = default; + ConnectivityStructured& operator=(ConnectivityStructured&& src) = default; + + VTKM_EXEC vtkm::Id GetNumberOfElements() const { return Helper::GetNumberOfElements(this->Internals); } diff --git a/vtkm/internal/ArrayPortalValueReference.h b/vtkm/internal/ArrayPortalValueReference.h index b3630aac1..269422581 100644 --- a/vtkm/internal/ArrayPortalValueReference.h +++ b/vtkm/internal/ArrayPortalValueReference.h @@ -47,6 +47,14 @@ struct ArrayPortalValueReference { } + VTKM_SUPPRESS_EXEC_WARNINGS + VTKM_EXEC_CONT + ArrayPortalValueReference(const ArrayPortalValueReference& ref) + : Portal(ref.Portal) + , Index(ref.Index) + { + } + VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT ValueType Get() const { return this->Portal.Get(this->Index); } diff --git a/vtkm/worklet/LagrangianStructures.h b/vtkm/worklet/LagrangianStructures.h index 27a363104..036c7cee7 100644 --- a/vtkm/worklet/LagrangianStructures.h +++ b/vtkm/worklet/LagrangianStructures.h @@ -49,23 +49,21 @@ public: const PointArray& output, Scalar& outputField) const { - using Point = typename PointArray::ValueType; - const vtkm::Vec neighborIndices = this->GridData.GetNeighborIndices(index); // Calculate Stretching / Squeezing - Point xin1 = input.Get(neighborIndices[0]); - Point xin2 = input.Get(neighborIndices[1]); - Point yin1 = input.Get(neighborIndices[2]); - Point yin2 = input.Get(neighborIndices[3]); + auto xin1 = input.Get(neighborIndices[0]); + auto xin2 = input.Get(neighborIndices[1]); + auto yin1 = input.Get(neighborIndices[2]); + auto yin2 = input.Get(neighborIndices[3]); Scalar xDiff = 1.0f / (xin2[0] - xin1[0]); Scalar yDiff = 1.0f / (yin2[1] - yin1[1]); - Point xout1 = output.Get(neighborIndices[0]); - Point xout2 = output.Get(neighborIndices[1]); - Point yout1 = output.Get(neighborIndices[2]); - Point yout2 = output.Get(neighborIndices[3]); + auto xout1 = output.Get(neighborIndices[0]); + auto xout2 = output.Get(neighborIndices[1]); + auto yout1 = output.Get(neighborIndices[2]); + auto yout2 = output.Get(neighborIndices[3]); // Total X gradient w.r.t X, Y Scalar f1x = (xout2[0] - xout1[0]) * xDiff; @@ -130,27 +128,25 @@ public: const PointArray& output, Scalar& outputField) const { - using Point = typename PointArray::ValueType; - const vtkm::Vec neighborIndices = this->GridData.GetNeighborIndices(index); - Point xin1 = input.Get(neighborIndices[0]); - Point xin2 = input.Get(neighborIndices[1]); - Point yin1 = input.Get(neighborIndices[2]); - Point yin2 = input.Get(neighborIndices[3]); - Point zin1 = input.Get(neighborIndices[4]); - Point zin2 = input.Get(neighborIndices[5]); + auto xin1 = input.Get(neighborIndices[0]); + auto xin2 = input.Get(neighborIndices[1]); + auto yin1 = input.Get(neighborIndices[2]); + auto yin2 = input.Get(neighborIndices[3]); + auto zin1 = input.Get(neighborIndices[4]); + auto zin2 = input.Get(neighborIndices[5]); Scalar xDiff = 1.0f / (xin2[0] - xin1[0]); Scalar yDiff = 1.0f / (yin2[1] - yin1[1]); Scalar zDiff = 1.0f / (zin2[2] - zin1[2]); - Point xout1 = output.Get(neighborIndices[0]); - Point xout2 = output.Get(neighborIndices[1]); - Point yout1 = output.Get(neighborIndices[2]); - Point yout2 = output.Get(neighborIndices[3]); - Point zout1 = output.Get(neighborIndices[4]); - Point zout2 = output.Get(neighborIndices[5]); + auto xout1 = output.Get(neighborIndices[0]); + auto xout2 = output.Get(neighborIndices[1]); + auto yout1 = output.Get(neighborIndices[2]); + auto yout2 = output.Get(neighborIndices[3]); + auto zout1 = output.Get(neighborIndices[4]); + auto zout2 = output.Get(neighborIndices[5]); // Total X gradient w.r.t X, Y, Z Scalar f1x = (xout2[0] - xout1[0]) * xDiff;