From 182f4707e7ea24c09c931bda9586d53e8e88a478 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Thu, 22 Feb 2018 08:29:13 -0500 Subject: [PATCH] vtkm prefers 'using' over typedef. --- examples/tau_timing/TauTiming.cxx | 16 +-- vtkm/BinaryPredicates.h | 2 +- vtkm/CellTraits.h | 18 +-- vtkm/NewtonsMethod.h | 4 +- vtkm/UnaryPredicates.h | 2 +- vtkm/VecAxisAlignedPointCoordinates.h | 14 +- vtkm/VecFromPortal.h | 14 +- vtkm/VecFromPortalPermute.h | 16 +-- vtkm/VecVariable.h | 14 +- vtkm/benchmarking/BenchmarkDeviceAdapter.cxx | 46 +++---- .../benchmarking/BenchmarkFieldAlgorithms.cxx | 10 +- .../BenchmarkTopologyAlgorithms.cxx | 14 +- vtkm/cont/PointLocatorUniformGrid.h | 2 +- vtkm/cont/tbb/internal/ParallelSortTBB.cxx | 26 ++-- .../testing/TestingPointLocatorUniformGrid.h | 2 +- vtkm/exec/arg/OnBoundary.h | 2 +- .../UnitTestFetchArrayNeighborhoodIn.cxx | 4 +- vtkm/filter/ClipWithField.h | 2 +- vtkm/filter/ContourTreeUniform.h | 4 +- vtkm/filter/Entropy.h | 2 +- vtkm/filter/ExtractGeometry.h | 2 +- vtkm/filter/FilterDataSet.hxx | 4 +- vtkm/filter/FilterDataSetWithField.hxx | 10 +- vtkm/filter/FilterField.hxx | 6 +- vtkm/filter/FilterTraits.h | 2 +- vtkm/filter/Gradient.h | 2 +- vtkm/filter/Histogram.h | 2 +- vtkm/filter/MarchingCubes.h | 2 +- vtkm/filter/MarchingCubes.hxx | 2 +- vtkm/filter/PointElevation.h | 2 +- vtkm/filter/PolicyBase.h | 28 ++-- vtkm/filter/Streamline.h | 2 +- vtkm/filter/Streamline.hxx | 14 +- vtkm/filter/Threshold.h | 2 +- vtkm/filter/ThresholdPoints.h | 2 +- vtkm/filter/VectorMagnitude.h | 2 +- vtkm/filter/VectorMagnitude.hxx | 2 +- .../internal/ResolveFieldTypeAndExecute.h | 2 +- vtkm/filter/internal/ResolveFieldTypeAndMap.h | 2 +- .../testing/UnitTestClipWithFieldFilter.cxx | 2 +- ...UnitTestClipWithImplicitFunctionFilter.cxx | 2 +- vtkm/filter/testing/UnitTestEntropyFilter.cxx | 2 +- .../testing/UnitTestMarchingCubesFilter.cxx | 52 ++++--- .../UnitTestVertexClusteringFilter.cxx | 4 +- .../ArrayPortalUniformPointCoordinates.h | 2 +- .../ConnectivityStructuredInternals.h | 24 ++-- vtkm/internal/FunctionInterface.h | 55 ++++---- .../testing/UnitTestFunctionInterface.cxx | 16 +-- vtkm/interop/cuda/internal/TransferToOpenGL.h | 2 +- vtkm/interop/internal/BufferTypePicker.h | 2 +- .../testing/UnitTestBufferTypePicker.cxx | 4 +- vtkm/interop/testing/TestingOpenGLInterop.h | 2 +- vtkm/testing/TestingMath.h | 6 +- vtkm/testing/UnitTestBounds.cxx | 2 +- vtkm/testing/UnitTestMatrix.cxx | 14 +- vtkm/testing/UnitTestNewtonsMethod.cxx | 8 +- vtkm/testing/UnitTestTransform3D.cxx | 4 +- vtkm/testing/UnitTestTypeListTag.cxx | 2 +- vtkm/testing/UnitTestTypeTraits.cxx | 4 +- vtkm/testing/UnitTestTypes.cxx | 10 +- ...UnitTestVecAxisAlignedPointCoordinates.cxx | 8 +- vtkm/testing/UnitTestVecFromPortal.cxx | 10 +- vtkm/testing/UnitTestVecFromPortalPermute.cxx | 12 +- vtkm/testing/UnitTestVecTraits.cxx | 4 +- vtkm/testing/UnitTestVecVariable.cxx | 8 +- vtkm/testing/UnitTestVectorAnalysis.cxx | 12 +- vtkm/worklet/AverageByKey.h | 14 +- vtkm/worklet/CellAverage.h | 2 +- vtkm/worklet/Clip.h | 44 +++--- vtkm/worklet/DispatcherMapField.h | 10 +- vtkm/worklet/DispatcherMapTopology.h | 10 +- vtkm/worklet/DispatcherStreamingMapField.h | 55 ++++---- vtkm/worklet/ExternalFaces.h | 26 ++-- vtkm/worklet/ExtractGeometry.h | 4 +- vtkm/worklet/ExtractPoints.h | 4 +- vtkm/worklet/FieldEntropy.h | 2 +- vtkm/worklet/FieldHistogram.h | 8 +- vtkm/worklet/FieldStatistics.h | 8 +- vtkm/worklet/KernelSplatter.h | 38 +++--- vtkm/worklet/MarchingCubes.h | 22 +-- vtkm/worklet/Mask.h | 4 +- vtkm/worklet/MaskPoints.h | 2 +- vtkm/worklet/NDimsEntropy.h | 2 +- vtkm/worklet/NDimsHistMarginalization.h | 4 +- vtkm/worklet/NDimsHistogram.h | 4 +- vtkm/worklet/ParticleAdvection.h | 2 +- vtkm/worklet/PointAverage.h | 2 +- vtkm/worklet/ScatterCounting.h | 4 +- vtkm/worklet/ScatterIdentity.h | 4 +- vtkm/worklet/ScatterUniform.h | 4 +- vtkm/worklet/StreamLineUniformGrid.h | 14 +- vtkm/worklet/Tetrahedralize.h | 2 +- vtkm/worklet/Threshold.h | 4 +- vtkm/worklet/ThresholdPoints.h | 4 +- vtkm/worklet/Triangulate.h | 2 +- vtkm/worklet/VertexClustering.h | 2 +- vtkm/worklet/WaveletCompressor.h | 46 +++---- vtkm/worklet/WorkletMapField.h | 18 +-- vtkm/worklet/WorkletPointNeighborhood.h | 4 +- .../connectivities/GraphConnectivity.h | 6 +- .../contourtree/ActiveEdgeTransferrer.h | 7 +- vtkm/worklet/contourtree/ChainDoubler.h | 2 +- vtkm/worklet/contourtree/ChainGraph.h | 14 +- vtkm/worklet/contourtree/ContourTree.h | 12 +- vtkm/worklet/contourtree/CopyJoinSplit.h | 2 +- vtkm/worklet/contourtree/CopyNeighbors.h | 2 +- vtkm/worklet/contourtree/CopySupernodes.h | 2 +- vtkm/worklet/contourtree/DegreeDelta.h | 2 +- .../contourtree/DegreeSubrangeOffset.h | 2 +- vtkm/worklet/contourtree/EdgePeakComparator.h | 9 +- vtkm/worklet/contourtree/FillSupernodes.h | 2 +- vtkm/worklet/contourtree/FindLeaves.h | 2 +- .../contourtree/GoverningSaddleFinder.h | 2 +- vtkm/worklet/contourtree/JoinArcConnector.h | 2 +- vtkm/worklet/contourtree/JoinSuperArcFinder.h | 2 +- .../worklet/contourtree/JoinTreeTransferrer.h | 2 +- vtkm/worklet/contourtree/MergeTree.h | 2 +- .../contourtree/Mesh2D_DEM_SaddleStarter.h | 2 +- .../contourtree/Mesh2D_DEM_Triangulation.h | 6 +- .../Mesh2D_DEM_VertexOutdegreeStarter.h | 2 +- .../contourtree/Mesh2D_DEM_VertexStarter.h | 2 +- .../contourtree/Mesh3D_DEM_SaddleStarter.h | 10 +- .../contourtree/Mesh3D_DEM_Triangulation.h | 6 +- .../Mesh3D_DEM_VertexOutdegreeStarter.h | 10 +- .../contourtree/Mesh3D_DEM_VertexStarter.h | 2 +- .../contourtree/RegularPointTransferrer.h | 2 +- vtkm/worklet/contourtree/RegularToCandidate.h | 2 +- .../contourtree/RegularToCriticalDown.h | 2 +- .../worklet/contourtree/RegularToCriticalUp.h | 2 +- vtkm/worklet/contourtree/ResetDegrees.h | 2 +- .../worklet/contourtree/SaddleAscentFunctor.h | 2 +- .../contourtree/SaddleAscentTransferrer.h | 2 +- .../worklet/contourtree/SetJoinAndSplitArcs.h | 2 +- vtkm/worklet/contourtree/SetSupernodeInward.h | 2 +- vtkm/worklet/contourtree/SkipVertex.h | 2 +- vtkm/worklet/contourtree/SubrangeOffset.h | 2 +- vtkm/worklet/contourtree/TrunkBuilder.h | 2 +- vtkm/worklet/contourtree/UpdateOutbound.h | 2 +- .../worklet/contourtree/VertexDegreeUpdater.h | 2 +- .../contourtree/VertexMergeComparator.h | 9 +- vtkm/worklet/cosmotools/ComputeBinIndices.h | 2 +- vtkm/worklet/cosmotools/ComputeBinRange.h | 2 +- vtkm/worklet/cosmotools/ComputeBins.h | 2 +- vtkm/worklet/cosmotools/ComputeNeighborBins.h | 2 +- vtkm/worklet/cosmotools/ComputePotential.h | 2 +- vtkm/worklet/cosmotools/ComputePotentialBin.h | 2 +- vtkm/worklet/cosmotools/ComputePotentialMxN.h | 2 +- .../cosmotools/ComputePotentialNeighbors.h | 2 +- vtkm/worklet/cosmotools/ComputePotentialNxN.h | 2 +- .../cosmotools/ComputePotentialOnCandidates.h | 2 +- .../cosmotools/EqualsMinimumPotential.h | 2 +- vtkm/worklet/cosmotools/GraftParticles.h | 2 +- vtkm/worklet/cosmotools/IsStar.h | 2 +- vtkm/worklet/cosmotools/MarkActiveNeighbors.h | 2 +- vtkm/worklet/cosmotools/PointerJump.h | 2 +- .../cosmotools/SetCandidateParticles.h | 2 +- vtkm/worklet/cosmotools/ValidHalo.h | 2 +- vtkm/worklet/gradient/CellGradient.h | 2 +- vtkm/worklet/gradient/Divergence.h | 2 +- vtkm/worklet/gradient/PointGradient.h | 2 +- vtkm/worklet/gradient/QCriterion.h | 2 +- .../gradient/StructuredPointGradient.h | 2 +- vtkm/worklet/gradient/Transpose.h | 2 +- vtkm/worklet/gradient/Vorticity.h | 2 +- vtkm/worklet/histogram/ComputeNDHistogram.h | 8 +- .../histogram/MarginalizeNDHistogram.h | 2 +- vtkm/worklet/internal/ClipTables.h | 2 +- vtkm/worklet/internal/DispatcherBase.h | 41 +++--- vtkm/worklet/internal/TriangulateTables.h | 8 +- vtkm/worklet/internal/WorkletBase.h | 120 ++++++++-------- .../testing/UnitTestDispatcherBase.cxx | 2 +- .../particleadvection/GridEvaluators.h | 22 +-- .../ParticleAdvectionWorklets.h | 36 ++--- vtkm/worklet/particleadvection/Particles.h | 22 ++- .../spatialstructure/KdTree3DConstruction.h | 14 +- vtkm/worklet/splatkernels/KernelBase.h | 2 +- .../testing/UnitTestCellSetConnectivity.cpp | 2 +- vtkm/worklet/testing/UnitTestClipping.cxx | 2 +- vtkm/worklet/testing/UnitTestCosmoTools.cxx | 2 +- .../worklet/testing/UnitTestExternalFaces.cxx | 2 +- .../testing/UnitTestExtractGeometry.cxx | 18 +-- .../worklet/testing/UnitTestExtractPoints.cxx | 14 +- .../testing/UnitTestExtractStructured.cxx | 10 +- .../testing/UnitTestKdTreeBuildNNS.cxx | 2 +- vtkm/worklet/testing/UnitTestMagnitude.cxx | 6 +- .../worklet/testing/UnitTestMarchingCubes.cxx | 42 +++--- vtkm/worklet/testing/UnitTestMask.cxx | 12 +- vtkm/worklet/testing/UnitTestMaskPoints.cxx | 6 +- .../testing/UnitTestParticleAdvection.cxx | 71 +++++----- .../testing/UnitTestScatterCounting.cxx | 10 +- vtkm/worklet/testing/UnitTestSplatKernels.cxx | 2 +- .../testing/UnitTestStreamLineUniformGrid.cxx | 2 +- .../worklet/testing/UnitTestStreamingSine.cxx | 2 +- .../testing/UnitTestTetrahedralize.cxx | 8 +- vtkm/worklet/testing/UnitTestThreshold.cxx | 12 +- .../testing/UnitTestThresholdPoints.cxx | 6 +- vtkm/worklet/testing/UnitTestTriangulate.cxx | 8 +- .../testing/UnitTestVertexClustering.cxx | 6 +- .../testing/UnitTestWaveletCompressor.cxx | 4 +- .../testing/UnitTestWorkletMapField.cxx | 2 +- .../UnitTestWorkletMapFieldExecArg.cxx | 2 +- .../UnitTestWorkletMapFieldWholeArray.cxx | 16 +-- .../UnitTestWorkletMapPointNeighborhood.cxx | 4 +- .../UnitTestWorkletMapTopologyExplicit.cxx | 4 +- .../UnitTestWorkletMapTopologyUniform.cxx | 4 +- .../testing/UnitTestWorkletReduceByKey.cxx | 4 +- .../tetrahedralize/TetrahedralizeExplicit.h | 6 +- .../tetrahedralize/TetrahedralizeStructured.h | 6 +- .../worklet/triangulate/TriangulateExplicit.h | 6 +- .../triangulate/TriangulateStructured.h | 6 +- vtkm/worklet/wavelets/WaveletBase.h | 20 +-- vtkm/worklet/wavelets/WaveletDWT.h | 128 +++++++++--------- vtkm/worklet/wavelets/WaveletFilter.h | 2 +- vtkm/worklet/wavelets/WaveletTransforms.h | 62 ++++----- 214 files changed, 964 insertions(+), 987 deletions(-) diff --git a/examples/tau_timing/TauTiming.cxx b/examples/tau_timing/TauTiming.cxx index af72d9722..50f99d8c8 100644 --- a/examples/tau_timing/TauTiming.cxx +++ b/examples/tau_timing/TauTiming.cxx @@ -64,14 +64,14 @@ VTKM_EXEC_CONT vtkm::Vec Normalize(vtkm::Vec v) return one / magnitude * v; } -typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; +using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; class TangleField : public vtkm::worklet::WorkletMapField { public: typedef void ControlSignature(FieldIn vertexId, FieldOut v); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; const vtkm::Id xdim, ydim, zdim; const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax; @@ -343,9 +343,9 @@ void RenderRTTest(const vtkm::cont::DataSet& ds, int N) if (printProgress && i % 10 == 0) std::cout << " " << i << " of " << N << std::endl; - typedef vtkm::rendering::MapperRayTracer M; - typedef vtkm::rendering::CanvasRayTracer C; - typedef vtkm::rendering::View3D V3; + using M = vtkm::rendering::MapperRayTracer; + using C = vtkm::rendering::CanvasRayTracer; + using V3 = vtkm::rendering::View3D; //std::cout<<"Render: "< TopologicalDimensionsTag; + using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag; /// \brief A tag specifying whether the number of points is fixed. /// @@ -74,7 +74,7 @@ struct CellTraits /// \c CellTraitsTagSizeVariable, then the number of points is not known at /// compile time. /// - typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed; + using IsSizeFixed = vtkm::CellTraitsTagSizeFixed; /// \brief Number of points in the cell. /// @@ -95,19 +95,19 @@ struct CellTraits template <> \ struct CellTraits \ { \ - const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ - typedef vtkm::CellTopologicalDimensionsTag TopologicalDimensionsTag; \ - typedef vtkm::CellTraitsTagSizeFixed IsSizeFixed; \ - static const vtkm::IdComponent NUM_POINTS = numPoints; \ + static constexpr vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ + using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag; \ + using IsSizeFixed = vtkm::CellTraitsTagSizeFixed; \ + static constexpr vtkm::IdComponent NUM_POINTS = numPoints; \ } #define VTKM_DEFINE_CELL_TRAITS_VARIABLE(name, dimensions) \ template <> \ struct CellTraits \ { \ - const static vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ - typedef vtkm::CellTopologicalDimensionsTag TopologicalDimensionsTag; \ - typedef vtkm::CellTraitsTagSizeVariable IsSizeFixed; \ + static constexpr vtkm::IdComponent TOPOLOGICAL_DIMENSIONS = dimensions; \ + using TopologicalDimensionsTag = vtkm::CellTopologicalDimensionsTag; \ + using IsSizeFixed = vtkm::CellTraitsTagSizeVariable; \ } VTKM_DEFINE_CELL_TRAITS(Empty, 0, 0); diff --git a/vtkm/NewtonsMethod.h b/vtkm/NewtonsMethod.h index 608d60702..76f590672 100644 --- a/vtkm/NewtonsMethod.h +++ b/vtkm/NewtonsMethod.h @@ -57,8 +57,8 @@ VTKM_EXEC_CONT NewtonsMethodResult NewtonsMethod( ScalarType convergeDifference = ScalarType(1e-3), vtkm::IdComponent maxIterations = 10) { - typedef vtkm::Vec VectorType; - typedef vtkm::Matrix MatrixType; + using VectorType = vtkm::Vec; + using MatrixType = vtkm::Matrix; VectorType x = initialGuess; diff --git a/vtkm/UnaryPredicates.h b/vtkm/UnaryPredicates.h index f6e08e24c..1eb446860 100644 --- a/vtkm/UnaryPredicates.h +++ b/vtkm/UnaryPredicates.h @@ -63,4 +63,4 @@ struct LogicalNot } // namespace vtkm -#endif //vtk_m_UnaryPredicates_h \ No newline at end of file +#endif //vtk_m_UnaryPredicates_h diff --git a/vtkm/VecAxisAlignedPointCoordinates.h b/vtkm/VecAxisAlignedPointCoordinates.h index a4face0b5..baf304d95 100644 --- a/vtkm/VecAxisAlignedPointCoordinates.h +++ b/vtkm/VecAxisAlignedPointCoordinates.h @@ -75,7 +75,7 @@ template class VecAxisAlignedPointCoordinates { public: - typedef vtkm::Vec ComponentType; + using ComponentType = vtkm::Vec; static const vtkm::IdComponent NUM_COMPONENTS = detail::VecAxisAlignedPointCoordinatesNumComponents::NUM_COMPONENTS; @@ -132,8 +132,8 @@ private: template struct TypeTraits> { - typedef vtkm::TypeTraitsRealTag NumericTag; - typedef TypeTraitsVectorTag DimensionalityTag; + using NumericTag = vtkm::TypeTraitsRealTag; + using DimensionalityTag = TypeTraitsVectorTag; VTKM_EXEC_CONT static vtkm::VecAxisAlignedPointCoordinates ZeroInitialization() @@ -146,11 +146,11 @@ struct TypeTraits> template struct VecTraits> { - typedef vtkm::VecAxisAlignedPointCoordinates VecType; + using VecType = vtkm::VecAxisAlignedPointCoordinates; - typedef vtkm::Vec ComponentType; - typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; - typedef vtkm::VecTraitsTagSizeStatic IsSizeStatic; + using ComponentType = vtkm::Vec; + using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents; + using IsSizeStatic = vtkm::VecTraitsTagSizeStatic; static const vtkm::IdComponent NUM_COMPONENTS = VecType::NUM_COMPONENTS; diff --git a/vtkm/VecFromPortal.h b/vtkm/VecFromPortal.h index 940b90bd3..877ecffff 100644 --- a/vtkm/VecFromPortal.h +++ b/vtkm/VecFromPortal.h @@ -89,11 +89,11 @@ template struct TypeTraits> { private: - typedef typename PortalType::ValueType ComponentType; + using ComponentType = typename PortalType::ValueType; public: - typedef typename vtkm::TypeTraits::NumericTag NumericTag; - typedef TypeTraitsVectorTag DimensionalityTag; + using NumericTag = typename vtkm::TypeTraits::NumericTag; + using DimensionalityTag = TypeTraitsVectorTag; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT @@ -106,11 +106,11 @@ public: template struct VecTraits> { - typedef vtkm::VecFromPortal VecType; + using VecType = vtkm::VecFromPortal; - typedef typename VecType::ComponentType ComponentType; - typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; - typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic; + using ComponentType = typename VecType::ComponentType; + using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents; + using IsSizeStatic = vtkm::VecTraitsTagSizeVariable; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT diff --git a/vtkm/VecFromPortalPermute.h b/vtkm/VecFromPortalPermute.h index 2c4f363bb..286c45029 100644 --- a/vtkm/VecFromPortalPermute.h +++ b/vtkm/VecFromPortalPermute.h @@ -83,12 +83,12 @@ template struct TypeTraits> { private: - typedef vtkm::VecFromPortalPermute VecType; - typedef typename PortalType::ValueType ComponentType; + using VecType = vtkm::VecFromPortalPermute; + using ComponentType = typename PortalType::ValueType; public: - typedef typename vtkm::TypeTraits::NumericTag NumericTag; - typedef TypeTraitsVectorTag DimensionalityTag; + using NumericTag = typename vtkm::TypeTraits::NumericTag; + using DimensionalityTag = TypeTraitsVectorTag; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT @@ -98,11 +98,11 @@ public: template struct VecTraits> { - typedef vtkm::VecFromPortalPermute VecType; + using VecType = vtkm::VecFromPortalPermute; - typedef typename VecType::ComponentType ComponentType; - typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; - typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic; + using ComponentType = typename VecType::ComponentType; + using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents; + using IsSizeStatic = vtkm::VecTraitsTagSizeVariable; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC_CONT diff --git a/vtkm/VecVariable.h b/vtkm/VecVariable.h index 7c9a28529..479d067de 100644 --- a/vtkm/VecVariable.h +++ b/vtkm/VecVariable.h @@ -40,7 +40,7 @@ template class VecVariable { public: - typedef T ComponentType; + using ComponentType = T; VTKM_EXEC_CONT VecVariable() @@ -94,8 +94,8 @@ private: template struct TypeTraits> { - typedef typename vtkm::TypeTraits::NumericTag NumericTag; - typedef TypeTraitsVectorTag DimensionalityTag; + using NumericTag = typename vtkm::TypeTraits::NumericTag; + using DimensionalityTag = TypeTraitsVectorTag; VTKM_EXEC_CONT static vtkm::VecVariable ZeroInitialization() @@ -107,11 +107,11 @@ struct TypeTraits> template struct VecTraits> { - typedef vtkm::VecVariable VecType; + using VecType = vtkm::VecVariable; - typedef typename VecType::ComponentType ComponentType; - typedef vtkm::VecTraitsTagMultipleComponents HasMultipleComponents; - typedef vtkm::VecTraitsTagSizeVariable IsSizeStatic; + using ComponentType = typename VecType::ComponentType; + using HasMultipleComponents = vtkm::VecTraitsTagMultipleComponents; + using IsSizeStatic = vtkm::VecTraitsTagSizeVariable; VTKM_EXEC_CONT static vtkm::IdComponent GetNumberOfComponents(const VecType& vector) diff --git a/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx b/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx index eb6325c79..f8ab2a644 100644 --- a/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx +++ b/vtkm/benchmarking/BenchmarkDeviceAdapter.cxx @@ -169,13 +169,13 @@ const static std::string DIVIDER(40, '-'); template class BenchmarkDeviceAdapter { - typedef vtkm::cont::StorageTagBasic StorageTag; + using StorageTag = vtkm::cont::StorageTagBasic; - typedef vtkm::cont::ArrayHandle IdArrayHandle; + using IdArrayHandle = vtkm::cont::ArrayHandle; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - typedef vtkm::cont::Timer Timer; + using Timer = vtkm::cont::Timer; public: // Various kernels used by the different benchmarks to accelerate @@ -183,8 +183,8 @@ public: template struct FillTestValueKernel : vtkm::exec::FunctorBase { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; + using ValueArrayHandle = vtkm::cont::ArrayHandle; + using PortalType = typename ValueArrayHandle::template ExecutionTypes::Portal; PortalType Output; @@ -200,8 +200,8 @@ public: template struct FillScaledTestValueKernel : vtkm::exec::FunctorBase { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; + using ValueArrayHandle = vtkm::cont::ArrayHandle; + using PortalType = typename ValueArrayHandle::template ExecutionTypes::Portal; PortalType Output; const vtkm::Id IdScale; @@ -219,8 +219,8 @@ public: template struct FillModuloTestValueKernel : vtkm::exec::FunctorBase { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; + using ValueArrayHandle = vtkm::cont::ArrayHandle; + using PortalType = typename ValueArrayHandle::template ExecutionTypes::Portal; PortalType Output; const vtkm::Id Modulus; @@ -238,8 +238,8 @@ public: template struct FillBinaryTestValueKernel : vtkm::exec::FunctorBase { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; - typedef typename ValueArrayHandle::template ExecutionTypes::Portal PortalType; + using ValueArrayHandle = vtkm::cont::ArrayHandle; + using PortalType = typename ValueArrayHandle::template ExecutionTypes::Portal; PortalType Output; const vtkm::Id Modulus; @@ -261,7 +261,7 @@ private: template struct BenchCopy { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle ValueHandle_src; ValueArrayHandle ValueHandle_dst; @@ -302,7 +302,7 @@ private: template struct BenchCopyIf { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; const vtkm::Id PERCENT_VALID; const vtkm::Id N_VALID; @@ -359,7 +359,7 @@ private: template struct BenchLowerBounds { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; const vtkm::Id N_VALS; const vtkm::Id PERCENT_VALUES; @@ -415,7 +415,7 @@ private: template struct BenchReduce { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle InputHandle; // We don't actually use this, but we need it to prevent sufficiently @@ -461,7 +461,7 @@ private: template struct BenchReduceByKey { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; const vtkm::Id N_KEYS; const vtkm::Id PERCENT_KEYS; @@ -518,7 +518,7 @@ private: template struct BenchScanInclusive { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle ValueHandle, OutHandle; VTKM_CONT @@ -553,7 +553,7 @@ private: template struct BenchScanExclusive { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle ValueHandle, OutHandle; @@ -589,7 +589,7 @@ private: template struct BenchSort { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; ValueArrayHandle ValueHandle; std::mt19937 Rng; @@ -631,7 +631,7 @@ private: template struct BenchSortByKey { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; std::mt19937 Rng; vtkm::Id N_KEYS; @@ -797,7 +797,7 @@ private: template struct BenchUnique { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; const vtkm::Id N_VALID; const vtkm::Id PERCENT_VALID; @@ -853,7 +853,7 @@ private: template struct BenchUpperBounds { - typedef vtkm::cont::ArrayHandle ValueArrayHandle; + using ValueArrayHandle = vtkm::cont::ArrayHandle; const vtkm::Id N_VALS; const vtkm::Id PERCENT_VALS; diff --git a/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx b/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx index 5300197eb..f6176b8b7 100644 --- a/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx +++ b/vtkm/benchmarking/BenchmarkFieldAlgorithms.cxx @@ -205,7 +205,7 @@ class GenerateEdges : public vtkm::worklet::WorkletMapPointToCell public: typedef void ControlSignature(CellSetIn cellset, WholeArrayOut<> edgeIds); typedef void ExecutionSignature(PointIndices, ThreadIndices, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const ConnectivityInVec& connectivity, @@ -234,7 +234,7 @@ public: WholeArrayIn<> inputField, FieldOut<> output); typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::Id2& low_high, @@ -321,11 +321,11 @@ using StorageListTag = ::vtkm::cont::StorageListTagBasic; template class BenchmarkFieldAlgorithms { - typedef vtkm::cont::StorageTagBasic StorageTag; + using StorageTag = vtkm::cont::StorageTagBasic; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - typedef vtkm::cont::Timer Timer; + using Timer = vtkm::cont::Timer; using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase; using InterpDynamicHandle = vtkm::cont::DynamicArrayHandleBase; diff --git a/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx b/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx index 12edb406a..ad25b9c47 100644 --- a/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx +++ b/vtkm/benchmarking/BenchmarkTopologyAlgorithms.cxx @@ -59,7 +59,7 @@ public: CellSetIn cellset, FieldOutCell<> outCells); typedef void ExecutionSignature(_1, PointCount, _3); - typedef _2 InputDomain; + using InputDomain = _2; template VTKM_EXEC void operator()(const PointValueVecType& pointValues, @@ -81,7 +81,7 @@ class AverageCellToPoint : public vtkm::worklet::WorkletMapCellToPoint public: typedef void ControlSignature(FieldInCell<> inCells, CellSetIn topology, FieldOut<> outPoints); typedef void ExecutionSignature(_1, _3, CellCount); - typedef _2 InputDomain; + using InputDomain = _2; template VTKM_EXEC void operator()(const CellVecType& cellValues, @@ -110,7 +110,7 @@ public: CellSetIn cellset, FieldOutCell outCaseId); typedef void ExecutionSignature(_1, _3); - typedef _2 InputDomain; + using InputDomain = _2; T IsoValue; @@ -123,7 +123,7 @@ public: template VTKM_EXEC void operator()(const FieldInType& fieldIn, vtkm::IdComponent& caseNumber) const { - typedef typename vtkm::VecTraits::ComponentType FieldType; + using FieldType = typename vtkm::VecTraits::ComponentType; const FieldType iso = static_cast(this->IsoValue); caseNumber = ((fieldIn[0] > iso) | (fieldIn[1] > iso) << 1 | (fieldIn[2] > iso) << 2 | @@ -143,11 +143,11 @@ using StorageListTag = ::vtkm::cont::StorageListTagBasic; template class BenchmarkTopologyAlgorithms { - typedef vtkm::cont::StorageTagBasic StorageTag; + using StorageTag = vtkm::cont::StorageTagBasic; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - typedef vtkm::cont::Timer Timer; + using Timer = vtkm::cont::Timer; using ValueDynamicHandle = vtkm::cont::DynamicArrayHandleBase; diff --git a/vtkm/cont/PointLocatorUniformGrid.h b/vtkm/cont/PointLocatorUniformGrid.h index 4af29b451..73e8d5f5c 100644 --- a/vtkm/cont/PointLocatorUniformGrid.h +++ b/vtkm/cont/PointLocatorUniformGrid.h @@ -175,7 +175,7 @@ public: template void Build(const vtkm::cont::ArrayHandle>& coords, DeviceAdapter) { - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; // generate unique id for each input point vtkm::cont::ArrayHandleCounting pointCounting(0, 1, coords.GetNumberOfValues()); Algorithm::Copy(pointCounting, PointIds); diff --git a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx index 2583dde67..7f61dffca 100644 --- a/vtkm/cont/tbb/internal/ParallelSortTBB.cxx +++ b/vtkm/cont/tbb/internal/ParallelSortTBB.cxx @@ -172,8 +172,8 @@ template - CompareInternal; + using CompareInternal = + ParallelRadixCompareInternal; ParallelRadixSortInternal(); ~ParallelRadixSortInternal(); @@ -745,14 +745,13 @@ template class KeySort { - typedef value_manager::DummyValueManager DummyValueManager; - typedef internal::ParallelRadixSortInternal - Internal; + using DummyValueManager = value_manager::DummyValueManager; + using Internal = internal::ParallelRadixSortInternal; public: void InitAndSort(PlainType* data, size_t num_elems, const CompareType& comp) @@ -772,10 +771,9 @@ template class PairSort { - typedef value_manager::PairValueManager ValueManager; - typedef internal:: - ParallelRadixSortInternal - Internal; + using ValueManager = value_manager::PairValueManager; + using Internal = internal:: + ParallelRadixSortInternal; public: void InitAndSort(PlainType* keys, ValueType* vals, size_t num_elems, const CompareType& comp) diff --git a/vtkm/cont/testing/TestingPointLocatorUniformGrid.h b/vtkm/cont/testing/TestingPointLocatorUniformGrid.h index 7a2c9fe59..77a38ba3a 100644 --- a/vtkm/cont/testing/TestingPointLocatorUniformGrid.h +++ b/vtkm/cont/testing/TestingPointLocatorUniformGrid.h @@ -79,7 +79,7 @@ template class TestingPointLocatorUniformGrid { public: - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; void TestTest() const { vtkm::Int32 nTrainingPoints = 1000; diff --git a/vtkm/exec/arg/OnBoundary.h b/vtkm/exec/arg/OnBoundary.h index 1a7d37b78..339981029 100644 --- a/vtkm/exec/arg/OnBoundary.h +++ b/vtkm/exec/arg/OnBoundary.h @@ -46,7 +46,7 @@ struct AspectTagOnBoundary struct OnBoundary : vtkm::exec::arg::ExecutionSignatureTagBase { static const vtkm::IdComponent INDEX = 1; - typedef vtkm::exec::arg::AspectTagOnBoundary AspectTag; + using AspectTag = vtkm::exec::arg::AspectTagOnBoundary; }; template diff --git a/vtkm/exec/arg/testing/UnitTestFetchArrayNeighborhoodIn.cxx b/vtkm/exec/arg/testing/UnitTestFetchArrayNeighborhoodIn.cxx index c223424de..9248e4ced 100644 --- a/vtkm/exec/arg/testing/UnitTestFetchArrayNeighborhoodIn.cxx +++ b/vtkm/exec/arg/testing/UnitTestFetchArrayNeighborhoodIn.cxx @@ -31,7 +31,7 @@ static const vtkm::Id3 POINT_DIMS = { 10, 4, 16 }; template struct TestPortal { - typedef T ValueType; + using ValueType = T; VTKM_EXEC_CONT vtkm::Id GetNumberOfValues() const { return POINT_DIMS[0] * POINT_DIMS[1] * POINT_DIMS[2]; } @@ -47,7 +47,7 @@ struct TestPortal struct TestIndexPortal { - typedef vtkm::Id ValueType; + using ValueType = vtkm::Id; VTKM_EXEC_CONT ValueType Get(vtkm::Id index) const { return index; } diff --git a/vtkm/filter/ClipWithField.h b/vtkm/filter/ClipWithField.h index 0601d4511..8837d6cf9 100644 --- a/vtkm/filter/ClipWithField.h +++ b/vtkm/filter/ClipWithField.h @@ -71,7 +71,7 @@ template <> class FilterTraits { //currently the Clip filter only works on scalar data. public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/ContourTreeUniform.h b/vtkm/filter/ContourTreeUniform.h index 1dbee0ddd..08d1fbf35 100644 --- a/vtkm/filter/ContourTreeUniform.h +++ b/vtkm/filter/ContourTreeUniform.h @@ -99,7 +99,7 @@ template <> class FilterTraits { public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; /// \brief Construct the ContourTree for a 3D Mesh @@ -127,7 +127,7 @@ template <> class FilterTraits { public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/Entropy.h b/vtkm/filter/Entropy.h index 5385d2b8f..f9d7dbb1c 100644 --- a/vtkm/filter/Entropy.h +++ b/vtkm/filter/Entropy.h @@ -57,7 +57,7 @@ template <> class FilterTraits { public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/ExtractGeometry.h b/vtkm/filter/ExtractGeometry.h index 2f36d53ab..e051fc2ad 100644 --- a/vtkm/filter/ExtractGeometry.h +++ b/vtkm/filter/ExtractGeometry.h @@ -111,7 +111,7 @@ template <> class FilterTraits { //currently the ExtractGeometry filter only works on scalar data. public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/FilterDataSet.hxx b/vtkm/filter/FilterDataSet.hxx index c735f7009..1075cbc2f 100644 --- a/vtkm/filter/FilterDataSet.hxx +++ b/vtkm/filter/FilterDataSet.hxx @@ -138,10 +138,10 @@ inline VTKM_CONT bool FilterDataSet::MapFieldOntoOutput( if (result.IsValid()) { vtkm::filter::FieldMetadata metaData(field); - typedef internal::ResolveFieldTypeAndMap FunctorType; + using FunctorType = internal::ResolveFieldTypeAndMap; FunctorType functor(static_cast(this), result, metaData, policy, valid); - typedef vtkm::filter::FilterTraits Traits; + using Traits = vtkm::filter::FilterTraits; vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker); } diff --git a/vtkm/filter/FilterDataSetWithField.hxx b/vtkm/filter/FilterDataSetWithField.hxx index 1b3981886..794fe0b1c 100644 --- a/vtkm/filter/FilterDataSetWithField.hxx +++ b/vtkm/filter/FilterDataSetWithField.hxx @@ -161,10 +161,10 @@ inline VTKM_CONT Result FilterDataSetWithField::PrepareForExecution( vtkm::filter::FieldMetadata metaData(field); Result result; - typedef internal::ResolveFieldTypeAndExecute FunctorType; + using FunctorType = internal::ResolveFieldTypeAndExecute; FunctorType functor(static_cast(this), input, metaData, policy, result); - typedef vtkm::filter::FilterTraits Traits; + using Traits = vtkm::filter::FilterTraits; vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker); return result; @@ -184,10 +184,10 @@ inline VTKM_CONT Result FilterDataSetWithField::PrepareForExecution( //determine the field type first Result result; - typedef internal::ResolveFieldTypeAndExecute FunctorType; + using FunctorType = internal::ResolveFieldTypeAndExecute; FunctorType functor(static_cast(this), input, metaData, policy, result); - typedef vtkm::filter::FilterTraits Traits; + using Traits = vtkm::filter::FilterTraits; vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker); @@ -215,7 +215,7 @@ inline VTKM_CONT bool FilterDataSetWithField::MapFieldOntoOutput( if (result.IsDataSetValid()) { vtkm::filter::FieldMetadata metaData(field); - typedef internal::ResolveFieldTypeAndMap FunctorType; + using FunctorType = internal::ResolveFieldTypeAndMap; FunctorType functor(static_cast(this), result, metaData, policy, valid); vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(field, policy), functor, this->Tracker); diff --git a/vtkm/filter/FilterField.hxx b/vtkm/filter/FilterField.hxx index ca5440633..3d7c5de12 100644 --- a/vtkm/filter/FilterField.hxx +++ b/vtkm/filter/FilterField.hxx @@ -158,10 +158,10 @@ FilterField::PrepareForExecution(const vtkm::cont::DataSet& input, vtkm::filter::FieldMetadata metaData(field); Result result; - typedef internal::ResolveFieldTypeAndExecute FunctorType; + using FunctorType = internal::ResolveFieldTypeAndExecute; FunctorType functor(static_cast(this), input, metaData, policy, result); - typedef vtkm::filter::FilterTraits Traits; + using Traits = vtkm::filter::FilterTraits; vtkm::cont::CastAndCall( vtkm::filter::ApplyPolicy(field, policy, Traits()), functor, this->Tracker); return result; @@ -181,7 +181,7 @@ FilterField::PrepareForExecution(const vtkm::cont::DataSet& input, vtkm::filter::FieldMetadata metaData(field); Result result; - typedef internal::ResolveFieldTypeAndExecute FunctorType; + using FunctorType = internal::ResolveFieldTypeAndExecute; FunctorType functor(static_cast(this), input, metaData, policy, result); vtkm::cont::CastAndCall(field, functor, this->Tracker); diff --git a/vtkm/filter/FilterTraits.h b/vtkm/filter/FilterTraits.h index 1ba23e40d..c023819d0 100644 --- a/vtkm/filter/FilterTraits.h +++ b/vtkm/filter/FilterTraits.h @@ -34,7 +34,7 @@ public: // A filter is able to state what subset of types it supports // by default. By default we use ListTagUniversal to represent that the // filter accepts all types specified by the users provided policy - typedef vtkm::ListTagUniversal InputFieldTypeList; + using InputFieldTypeList = vtkm::ListTagUniversal; }; template diff --git a/vtkm/filter/Gradient.h b/vtkm/filter/Gradient.h index fd30f248e..bbe5236e7 100644 --- a/vtkm/filter/Gradient.h +++ b/vtkm/filter/Gradient.h @@ -129,7 +129,7 @@ public: { }; - typedef TypeListTagGradientInputs InputFieldTypeList; + using InputFieldTypeList = TypeListTagGradientInputs; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/Histogram.h b/vtkm/filter/Histogram.h index 894cdcb72..c2f658e22 100644 --- a/vtkm/filter/Histogram.h +++ b/vtkm/filter/Histogram.h @@ -72,7 +72,7 @@ class FilterTraits //this mainly has to do with getting the ranges for each bin //would require returning a more complex value type public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/MarchingCubes.h b/vtkm/filter/MarchingCubes.h index 05785e682..39afaae24 100644 --- a/vtkm/filter/MarchingCubes.h +++ b/vtkm/filter/MarchingCubes.h @@ -138,7 +138,7 @@ public: : vtkm::ListTagBase { }; - typedef TypeListTagMCScalars InputFieldTypeList; + using InputFieldTypeList = TypeListTagMCScalars; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/MarchingCubes.hxx b/vtkm/filter/MarchingCubes.hxx index 8a17522f6..cc6c7b067 100644 --- a/vtkm/filter/MarchingCubes.hxx +++ b/vtkm/filter/MarchingCubes.hxx @@ -141,7 +141,7 @@ inline VTKM_CONT vtkm::filter::Result MarchingCubes::DoExecute( const vtkm::cont::CoordinateSystem& coords = input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()); - typedef vtkm::cont::ArrayHandle> Vec3HandleType; + using Vec3HandleType = vtkm::cont::ArrayHandle>; Vec3HandleType vertices; Vec3HandleType normals; diff --git a/vtkm/filter/PointElevation.h b/vtkm/filter/PointElevation.h index a28672297..f3a5cb904 100644 --- a/vtkm/filter/PointElevation.h +++ b/vtkm/filter/PointElevation.h @@ -66,7 +66,7 @@ class FilterTraits { public: //Point Elevation can only convert Float and Double Vec3 arrays - typedef vtkm::TypeListTagFieldVec3 InputFieldTypeList; + using InputFieldTypeList = vtkm::TypeListTagFieldVec3; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/PolicyBase.h b/vtkm/filter/PolicyBase.h index 466337a7e..e5520f1c5 100644 --- a/vtkm/filter/PolicyBase.h +++ b/vtkm/filter/PolicyBase.h @@ -40,15 +40,15 @@ namespace filter template struct PolicyBase { - typedef VTKM_DEFAULT_TYPE_LIST_TAG FieldTypeList; - typedef VTKM_DEFAULT_STORAGE_LIST_TAG FieldStorageList; + using FieldTypeList = VTKM_DEFAULT_TYPE_LIST_TAG; + using FieldStorageList = VTKM_DEFAULT_STORAGE_LIST_TAG; - typedef vtkm::cont::CellSetListTagStructured StructuredCellSetList; - typedef vtkm::cont::CellSetListTagUnstructured UnstructuredCellSetList; - typedef VTKM_DEFAULT_CELL_SET_LIST_TAG AllCellSetList; + using StructuredCellSetList = vtkm::cont::CellSetListTagStructured; + using UnstructuredCellSetList = vtkm::cont::CellSetListTagUnstructured; + using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST_TAG; // List of backends to try in sequence (if one fails, the next is attempted). - typedef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG DeviceAdapterList; + using DeviceAdapterList = VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG; }; //----------------------------------------------------------------------------- @@ -57,8 +57,8 @@ VTKM_CONT vtkm::cont::DynamicArrayHandleBase ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase&) { - typedef typename DerivedPolicy::FieldTypeList TypeList; - typedef typename DerivedPolicy::FieldStorageList StorageList; + using TypeList = typename DerivedPolicy::FieldTypeList; + using StorageList = typename DerivedPolicy::FieldStorageList; return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } @@ -71,10 +71,10 @@ ApplyPolicy(const vtkm::cont::Field& field, const vtkm::filter::PolicyBase&, const vtkm::filter::FilterTraits&) { - typedef - typename vtkm::filter::DeduceFilterFieldTypes::TypeList TypeList; + using TypeList = + typename vtkm::filter::DeduceFilterFieldTypes::TypeList; - typedef typename DerivedPolicy::FieldStorageList StorageList; + using StorageList = typename DerivedPolicy::FieldStorageList; return field.GetData().ResetTypeAndStorageLists(TypeList(), StorageList()); } @@ -84,7 +84,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase const vtkm::cont::DynamicCellSet& cellset, const vtkm::filter::PolicyBase&) { - typedef typename DerivedPolicy::AllCellSetList CellSetList; + using CellSetList = typename DerivedPolicy::AllCellSetList; return cellset.ResetCellSetList(CellSetList()); } @@ -94,7 +94,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase&) { - typedef typename DerivedPolicy::StructuredCellSetList CellSetList; + using CellSetList = typename DerivedPolicy::StructuredCellSetList; return cellset.ResetCellSetList(CellSetList()); } @@ -104,7 +104,7 @@ VTKM_CONT vtkm::cont::DynamicCellSetBase&) { - typedef typename DerivedPolicy::UnstructuredCellSetList CellSetList; + using CellSetList = typename DerivedPolicy::UnstructuredCellSetList; return cellset.ResetCellSetList(CellSetList()); } } diff --git a/vtkm/filter/Streamline.h b/vtkm/filter/Streamline.h index 20abae892..6c5349ade 100644 --- a/vtkm/filter/Streamline.h +++ b/vtkm/filter/Streamline.h @@ -79,7 +79,7 @@ public: : vtkm::ListTagBase, vtkm::Vec> { }; - typedef TypeListTagStreamline InputFieldTypeList; + using InputFieldTypeList = TypeListTagStreamline; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/Streamline.hxx b/vtkm/filter/Streamline.hxx index ecadb4959..1b194cf24 100644 --- a/vtkm/filter/Streamline.hxx +++ b/vtkm/filter/Streamline.hxx @@ -79,14 +79,12 @@ inline VTKM_CONT vtkm::filter::Result Streamline::DoExecute( return vtkm::filter::Result(); //todo: add check for rectilinear. - typedef vtkm::cont::ArrayHandle> FieldHandle; - typedef - typename FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; - typedef vtkm::worklet::particleadvection::UniformGridEvaluate - RGEvalType; - typedef vtkm::worklet::particleadvection::RK4Integrator RK4RGType; + using FieldHandle = vtkm::cont::ArrayHandle>; + using FieldPortalConstType = + typename FieldHandle::template ExecutionTypes::PortalConst; + using RGEvalType = + vtkm::worklet::particleadvection::UniformGridEvaluate; + using RK4RGType = vtkm::worklet::particleadvection::RK4Integrator; //RGEvalType eval(input.GetCoordinateSystem(), input.GetCellSet(0), field); RGEvalType eval(coords, cells, field); diff --git a/vtkm/filter/Threshold.h b/vtkm/filter/Threshold.h index ec80d9595..80fef774e 100644 --- a/vtkm/filter/Threshold.h +++ b/vtkm/filter/Threshold.h @@ -80,7 +80,7 @@ template <> class FilterTraits { //currently the threshold filter only works on scalar data. public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/ThresholdPoints.h b/vtkm/filter/ThresholdPoints.h index c974efb34..e85cfb51d 100644 --- a/vtkm/filter/ThresholdPoints.h +++ b/vtkm/filter/ThresholdPoints.h @@ -89,7 +89,7 @@ template <> class FilterTraits { //currently the threshold filter only works on scalar data. public: - typedef TypeListTagScalarAll InputFieldTypeList; + using InputFieldTypeList = TypeListTagScalarAll; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/VectorMagnitude.h b/vtkm/filter/VectorMagnitude.h index 3099ef756..8c0f8e0e9 100644 --- a/vtkm/filter/VectorMagnitude.h +++ b/vtkm/filter/VectorMagnitude.h @@ -50,7 +50,7 @@ template <> class FilterTraits { //currently the VectorMagnitude filter only works on vector data. public: - typedef TypeListTagVecCommon InputFieldTypeList; + using InputFieldTypeList = TypeListTagVecCommon; }; } } // namespace vtkm::filter diff --git a/vtkm/filter/VectorMagnitude.hxx b/vtkm/filter/VectorMagnitude.hxx index d688be439..d3066b617 100644 --- a/vtkm/filter/VectorMagnitude.hxx +++ b/vtkm/filter/VectorMagnitude.hxx @@ -42,7 +42,7 @@ inline VTKM_CONT vtkm::filter::Result VectorMagnitude::DoExecute( const vtkm::filter::PolicyBase&, const DeviceAdapter&) { - typedef typename detail::FloatingPointReturnType::Type ReturnType; + using ReturnType = typename detail::FloatingPointReturnType::Type; vtkm::cont::ArrayHandle outArray; vtkm::worklet::DispatcherMapField dispatcher( diff --git a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h b/vtkm/filter/internal/ResolveFieldTypeAndExecute.h index 98bf1847a..cd9b247e5 100644 --- a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h +++ b/vtkm/filter/internal/ResolveFieldTypeAndExecute.h @@ -50,7 +50,7 @@ struct ResolveFieldTypeAndExecuteForDevice template struct ResolveFieldTypeAndExecute { - typedef ResolveFieldTypeAndExecute Self; + using Self = ResolveFieldTypeAndExecute; Derived* DerivedClass; const vtkm::cont::DataSet& InputData; diff --git a/vtkm/filter/internal/ResolveFieldTypeAndMap.h b/vtkm/filter/internal/ResolveFieldTypeAndMap.h index 379aef2ae..554b65913 100644 --- a/vtkm/filter/internal/ResolveFieldTypeAndMap.h +++ b/vtkm/filter/internal/ResolveFieldTypeAndMap.h @@ -56,7 +56,7 @@ struct ResolveFieldTypeAndMapForDevice template struct ResolveFieldTypeAndMap { - typedef ResolveFieldTypeAndMap Self; + using Self = ResolveFieldTypeAndMap; Derived* DerivedClass; vtkm::filter::Result& InputResult; diff --git a/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx b/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx index bdbc88ba9..f92f9f923 100644 --- a/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx +++ b/vtkm/filter/testing/UnitTestClipWithFieldFilter.cxx @@ -27,7 +27,7 @@ namespace { -typedef vtkm::Vec Coord3D; +using Coord3D = vtkm::Vec; vtkm::cont::DataSet MakeTestDatasetExplicit() { diff --git a/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx b/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx index 1a7c0fc3d..6e8960536 100644 --- a/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx +++ b/vtkm/filter/testing/UnitTestClipWithImplicitFunctionFilter.cxx @@ -27,7 +27,7 @@ namespace { -typedef vtkm::Vec Coord3D; +using Coord3D = vtkm::Vec; vtkm::cont::DataSet MakeTestDatasetStructured() { diff --git a/vtkm/filter/testing/UnitTestEntropyFilter.cxx b/vtkm/filter/testing/UnitTestEntropyFilter.cxx index 21da3a96e..7ffe8a386 100644 --- a/vtkm/filter/testing/UnitTestEntropyFilter.cxx +++ b/vtkm/filter/testing/UnitTestEntropyFilter.cxx @@ -33,7 +33,7 @@ class TangleField : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn vertexId, FieldOut v); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; const vtkm::Id xdim, ydim, zdim; const vtkm::Float32 xmin, ymin, zmin, xmax, ymax, zmax; diff --git a/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx b/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx index 56ec5cc8a..26abb0e3d 100644 --- a/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx +++ b/vtkm/filter/testing/UnitTestMarchingCubesFilter.cxx @@ -38,7 +38,7 @@ class TangleField : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn vertexId, FieldOut v); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; const vtkm::Id xdim, ydim, zdim; const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax; @@ -167,8 +167,8 @@ public: VTKM_EXEC_CONT vtkm::Id operator()(vtkm::Id vertex) const { - typedef vtkm::CellShapeTagHexahedron HexTag; - typedef vtkm::CellTraits HexTraits; + using HexTag = vtkm::CellShapeTagHexahedron; + using HexTraits = vtkm::CellTraits; vtkm::Id cellId = vertex / HexTraits::NUM_POINTS; vtkm::Id localId = vertex % HexTraits::NUM_POINTS; @@ -208,30 +208,28 @@ private: class MakeRadiantDataSet { public: - typedef vtkm::cont::ArrayHandleUniformPointCoordinates CoordinateArrayHandle; - typedef vtkm::cont::ArrayHandleTransform - DataArrayHandle; - typedef vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity> - ConnectivityArrayHandle; - - typedef vtkm::cont::CellSetSingleType< + using CoordinateArrayHandle = vtkm::cont::ArrayHandleUniformPointCoordinates; + using DataArrayHandle = + vtkm::cont::ArrayHandleTransform; + using ConnectivityArrayHandle = vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity>::StorageTag> - CellSet; + CubeGridConnectivity>; + + using CellSet = vtkm::cont::CellSetSingleType< + vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity>::StorageTag>; vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5); }; class PolicyRadiantDataSet : public vtkm::filter::PolicyBase { - typedef MakeRadiantDataSet::DataArrayHandle DataHandleType; - typedef MakeRadiantDataSet::ConnectivityArrayHandle CountingHandleType; + using DataHandleType = MakeRadiantDataSet::DataArrayHandle; + using CountingHandleType = MakeRadiantDataSet::ConnectivityArrayHandle; - typedef vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity> - TransformHandleType; + using TransformHandleType = + vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity>; public: struct TypeListTagRadiantTypes : vtkm::ListTagBase { }; - typedef TypeListTagRadiantCellSetTypes AllCellSetList; + using AllCellSetList = TypeListTagRadiantCellSetTypes; }; inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComponent dim) @@ -256,10 +254,10 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp vtkm::cont::DataSet dataSet; - typedef vtkm::CellShapeTagHexahedron HexTag; - typedef vtkm::CellTraits HexTraits; + using HexTag = vtkm::CellShapeTagHexahedron; + using HexTraits = vtkm::CellTraits; - typedef vtkm::Vec CoordType; + using CoordType = vtkm::Vec; const vtkm::IdComponent nCells = dim * dim * dim; @@ -327,7 +325,7 @@ void TestMarchingCubesUniformGrid() vtkm::cont::CoordinateSystem coords = outputData.GetCoordinateSystem(); vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet(); - typedef vtkm::cont::CellSetSingleType<> CellSetType; + using CellSetType = vtkm::cont::CellSetSingleType<>; const CellSetType& cells = dcells.Cast(); //verify that the number of points is correct (72) @@ -351,7 +349,7 @@ void TestMarchingCubesUniformGrid() //verify that the number of cells is correct (160) vtkm::cont::DynamicCellSet dcells = outputData.GetCellSet(); - typedef vtkm::cont::CellSetSingleType<> CellSetType; + using CellSetType = vtkm::cont::CellSetSingleType<>; const CellSetType& cells = dcells.Cast(); VTKM_TEST_ASSERT(cells.GetNumberOfCells() == 160, ""); } @@ -361,7 +359,7 @@ void TestMarchingCubesCustomPolicy() { std::cout << "Testing MarchingCubes filter with custom field and cellset" << std::endl; - typedef MakeRadiantDataSet DataSetGenerator; + using DataSetGenerator = MakeRadiantDataSet; DataSetGenerator dataSetGenerator; const vtkm::IdComponent Dimension = 10; diff --git a/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx b/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx index 73439ef6d..2c97ceeb0 100644 --- a/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx +++ b/vtkm/filter/testing/UnitTestVertexClusteringFilter.cxx @@ -67,7 +67,7 @@ void TestVertexClustering() vtkm::Float32 output_cellvar[] = { 145.f, 134.f, 138.f, 140.f, 149.f, 144.f }; { - typedef vtkm::cont::CellSetSingleType<> CellSetType; + using CellSetType = vtkm::cont::CellSetSingleType<>; CellSetType cellSet; output.GetCellSet(0).CopyTo(cellSet); auto cellArray = @@ -87,7 +87,7 @@ void TestVertexClustering() vtkm::cont::printSummary_ArrayHandle(pointvar, std::cerr, true); vtkm::cont::printSummary_ArrayHandle(cellvar, std::cerr, true); - typedef vtkm::Vec PointType; + using PointType = vtkm::Vec; auto pointArray = output.GetCoordinateSystem(0).GetData(); VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points, "Number of output points mismatch"); diff --git a/vtkm/internal/ArrayPortalUniformPointCoordinates.h b/vtkm/internal/ArrayPortalUniformPointCoordinates.h index 89d86a130..bab57e005 100644 --- a/vtkm/internal/ArrayPortalUniformPointCoordinates.h +++ b/vtkm/internal/ArrayPortalUniformPointCoordinates.h @@ -33,7 +33,7 @@ namespace internal class VTKM_ALWAYS_EXPORT ArrayPortalUniformPointCoordinates { public: - typedef vtkm::Vec ValueType; + using ValueType = vtkm::Vec; VTKM_EXEC_CONT ArrayPortalUniformPointCoordinates() diff --git a/vtkm/internal/ConnectivityStructuredInternals.h b/vtkm/internal/ConnectivityStructuredInternals.h index b6af0ea08..724280a03 100644 --- a/vtkm/internal/ConnectivityStructuredInternals.h +++ b/vtkm/internal/ConnectivityStructuredInternals.h @@ -40,7 +40,7 @@ template <> class ConnectivityStructuredInternals<1> { public: - typedef vtkm::Id SchedulingRangeType; + using SchedulingRangeType = vtkm::Id; VTKM_EXEC_CONT void SetPointDimensions(vtkm::Id dimensions) { this->PointDimensions = dimensions; } @@ -75,7 +75,7 @@ public: VTKM_EXEC_CONT vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_LINE; } - typedef vtkm::CellShapeTagLine CellShapeTag; + using CellShapeTag = vtkm::CellShapeTagLine; VTKM_EXEC_CONT vtkm::Vec GetPointsOfCell(vtkm::Id index) const @@ -145,7 +145,7 @@ template <> class ConnectivityStructuredInternals<2> { public: - typedef vtkm::Id2 SchedulingRangeType; + using SchedulingRangeType = vtkm::Id2; VTKM_EXEC_CONT void SetPointDimensions(vtkm::Id2 dims) { this->PointDimensions = dims; } @@ -181,7 +181,7 @@ public: VTKM_EXEC_CONT vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_QUAD; } - typedef vtkm::CellShapeTagQuad CellShapeTag; + using CellShapeTag = vtkm::CellShapeTagQuad; VTKM_EXEC_CONT vtkm::Vec GetPointsOfCell( @@ -303,7 +303,7 @@ template <> class ConnectivityStructuredInternals<3> { public: - typedef vtkm::Id3 SchedulingRangeType; + using SchedulingRangeType = vtkm::Id3; VTKM_EXEC_CONT void SetPointDimensions(vtkm::Id3 dims) @@ -344,7 +344,7 @@ public: VTKM_EXEC_CONT vtkm::IdComponent GetCellShape() const { return vtkm::CELL_SHAPE_HEXAHEDRON; } - typedef vtkm::CellShapeTagHexahedron CellShapeTag; + using CellShapeTag = vtkm::CellShapeTagHexahedron; VTKM_EXEC_CONT vtkm::Vec GetPointsOfCell(const SchedulingRangeType& ijk) const @@ -512,12 +512,12 @@ struct ConnectivityStructuredIndexHelper { - typedef vtkm::internal::ConnectivityStructuredInternals ConnectivityType; - typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType; + using ConnectivityType = vtkm::internal::ConnectivityStructuredInternals; + using LogicalIndexType = typename ConnectivityType::SchedulingRangeType; using CellShapeTag = typename ConnectivityType::CellShapeTag; - typedef vtkm::Vec IndicesType; + using IndicesType = vtkm::Vec; VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity) { @@ -573,12 +573,12 @@ struct ConnectivityStructuredIndexHelper { - typedef vtkm::internal::ConnectivityStructuredInternals ConnectivityType; - typedef typename ConnectivityType::SchedulingRangeType LogicalIndexType; + using ConnectivityType = vtkm::internal::ConnectivityStructuredInternals; + using LogicalIndexType = typename ConnectivityType::SchedulingRangeType; using CellShapeTag = vtkm::CellShapeTagVertex; - typedef vtkm::VecVariable IndicesType; + using IndicesType = vtkm::VecVariable; VTKM_EXEC_CONT static vtkm::Id GetNumberOfElements(const ConnectivityType& connectivity) { diff --git a/vtkm/internal/FunctionInterface.h b/vtkm/internal/FunctionInterface.h index f979cef4d..5565a656c 100644 --- a/vtkm/internal/FunctionInterface.h +++ b/vtkm/internal/FunctionInterface.h @@ -234,7 +234,7 @@ class FunctionInterface friend class FunctionInterface; public: - typedef FunctionSignature Signature; + using Signature = FunctionSignature; VTKM_SUPPRESS_EXEC_WARNINGS FunctionInterface() @@ -251,16 +251,16 @@ public: } // the number of parameters as an integral constant - typedef detail::FunctionSigInfo SigInfo; - typedef typename SigInfo::ArityType SignatureArity; - typedef typename SigInfo::ResultType ResultType; - typedef typename SigInfo::Components ComponentSig; - typedef typename SigInfo::Parameters ParameterSig; + using SigInfo = detail::FunctionSigInfo; + using SignatureArity = typename SigInfo::ArityType; + using ResultType = typename SigInfo::ResultType; + using ComponentSig = typename SigInfo::Components; + using ParameterSig = typename SigInfo::Parameters; template struct ParameterType { - typedef typename detail::AtType::type type; + using type = typename detail::AtType::type; }; static const bool RETURN_VALID = FunctionInterfaceReturnContainer::VALID; @@ -474,7 +474,7 @@ public: template VTKM_CONT typename AppendType::type Append(const NewType& newParameter) const { - typedef typename detail::AppendType::type AppendSignature; + using AppendSignature = typename detail::AppendType::type; FunctionInterface appendedFuncInterface; appendedFuncInterface.Copy(*this); @@ -532,8 +532,8 @@ public: vtkm::internal::IndexTag = vtkm::internal::IndexTag()) const { - typedef - typename detail::ReplaceType::type ReplaceSigType; + using ReplaceSigType = + typename detail::ReplaceType::type; FunctionInterface replacedFuncInterface; detail::FunctionInterfaceMoveParameters::Move( @@ -549,9 +549,8 @@ public: template struct StaticTransformType { - typedef FunctionInterface< - typename detail::FunctionInterfaceStaticTransformType::type> - type; + using type = FunctionInterface< + typename detail::FunctionInterfaceStaticTransformType::type>; }; /// \brief Transforms the \c FunctionInterface based on compile-time @@ -695,11 +694,11 @@ public: VTKM_CONT void DynamicTransformCont(const TransformFunctor& transform, const FinishFunctor& finish) const { - typedef detail::FunctionInterfaceDynamicTransformContContinue - ContinueFunctorType; + using ContinueFunctorType = + detail::FunctionInterfaceDynamicTransformContContinue; FunctionInterface emptyInterface; ContinueFunctorType continueFunctor = @@ -768,7 +767,7 @@ public: template VTKM_CONT void operator()(const T& newParameter) const { - typedef typename FunctionInterface::ComponentSig NewFSigComp; + using NewFSigComp = typename FunctionInterface::ComponentSig; //Determine if we should do the next transform using appended = brigand::push_back; @@ -788,11 +787,10 @@ public: template void DoNextTransform(vtkm::internal::FunctionInterface& nextInterface) const { - typedef FunctionInterfaceDynamicTransformContContinue - NextContinueType; + using NextContinueType = FunctionInterfaceDynamicTransformContContinue; NextContinueType nextContinue = NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish); static const vtkm::IdComponent Index = @@ -806,11 +804,10 @@ private: void DoNextTransform(vtkm::internal::FunctionInterface& nextInterface, std::true_type) const { - typedef FunctionInterfaceDynamicTransformContContinue - NextContinueType; + using NextContinueType = FunctionInterfaceDynamicTransformContContinue; NextContinueType nextContinue = NextContinueType(this->OriginalInterface, nextInterface, this->Transform, this->Finish); static const vtkm::IdComponent Index = diff --git a/vtkm/internal/testing/UnitTestFunctionInterface.cxx b/vtkm/internal/testing/UnitTestFunctionInterface.cxx index e697d3b05..a4f9c1d99 100644 --- a/vtkm/internal/testing/UnitTestFunctionInterface.cxx +++ b/vtkm/internal/testing/UnitTestFunctionInterface.cxx @@ -35,19 +35,19 @@ namespace { -typedef vtkm::Id Type1; +using Type1 = vtkm::Id; const Type1 Arg1 = 1234; -typedef vtkm::Float64 Type2; +using Type2 = vtkm::Float64; const Type2 Arg2 = 5678.125; -typedef std::string Type3; +using Type3 = std::string; const Type3 Arg3("Third argument"); -typedef vtkm::Vec Type4; +using Type4 = vtkm::Vec; const Type4 Arg4(1.2f, 3.4f, 5.6f); -typedef vtkm::Id3 Type5; +using Type5 = vtkm::Id3; const Type5 Arg5(4, 5, 6); struct ThreeArgFunctor @@ -79,7 +79,7 @@ struct GetReferenceFunctor template struct ReturnType { - typedef const typename std::remove_reference::type* type; + using type = const typename std::remove_reference::type*; }; template @@ -94,7 +94,7 @@ struct PointerTransform template struct ReturnType { - typedef const T* type; + using type = const T*; }; template @@ -405,7 +405,7 @@ void TestStaticTransform() OriginalType funcInterface = vtkm::internal::make_FunctionInterface(Arg1, Arg2, Arg3); std::cout << "Transform with reported type." << std::endl; - typedef OriginalType::StaticTransformType::type ReportedType; + using ReportedType = OriginalType::StaticTransformType::type; ReportedType funcInterfaceTransform1 = funcInterface.StaticTransformCont(PointerTransform()); funcInterfaceTransform1.InvokeCont(ThreePointerArgFunctor()); funcInterfaceTransform1 = funcInterface.StaticTransformExec(PointerTransform()); diff --git a/vtkm/interop/cuda/internal/TransferToOpenGL.h b/vtkm/interop/cuda/internal/TransferToOpenGL.h index 40c6405d0..94df9f427 100644 --- a/vtkm/interop/cuda/internal/TransferToOpenGL.h +++ b/vtkm/interop/cuda/internal/TransferToOpenGL.h @@ -131,7 +131,7 @@ private: template class TransferToOpenGL { - typedef vtkm::cont::DeviceAdapterTagCuda DeviceAdapterTag; + using DeviceAdapterTag = vtkm::cont::DeviceAdapterTagCuda; public: VTKM_CONT explicit TransferToOpenGL(BufferState& state) diff --git a/vtkm/interop/internal/BufferTypePicker.h b/vtkm/interop/internal/BufferTypePicker.h index 69a9010d9..64fc8f8e4 100644 --- a/vtkm/interop/internal/BufferTypePicker.h +++ b/vtkm/interop/internal/BufferTypePicker.h @@ -75,7 +75,7 @@ static inline VTKM_CONT GLenum BufferTypePicker(vtkm::UInt64) template static inline VTKM_CONT GLenum BufferTypePicker(T) { - typedef vtkm::TypeTraits Traits; + using Traits = vtkm::TypeTraits; return detail::BufferTypePickerImpl(typename Traits::NumericTag(), typename Traits::DimensionalityTag()); } diff --git a/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx b/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx index 35670977f..ceb176a58 100644 --- a/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx +++ b/vtkm/interop/internal/testing/UnitTestBufferTypePicker.cxx @@ -28,8 +28,8 @@ void TestBufferTypePicker() { //just verify that certain types match GLenum type; - typedef unsigned int vtkmUint; - typedef vtkm::FloatDefault T; + using vtkmUint = unsigned int; + using T = vtkm::FloatDefault; type = vtkm::interop::internal::BufferTypePicker(vtkm::Id()); VTKM_TEST_ASSERT(type == GL_ELEMENT_ARRAY_BUFFER, "Bad OpenGL Buffer Type"); diff --git a/vtkm/interop/testing/TestingOpenGLInterop.h b/vtkm/interop/testing/TestingOpenGLInterop.h index 284f7891c..70dbc39a3 100644 --- a/vtkm/interop/testing/TestingOpenGLInterop.h +++ b/vtkm/interop/testing/TestingOpenGLInterop.h @@ -53,7 +53,7 @@ private: template static vtkm::cont::ArrayHandle FillArray(std::vector& data, std::size_t length) { - typedef typename std::vector::iterator iterator; + using iterator = typename std::vector::iterator; //make sure the data array is exactly the right length data.clear(); data.resize(length); diff --git a/vtkm/testing/TestingMath.h b/vtkm/testing/TestingMath.h index 5e8a557e4..a3f7a70d8 100644 --- a/vtkm/testing/TestingMath.h +++ b/vtkm/testing/TestingMath.h @@ -332,8 +332,8 @@ struct TryScalarFieldTests template struct ScalarVectorFieldTests : public vtkm::exec::FunctorBase { - typedef vtkm::VecTraits Traits; - typedef typename Traits::ComponentType ComponentType; + using Traits = vtkm::VecTraits; + using ComponentType = typename Traits::ComponentType; enum { NUM_COMPONENTS = Traits::NUM_COMPONENTS @@ -696,7 +696,7 @@ struct AllTypesTests : public vtkm::exec::FunctorBase VTKM_MATH_ASSERT(test_equal(vtkm::Max(low, high), high), "Wrong max."); VTKM_MATH_ASSERT(test_equal(vtkm::Max(high, low), high), "Wrong max."); - typedef vtkm::VecTraits Traits; + using Traits = vtkm::VecTraits; T mixed1 = low; T mixed2 = high; Traits::SetComponent(mixed1, 0, Traits::GetComponent(high, 0)); diff --git a/vtkm/testing/UnitTestBounds.cxx b/vtkm/testing/UnitTestBounds.cxx index 43b3b369c..1cab9dc36 100644 --- a/vtkm/testing/UnitTestBounds.cxx +++ b/vtkm/testing/UnitTestBounds.cxx @@ -27,7 +27,7 @@ namespace void TestBounds() { - typedef vtkm::Vec Vec3; + using Vec3 = vtkm::Vec; std::cout << "Empty bounds." << std::endl; vtkm::Bounds emptyBounds; diff --git a/vtkm/testing/UnitTestMatrix.cxx b/vtkm/testing/UnitTestMatrix.cxx index 0bdd0cd8b..249157fe4 100644 --- a/vtkm/testing/UnitTestMatrix.cxx +++ b/vtkm/testing/UnitTestMatrix.cxx @@ -33,7 +33,7 @@ vtkm::Matrix TestValue(vtkm::Id index, const vtkm::Matrix value; for (vtkm::IdComponent rowIndex = 0; rowIndex < NumRow; rowIndex++) { - typedef vtkm::Vec RowType; + using RowType = vtkm::Vec; RowType row = TestValue(index, RowType()) + RowType(static_cast(10 * rowIndex)); vtkm::MatrixSetRow(value, rowIndex, row); @@ -53,8 +53,8 @@ struct MatrixTest { static const vtkm::IdComponent NUM_ROWS = NumRow; static const vtkm::IdComponent NUM_COLS = NumCol; - typedef vtkm::Matrix MatrixType; - typedef typename MatrixType::ComponentType ComponentType; + using MatrixType = vtkm::Matrix; + using ComponentType = typename MatrixType::ComponentType; static void BasicCreation() { @@ -94,8 +94,8 @@ struct MatrixTest static void RowColAccessors() { - typedef vtkm::Vec ColumnType; - typedef vtkm::Vec RowType; + using ColumnType = vtkm::Vec; + using RowType = vtkm::Vec; const MatrixType const_matrix = TestValue(0, MatrixType()); MatrixType matrix; @@ -373,7 +373,7 @@ template struct SquareMatrixTest { static const vtkm::IdComponent SIZE = Size; - typedef vtkm::Matrix MatrixType; + using MatrixType = vtkm::Matrix; static void CheckMatrixSize() { @@ -582,7 +582,7 @@ struct VectorMultFunctor // This is mostly to make sure the compile can convert from Tuples // to vectors. const int SIZE = vtkm::VecTraits::NUM_COMPONENTS; - typedef typename vtkm::VecTraits::ComponentType ComponentType; + using ComponentType = typename vtkm::VecTraits::ComponentType; vtkm::Matrix matrix(0); VectorType inVec; diff --git a/vtkm/testing/UnitTestNewtonsMethod.cxx b/vtkm/testing/UnitTestNewtonsMethod.cxx index 3c7f6c721..72087fc7b 100644 --- a/vtkm/testing/UnitTestNewtonsMethod.cxx +++ b/vtkm/testing/UnitTestNewtonsMethod.cxx @@ -36,7 +36,7 @@ namespace template struct EvaluateFunctions { - typedef vtkm::Vec Vector3; + using Vector3 = vtkm::Vec; VTKM_EXEC_CONT Vector3 operator()(Vector3 x) const @@ -51,8 +51,8 @@ struct EvaluateFunctions template struct EvaluateJacobian { - typedef vtkm::Vec Vector3; - typedef vtkm::Matrix Matrix3x3; + using Vector3 = vtkm::Vec; + using Matrix3x3 = vtkm::Matrix; VTKM_EXEC_CONT Matrix3x3 operator()(Vector3 x) const @@ -76,7 +76,7 @@ void TestNewtonsMethodTemplate() { std::cout << "Testing Newton's Method." << std::endl; - typedef vtkm::Vec Vector3; + using Vector3 = vtkm::Vec; Vector3 desiredOutput(1, 1, 1); Vector3 expected1(2.0f / 3.0f, -1.0f / 3.0f, -2.0f / 3.0f); diff --git a/vtkm/testing/UnitTestTransform3D.cxx b/vtkm/testing/UnitTestTransform3D.cxx index dd5daf462..70303ff1a 100644 --- a/vtkm/testing/UnitTestTransform3D.cxx +++ b/vtkm/testing/UnitTestTransform3D.cxx @@ -43,8 +43,8 @@ struct TransformTests T RandomNum() { return this->RandomDistribution(g_RandomGenerator); } - typedef vtkm::Vec Vec; - typedef vtkm::Matrix Transform; + using Vec = vtkm::Vec; + using Transform = vtkm::Matrix; Vec RandomVector() { diff --git a/vtkm/testing/UnitTestTypeListTag.cxx b/vtkm/testing/UnitTestTypeListTag.cxx index 5dd0c264b..979066152 100644 --- a/vtkm/testing/UnitTestTypeListTag.cxx +++ b/vtkm/testing/UnitTestTypeListTag.cxx @@ -32,7 +32,7 @@ namespace class TypeSet { - typedef std::set NameSetType; + using NameSetType = std::set; NameSetType NameSet; public: diff --git a/vtkm/testing/UnitTestTypeTraits.cxx b/vtkm/testing/UnitTestTypeTraits.cxx index 80280cafb..b830dcebe 100644 --- a/vtkm/testing/UnitTestTypeTraits.cxx +++ b/vtkm/testing/UnitTestTypeTraits.cxx @@ -58,7 +58,7 @@ private: void TestNumeric(T, vtkm::TypeTraitsIntegerTag) const { std::cout << " integer" << std::endl; - typedef typename vtkm::VecTraits::ComponentType VT; + using VT = typename vtkm::VecTraits::ComponentType; VT value = VT(2.001); VTKM_TEST_ASSERT(value == 2, "Integer does not round to integer."); } @@ -66,7 +66,7 @@ private: void TestNumeric(T, vtkm::TypeTraitsRealTag) const { std::cout << " real" << std::endl; - typedef typename vtkm::VecTraits::ComponentType VT; + using VT = typename vtkm::VecTraits::ComponentType; VT value = VT(2.001); VTKM_TEST_ASSERT(test_equal(float(value), float(2.001)), "Real does not hold floaing point number."); diff --git a/vtkm/testing/UnitTestTypes.cxx b/vtkm/testing/UnitTestTypes.cxx index e5dcb0030..acce6cd54 100644 --- a/vtkm/testing/UnitTestTypes.cxx +++ b/vtkm/testing/UnitTestTypes.cxx @@ -45,7 +45,7 @@ void CheckTypeSizes() template void DoGeneralVecTypeTestNegate(const vtkm::Vec&) { - typedef vtkm::Vec VectorType; + using VectorType = vtkm::Vec; for (vtkm::Id valueIndex = 0; valueIndex < 10; valueIndex++) { VectorType original = TestValue(valueIndex, VectorType()); @@ -321,7 +321,7 @@ void GeneralVecTypeTest(const vtkm::Vec&) { std::cout << "Checking general Vec functionality." << std::endl; - typedef vtkm::Vec T; + using T = vtkm::Vec; // Vector types should preserve the trivial properties of their components. // This insures that algorithms like std::copy will optimize fully. @@ -445,7 +445,7 @@ void TypeTest(const vtkm::Vec&) template void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + using Vector = vtkm::Vec; GeneralVecTypeTest(Vector()); @@ -506,7 +506,7 @@ void TypeTest(const vtkm::Vec&) template void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + using Vector = vtkm::Vec; GeneralVecTypeTest(Vector()); @@ -568,7 +568,7 @@ void TypeTest(const vtkm::Vec&) template void TypeTest(const vtkm::Vec&) { - typedef vtkm::Vec Vector; + using Vector = vtkm::Vec; GeneralVecTypeTest(Vector()); diff --git a/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx b/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx index 450340899..36e0ce922 100644 --- a/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx +++ b/vtkm/testing/UnitTestVecAxisAlignedPointCoordinates.cxx @@ -25,7 +25,7 @@ namespace { -typedef vtkm::Vec Vec3; +using Vec3 = vtkm::Vec; static const Vec3 g_Origin = Vec3(1.0f, 2.0f, 3.0f); static const Vec3 g_Spacing = Vec3(4.0f, 5.0f, 6.0f); @@ -79,9 +79,9 @@ template void TryVecAxisAlignedPointCoordinates( const vtkm::VecAxisAlignedPointCoordinates& coords) { - typedef vtkm::VecAxisAlignedPointCoordinates VecCoordsType; - typedef vtkm::TypeTraits TTraits; - typedef vtkm::VecTraits VTraits; + using VecCoordsType = vtkm::VecAxisAlignedPointCoordinates; + using TTraits = vtkm::TypeTraits; + using VTraits = vtkm::VecTraits; std::cout << "Check traits tags." << std::endl; CheckNumericTag(typename TTraits::NumericTag()); diff --git a/vtkm/testing/UnitTestVecFromPortal.cxx b/vtkm/testing/UnitTestVecFromPortal.cxx index 57f6520a6..dbafe3d03 100644 --- a/vtkm/testing/UnitTestVecFromPortal.cxx +++ b/vtkm/testing/UnitTestVecFromPortal.cxx @@ -37,7 +37,7 @@ template class TestPortal { public: - typedef T ValueType; + using ValueType = T; VTKM_EXEC vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } @@ -51,10 +51,10 @@ struct VecFromPortalTestFunctor template void operator()(T) const { - typedef TestPortal PortalType; - typedef vtkm::VecFromPortal VecType; - typedef vtkm::TypeTraits TTraits; - typedef vtkm::VecTraits VTraits; + using PortalType = TestPortal; + using VecType = vtkm::VecFromPortal; + using TTraits = vtkm::TypeTraits; + using VTraits = vtkm::VecTraits; std::cout << "Checking VecFromPortal traits" << std::endl; diff --git a/vtkm/testing/UnitTestVecFromPortalPermute.cxx b/vtkm/testing/UnitTestVecFromPortalPermute.cxx index 817cf060c..600565f8d 100644 --- a/vtkm/testing/UnitTestVecFromPortalPermute.cxx +++ b/vtkm/testing/UnitTestVecFromPortalPermute.cxx @@ -39,7 +39,7 @@ template class TestPortal { public: - typedef T ValueType; + using ValueType = T; VTKM_EXEC vtkm::Id GetNumberOfValues() const { return ARRAY_SIZE; } @@ -53,11 +53,11 @@ struct VecFromPortalPermuteTestFunctor template void operator()(T) const { - typedef TestPortal PortalType; - typedef vtkm::VecVariable IndexVecType; - typedef vtkm::VecFromPortalPermute VecType; - typedef vtkm::TypeTraits TTraits; - typedef vtkm::VecTraits VTraits; + using PortalType = TestPortal; + using IndexVecType = vtkm::VecVariable; + using VecType = vtkm::VecFromPortalPermute; + using TTraits = vtkm::TypeTraits; + using VTraits = vtkm::VecTraits; std::cout << "Checking VecFromPortal traits" << std::endl; diff --git a/vtkm/testing/UnitTestVecTraits.cxx b/vtkm/testing/UnitTestVecTraits.cxx index 23064d5cf..78cf883ca 100644 --- a/vtkm/testing/UnitTestVecTraits.cxx +++ b/vtkm/testing/UnitTestVecTraits.cxx @@ -32,8 +32,8 @@ struct TestVecTypeFunctor template void operator()(const T&) const { - typedef vtkm::VecTraits Traits; - typedef typename Traits::ComponentType ComponentType; + using Traits = vtkm::VecTraits; + using ComponentType = typename Traits::ComponentType; VTKM_TEST_ASSERT(Traits::NUM_COMPONENTS <= MAX_VECTOR_SIZE, "Need to update test for larger vectors."); T inVector; diff --git a/vtkm/testing/UnitTestVecVariable.cxx b/vtkm/testing/UnitTestVecVariable.cxx index 9a9df1716..da7171ba8 100644 --- a/vtkm/testing/UnitTestVecVariable.cxx +++ b/vtkm/testing/UnitTestVecVariable.cxx @@ -63,10 +63,10 @@ struct VecVariableTestFunctor void operator()(T) const { static const vtkm::IdComponent SIZE = 5; - typedef vtkm::Vec VecType; - typedef vtkm::VecVariable VecVariableType; - typedef vtkm::TypeTraits TTraits; - typedef vtkm::VecTraits VTraits; + using VecType = vtkm::Vec; + using VecVariableType = vtkm::VecVariable; + using TTraits = vtkm::TypeTraits; + using VTraits = vtkm::VecTraits; std::cout << "Check NumericTag." << std::endl; this->CheckNumericTag(typename TTraits::NumericTag(), diff --git a/vtkm/testing/UnitTestVectorAnalysis.cxx b/vtkm/testing/UnitTestVectorAnalysis.cxx index d6e8ffa81..c216398ea 100644 --- a/vtkm/testing/UnitTestVectorAnalysis.cxx +++ b/vtkm/testing/UnitTestVectorAnalysis.cxx @@ -38,7 +38,7 @@ namespace internal template typename vtkm::VecTraits::ComponentType MyMag(const VectorType& vt) { - typedef vtkm::VecTraits Traits; + using Traits = vtkm::VecTraits; double total = 0.0; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index) { @@ -50,7 +50,7 @@ typename vtkm::VecTraits::ComponentType MyMag(const VectorType& vt) template VectorType MyNormal(const VectorType& vt) { - typedef vtkm::VecTraits Traits; + using Traits = vtkm::VecTraits; typename Traits::ComponentType mag = internal::MyMag(vt); VectorType temp = vt; for (vtkm::IdComponent index = 0; index < Traits::NUM_COMPONENTS; ++index) @@ -70,7 +70,7 @@ T MyLerp(const T& a, const T& b, const W& w) template void TestVector(const VectorType& vector) { - typedef typename vtkm::VecTraits::ComponentType ComponentType; + using ComponentType = typename vtkm::VecTraits::ComponentType; std::cout << "Testing " << vector << std::endl; @@ -127,7 +127,7 @@ void TestCross(const vtkm::Vec& x, const vtkm::Vec& y) { std::cout << "Testing " << x << " x " << y << std::endl; - typedef vtkm::Vec Vec3; + using Vec3 = vtkm::Vec; Vec3 cross = vtkm::Cross(x, y); std::cout << " = " << cross << std::endl; @@ -163,9 +163,9 @@ struct TestLinearFunctor template void operator()(const T&) const { - typedef vtkm::VecTraits Traits; + using Traits = vtkm::VecTraits; const vtkm::IdComponent NUM_COMPONENTS = Traits::NUM_COMPONENTS; - typedef typename Traits::ComponentType ComponentType; + using ComponentType = typename Traits::ComponentType; T zeroVector = T(ComponentType(0)); T normalizedVector = T(vtkm::RSqrt(ComponentType(NUM_COMPONENTS))); diff --git a/vtkm/worklet/AverageByKey.h b/vtkm/worklet/AverageByKey.h index 1775905b3..c6ae53abe 100644 --- a/vtkm/worklet/AverageByKey.h +++ b/vtkm/worklet/AverageByKey.h @@ -109,7 +109,7 @@ struct AverageByKey template VTKM_EXEC void operator()(const ValueType& v, const vtkm::Id& count, ValueType& vout) const { - typedef typename VecTraits::ComponentType ComponentType; + using ComponentType = typename VecTraits::ComponentType; vout = v * ComponentType(1. / static_cast(count)); } @@ -143,10 +143,10 @@ struct AverageByKey vtkm::cont::ArrayHandle& outputValueArray, DeviceAdapter) { - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; - typedef vtkm::cont::ArrayHandle ValueInArray; - typedef vtkm::cont::ArrayHandle IdArray; - typedef vtkm::cont::ArrayHandle ValueArray; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; + using ValueInArray = vtkm::cont::ArrayHandle; + using IdArray = vtkm::cont::ArrayHandle; + using ValueArray = vtkm::cont::ArrayHandle; // sort the indexed array vtkm::cont::ArrayHandleIndex indexArray(keyArray.GetNumberOfValues()); @@ -158,12 +158,12 @@ struct AverageByKey Algorithm::SortByKey(keyArraySorted, indexArraySorted, vtkm::SortLess()); // generate permultation array based on the indexes - typedef vtkm::cont::ArrayHandlePermutation PermutatedValueArray; + using PermutatedValueArray = vtkm::cont::ArrayHandlePermutation; PermutatedValueArray valueArraySorted = vtkm::cont::make_ArrayHandlePermutation(indexArraySorted, valueArray); // reduce both sumArray and countArray by key - typedef vtkm::cont::ArrayHandleConstant ConstIdArray; + using ConstIdArray = vtkm::cont::ArrayHandleConstant; ConstIdArray constOneArray(1, valueArray.GetNumberOfValues()); IdArray countArray; ValueArray sumArray; diff --git a/vtkm/worklet/CellAverage.h b/vtkm/worklet/CellAverage.h index 96544e6af..4072f5e8c 100644 --- a/vtkm/worklet/CellAverage.h +++ b/vtkm/worklet/CellAverage.h @@ -38,7 +38,7 @@ public: FieldInPoint<> inPoints, FieldOutCell<> outCells); typedef void ExecutionSignature(PointCount, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::IdComponent& numPoints, diff --git a/vtkm/worklet/Clip.h b/vtkm/worklet/Clip.h index faf0ccffd..ab1d8aa6d 100644 --- a/vtkm/worklet/Clip.h +++ b/vtkm/worklet/Clip.h @@ -70,15 +70,14 @@ template class ExecutionConnectivityExplicit : vtkm::exec::ExecutionObjectBase { private: - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - UInt8Portal; + using UInt8Portal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::Portal IdComponentPortal; + using IdComponentPortal = typename vtkm::cont::ArrayHandle< + vtkm::IdComponent>::template ExecutionTypes::Portal; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - IdPortal; + using IdPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; public: VTKM_CONT @@ -187,7 +186,7 @@ public: template class ComputeStats : public vtkm::worklet::WorkletMapPointToCell { - typedef internal::ClipTables::DevicePortal ClipTablesPortal; + using ClipTablesPortal = internal::ClipTables::DevicePortal; public: typedef void ControlSignature(CellSetIn cellset, @@ -250,7 +249,7 @@ public: template class GenerateCellSet : public vtkm::worklet::WorkletMapPointToCell { - typedef internal::ClipTables::DevicePortal ClipTablesPortal; + using ClipTablesPortal = internal::ClipTables::DevicePortal; public: struct EdgeInterp : vtkm::ListTagBase @@ -364,13 +363,12 @@ public: template class AmendConnectivity : public vtkm::exec::FunctorBase { - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - IdPortal; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst IdPortalConst; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst EdgeInterpolationPortalConst; + using IdPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; + using IdPortalConst = typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst; + using EdgeInterpolationPortalConst = typename vtkm::cont::ArrayHandle< + EdgeInterpolation>::template ExecutionTypes::PortalConst; public: VTKM_CONT @@ -436,9 +434,9 @@ public: vtkm::Float64 value, DeviceAdapter device) { - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; - typedef internal::ClipTables::DevicePortal ClipTablesPortal; + using ClipTablesPortal = internal::ClipTables::DevicePortal; ClipTablesPortal clipTablesDevicePortal = this->ClipTablesInstance.GetDevicePortal(device); // Step 1. compute counts for the elements of the cell set data structure @@ -575,11 +573,11 @@ public: class Kernel : public vtkm::exec::FunctorBase { public: - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - FieldPortal; + using FieldPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst EdgeInterpolationPortalConst; + using EdgeInterpolationPortalConst = typename vtkm::cont::ArrayHandle< + EdgeInterpolation>::template ExecutionTypes::PortalConst; VTKM_CONT Kernel(EdgeInterpolationPortalConst interpolation, @@ -620,7 +618,7 @@ public: template VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& field) const { - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id count = this->InterpolationArray.GetNumberOfValues(); diff --git a/vtkm/worklet/DispatcherMapField.h b/vtkm/worklet/DispatcherMapField.h index b79c8fc42..14356a0e9 100644 --- a/vtkm/worklet/DispatcherMapField.h +++ b/vtkm/worklet/DispatcherMapField.h @@ -37,10 +37,10 @@ class DispatcherMapField WorkletType, vtkm::worklet::WorkletMapField> { - typedef vtkm::worklet::internal::DispatcherBase, - WorkletType, - vtkm::worklet::WorkletMapField> - Superclass; + using Superclass = + vtkm::worklet::internal::DispatcherBase, + WorkletType, + vtkm::worklet::WorkletMapField>; public: VTKM_CONT @@ -53,7 +53,7 @@ public: VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain - typedef typename Invocation::InputDomainType InputDomainType; + using InputDomainType = typename Invocation::InputDomainType; // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. diff --git a/vtkm/worklet/DispatcherMapTopology.h b/vtkm/worklet/DispatcherMapTopology.h index ad1d2ade2..f7fbffd65 100644 --- a/vtkm/worklet/DispatcherMapTopology.h +++ b/vtkm/worklet/DispatcherMapTopology.h @@ -38,10 +38,10 @@ class DispatcherMapTopology WorkletType, vtkm::worklet::detail::WorkletMapTopologyBase> { - typedef vtkm::worklet::internal::DispatcherBase, - WorkletType, - vtkm::worklet::detail::WorkletMapTopologyBase> - Superclass; + using Superclass = + vtkm::worklet::internal::DispatcherBase, + WorkletType, + vtkm::worklet::detail::WorkletMapTopologyBase>; public: VTKM_CONT @@ -54,7 +54,7 @@ public: VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain - typedef typename Invocation::InputDomainType InputDomainType; + using InputDomainType = typename Invocation::InputDomainType; // If you get a compile error on this line, then you have tried to use // something that is not a vtkm::cont::CellSet as the input domain to a diff --git a/vtkm/worklet/DispatcherStreamingMapField.h b/vtkm/worklet/DispatcherStreamingMapField.h index 0ece969de..2fe7fc356 100644 --- a/vtkm/worklet/DispatcherStreamingMapField.h +++ b/vtkm/worklet/DispatcherStreamingMapField.h @@ -59,21 +59,21 @@ struct DispatcherStreamingMapFieldTransformFunctor template struct DetermineReturnType { - typedef vtkm::cont::ArrayHandleStreaming type; + using type = vtkm::cont::ArrayHandleStreaming; }; template struct DetermineReturnType { - typedef NotArrayHandleType type; + using type = NotArrayHandleType; }; template struct ReturnType { - typedef typename DetermineReturnType< + using type = typename DetermineReturnType< ParameterType, - vtkm::cont::internal::ArrayHandleCheck::type::value>::type type; + vtkm::cont::internal::ArrayHandleCheck::type::value>::type; }; template @@ -125,7 +125,7 @@ struct DispatcherStreamingMapFieldTransferFunctor template struct ReturnType { - typedef ParameterType type; + using type = ParameterType; }; template @@ -169,10 +169,10 @@ class DispatcherStreamingMapField WorkletType, vtkm::worklet::WorkletMapField> { - typedef vtkm::worklet::internal::DispatcherBase, - WorkletType, - vtkm::worklet::WorkletMapField> - Superclass; + using Superclass = + vtkm::worklet::internal::DispatcherBase, + WorkletType, + vtkm::worklet::WorkletMapField>; public: VTKM_CONT @@ -202,7 +202,7 @@ public: VTKM_CONT void DoInvoke(const Invocation& invocation) const { // This is the type for the input domain - typedef typename Invocation::InputDomainType InputDomainType; + using InputDomainType = typename Invocation::InputDomainType; // We can pull the input domain parameter (the data specifying the input // domain) from the invocation object. @@ -217,12 +217,12 @@ public: if (fullSize % NumberOfBlocks != 0) blockSize += 1; - typedef detail:: - DispatcherStreamingMapFieldTransformFunctor - TransformFunctorType; - typedef detail:: - DispatcherStreamingMapFieldTransferFunctor - TransferFunctorType; + using TransformFunctorType = + detail::DispatcherStreamingMapFieldTransformFunctor; + using TransferFunctorType = + detail::DispatcherStreamingMapFieldTransferFunctor; for (vtkm::Id block = 0; block < NumberOfBlocks; block++) { @@ -232,20 +232,19 @@ public: numberOfInstances = fullSize - blockSize * block; vtkm::Id globalIndexOffset = blockSize * block; - typedef typename Invocation::ParameterInterface ParameterInterfaceType; - typedef - typename ParameterInterfaceType::template StaticTransformType::type - ReportedType; + using ParameterInterfaceType = typename Invocation::ParameterInterface; + using ReportedType = + typename ParameterInterfaceType::template StaticTransformType::type; ReportedType newParams = invocation.Parameters.StaticTransformCont( TransformFunctorType(block, blockSize, numberOfInstances, fullSize)); - typedef typename Invocation::template ChangeParametersType::type ChangedType; + using ChangedType = typename Invocation::template ChangeParametersType::type; ChangedType changedParams = invocation.ChangeParameters(newParams); this->BasicInvoke(changedParams, numberOfInstances, globalIndexOffset, Device()); // Loop over parameters again to sync results for this block into control array - typedef typename ChangedType::ParameterInterface ParameterInterfaceType2; + using ParameterInterfaceType2 = typename ChangedType::ParameterInterface; const ParameterInterfaceType2& parameters2 = changedParams.Parameters; parameters2.StaticTransformCont(TransferFunctorType()); } @@ -262,17 +261,15 @@ private: const OutputRangeType& outputRange, DeviceAdapter device) const { - typedef typename Invocation::ParameterInterface ParameterInterfaceType; + using ParameterInterfaceType = typename Invocation::ParameterInterface; const ParameterInterfaceType& parameters = invocation.Parameters; - typedef vtkm::worklet::internal::detail::DispatcherBaseTransportFunctor< + using TransportFunctorType = vtkm::worklet::internal::detail::DispatcherBaseTransportFunctor< typename Invocation::ControlInterface, typename Invocation::InputDomainType, - DeviceAdapter> - TransportFunctorType; - typedef - typename ParameterInterfaceType::template StaticTransformType::type - ExecObjectParameters; + DeviceAdapter>; + using ExecObjectParameters = + typename ParameterInterfaceType::template StaticTransformType::type; ExecObjectParameters execObjectParameters = parameters.StaticTransformCont( TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange)); diff --git a/vtkm/worklet/ExternalFaces.h b/vtkm/worklet/ExternalFaces.h index 733d2a6e3..c0e89b41a 100644 --- a/vtkm/worklet/ExternalFaces.h +++ b/vtkm/worklet/ExternalFaces.h @@ -62,7 +62,7 @@ struct ExternalFaces FieldOut<> numFacesInCell, FieldInPoint pointCoordinates); typedef _2 ExecutionSignature(CellShape, _3); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_CONT NumExternalFacesPerStructuredCell(const vtkm::Vec& min_point, @@ -137,7 +137,7 @@ struct ExternalFaces FieldOut<> faceConnectivity, FieldInPoint pointCoordinates); typedef void ExecutionSignature(CellShape, VisitIndex, InputIndex, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; using ScatterType = vtkm::worklet::ScatterCounting; @@ -334,7 +334,7 @@ struct ExternalFaces public: typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numFacesInCell); typedef _2 ExecutionSignature(CellShape); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const @@ -352,7 +352,7 @@ struct ExternalFaces FieldOut<> originCells, FieldOut<> originFaces); typedef void ExecutionSignature(_2, _3, _4, CellShape, FromIndices, InputIndex, VisitIndex); - typedef _1 InputDomain; + using InputDomain = _1; using ScatterType = vtkm::worklet::ScatterCounting; @@ -631,7 +631,7 @@ public: public: typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> isPolyDataCell); typedef _2 ExecutionSignature(CellShape); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC vtkm::IdComponent operator()(CellShapeTag shape) const @@ -663,7 +663,7 @@ public: typedef void ControlSignature(CellSetIn inCellSet, FieldOut<> numPoints); typedef _2 ExecutionSignature(PointCount); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_EXEC vtkm::Id operator()(vtkm::Id count) const { return count; } private: @@ -792,9 +792,9 @@ public: vtkm::Id3 PointDimensions = inCellSet.GetPointDimensions(); - typedef vtkm::cont::ArrayHandle DefaultHandle; - typedef vtkm::cont::ArrayHandleCartesianProduct - CartesianArrayHandle; + using DefaultHandle = vtkm::cont::ArrayHandle; + using CartesianArrayHandle = + vtkm::cont::ArrayHandleCartesianProduct; auto coordData = coord.GetData(); if (coordData.IsType()) @@ -837,7 +837,7 @@ public: numExternalFacesDispatcher.Invoke(inCellSet, numExternalFaces, coordData); - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id numberOfExternalFaces = DeviceAlgorithms::Reduce(numExternalFaces, 0, vtkm::Sum()); vtkm::worklet::ScatterCounting scatterCellToExternalFace(numExternalFaces, DeviceAdapter()); @@ -1017,7 +1017,7 @@ public: else { // Join poly data to face data output - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandleConcatenate faceShapesArray( faceShapes, polyDataShapes); @@ -1035,8 +1035,8 @@ public: DeviceAlgorithm::Copy(connectivityArray, joinedConnectivity); // Adjust poly data offsets array with face connectivity size before join - typedef vtkm::cont::ArrayHandleTransform> - TransformBiasArrayType; + using TransformBiasArrayType = + vtkm::cont::ArrayHandleTransform>; TransformBiasArrayType adjustedPolyDataOffsets = vtkm::cont::make_ArrayHandleTransform( polyDataOffsets, BiasFunctor(faceConnectivity.GetNumberOfValues())); diff --git a/vtkm/worklet/ExtractGeometry.h b/vtkm/worklet/ExtractGeometry.h index c744d61a8..6af03c3c7 100644 --- a/vtkm/worklet/ExtractGeometry.h +++ b/vtkm/worklet/ExtractGeometry.h @@ -142,8 +142,8 @@ public: const vtkm::cont::ArrayHandle& cellIds, DeviceAdapter) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - typedef vtkm::cont::CellSetPermutation OutputType; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; + using OutputType = vtkm::cont::CellSetPermutation; DeviceAlgorithm::Copy(cellIds, this->ValidCellIds); diff --git a/vtkm/worklet/ExtractPoints.h b/vtkm/worklet/ExtractPoints.h index fb0a7f54e..0f8dd5c84 100644 --- a/vtkm/worklet/ExtractPoints.h +++ b/vtkm/worklet/ExtractPoints.h @@ -81,7 +81,7 @@ public: const vtkm::cont::ArrayHandle& pointIds, DeviceAdapter) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; DeviceAlgorithm::Copy(pointIds, this->ValidPointIds); // Make CellSetSingleType with VERTEX at each point id @@ -101,7 +101,7 @@ public: bool extractInside, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // Worklet output will be a boolean passFlag array vtkm::cont::ArrayHandle passFlags; diff --git a/vtkm/worklet/FieldEntropy.h b/vtkm/worklet/FieldEntropy.h index 7e9913db0..2aa3fd2e9 100644 --- a/vtkm/worklet/FieldEntropy.h +++ b/vtkm/worklet/FieldEntropy.h @@ -75,7 +75,7 @@ public: vtkm::Id numberOfBins, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; ///// calculate histogram using FieldHistogram worklet ///// vtkm::Range range; diff --git a/vtkm/worklet/FieldHistogram.h b/vtkm/worklet/FieldHistogram.h index 9045a29da..509d394fb 100644 --- a/vtkm/worklet/FieldHistogram.h +++ b/vtkm/worklet/FieldHistogram.h @@ -44,7 +44,7 @@ namespace template T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num) { - typedef vtkm::VecTraits VecType; + using VecType = vtkm::VecTraits; const T fieldRange = fieldMaxValue - fieldMinValue; return fieldRange / static_cast(num); } @@ -69,7 +69,7 @@ public: public: typedef void ControlSignature(FieldIn<> value, FieldOut<> binIndex); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numberOfBins; FieldType minValue; @@ -102,7 +102,7 @@ public: WholeArrayIn counts, FieldOut outputCount); typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::Id& index, @@ -129,7 +129,7 @@ public: vtkm::cont::ArrayHandle& binArray, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; //todo: need to have a signature that can use an input range so we can //leverage fields that have already computed there range diff --git a/vtkm/worklet/FieldStatistics.h b/vtkm/worklet/FieldStatistics.h index ddcbc67ae..57532d8b0 100644 --- a/vtkm/worklet/FieldStatistics.h +++ b/vtkm/worklet/FieldStatistics.h @@ -71,7 +71,7 @@ public: FieldOut<> pow3Array, FieldOut<> pow4Array); typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numPowers; @@ -100,7 +100,7 @@ public: public: typedef void ControlSignature(FieldIn<> value, FieldOut<> diff); typedef _2 ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; FieldType constant; @@ -117,8 +117,8 @@ public: template void Run(vtkm::cont::ArrayHandle fieldArray, StatInfo& statinfo) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; - typedef typename vtkm::cont::ArrayHandle::PortalConstControl FieldPortal; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; + using FieldPortal = typename vtkm::cont::ArrayHandle::PortalConstControl; // Copy original data to array for sorting vtkm::cont::ArrayHandle tempArray; diff --git a/vtkm/worklet/KernelSplatter.h b/vtkm/worklet/KernelSplatter.h index f8ab96e00..c440773f9 100644 --- a/vtkm/worklet/KernelSplatter.h +++ b/vtkm/worklet/KernelSplatter.h @@ -73,9 +73,9 @@ namespace debug template void OutputArrayDebug(const vtkm::cont::ArrayHandle& outputArray, const std::string& name) { - typedef T ValueType; - typedef vtkm::cont::internal::Storage StorageType; - typedef typename StorageType::PortalConstType PortalConstType; + using ValueType = T; + using StorageType = vtkm::cont::internal::Storage; + using PortalConstType = typename StorageType::PortalConstType; PortalConstType readPortal = outputArray.GetPortalConstControl(); vtkm::cont::ArrayPortalToIterators iterators(readPortal); std::vector result(readPortal.GetNumberOfValues()); @@ -90,8 +90,8 @@ template void OutputArrayDebug(const vtkm::cont::ArrayHandle>& outputArray, const std::string& name) { - typedef T ValueType; - typedef typename vtkm::cont::ArrayHandle>::PortalConstControl PortalConstType; + using ValueType = T; + using PortalConstType = typename vtkm::cont::ArrayHandle>::PortalConstControl; PortalConstType readPortal = outputArray.GetPortalConstControl(); vtkm::cont::ArrayPortalToIterators iterators(readPortal); std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; @@ -108,8 +108,8 @@ void OutputArrayDebug( outputArray, const std::string& name) { - typedef typename vtkm::cont::ArrayHandlePermutation>>:: - PortalConstControl PortalConstType; + using PortalConstType = typename vtkm::cont:: + ArrayHandlePermutation>>::PortalConstControl; PortalConstType readPortal = outputArray.GetPortalConstControl(); vtkm::cont::ArrayPortalToIterators iterators(readPortal); std::cout << name.c_str() << " " << outputArray.GetNumberOfValues() << "\n"; @@ -146,21 +146,21 @@ void OutputArrayDebug( template struct KernelSplatterFilterUniformGrid { - typedef vtkm::cont::ArrayHandle DoubleHandleType; - typedef vtkm::cont::ArrayHandle FloatHandleType; - typedef vtkm::cont::ArrayHandle VecHandleType; - typedef vtkm::cont::ArrayHandle IdHandleType; + using DoubleHandleType = vtkm::cont::ArrayHandle; + using FloatHandleType = vtkm::cont::ArrayHandle; + using VecHandleType = vtkm::cont::ArrayHandle; + using IdHandleType = vtkm::cont::ArrayHandle; // - typedef vtkm::Vec FloatVec; - typedef vtkm::Vec PointType; - typedef vtkm::cont::ArrayHandle PointHandleType; + using FloatVec = vtkm::Vec; + using PointType = vtkm::Vec; + using PointHandleType = vtkm::cont::ArrayHandle; // - typedef vtkm::cont::ArrayHandlePermutation VecPermType; - typedef vtkm::cont::ArrayHandlePermutation PointVecPermType; - typedef vtkm::cont::ArrayHandlePermutation IdPermType; - typedef vtkm::cont::ArrayHandlePermutation FloatPermType; + using VecPermType = vtkm::cont::ArrayHandlePermutation; + using PointVecPermType = vtkm::cont::ArrayHandlePermutation; + using IdPermType = vtkm::cont::ArrayHandlePermutation; + using FloatPermType = vtkm::cont::ArrayHandlePermutation; // - typedef vtkm::cont::ArrayHandleCounting IdCountingType; + using IdCountingType = vtkm::cont::ArrayHandleCounting; //----------------------------------------------------------------------- // zero an array, diff --git a/vtkm/worklet/MarchingCubes.h b/vtkm/worklet/MarchingCubes.h index dcaa0d88e..945584e6a 100644 --- a/vtkm/worklet/MarchingCubes.h +++ b/vtkm/worklet/MarchingCubes.h @@ -122,7 +122,7 @@ public: FieldOutCell outNumTriangles, WholeArrayIn numTrianglesTable); typedef void ExecutionSignature(CellShape, _1, _2, _4, _5); - typedef _3 InputDomain; + using InputDomain = _3; template VTKM_EXEC void operator()(vtkm::CellShapeTagGeneric shape, @@ -182,11 +182,11 @@ class EdgeWeightGenerateMetaData template struct PortalTypes { - typedef vtkm::cont::ArrayHandle HandleType; - typedef typename HandleType::template ExecutionTypes ExecutionTypes; + using HandleType = vtkm::cont::ArrayHandle; + using ExecutionTypes = typename HandleType::template ExecutionTypes; - typedef typename ExecutionTypes::Portal Portal; - typedef typename ExecutionTypes::PortalConst PortalConst; + using Portal = typename ExecutionTypes::Portal; + using PortalConst = typename ExecutionTypes::PortalConst; }; public: @@ -233,7 +233,7 @@ public: { }; - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; typedef void ControlSignature( CellSetIn cellset, // Cell set @@ -243,7 +243,7 @@ public: typedef void ExecutionSignature(CellShape, _2, _3, InputIndex, WorkIndex, VisitIndex, FromIndices); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_CONT EdgeWeightGenerate(const EdgeWeightGenerateMetaData& meta) @@ -300,7 +300,7 @@ public: const IndicesVecType& indices) const { //covers when we have hexs coming from 3d structured data const vtkm::Id outputPointId = 3 * outputCellId; - typedef typename vtkm::VecTraits::ComponentType FieldType; + using FieldType = typename vtkm::VecTraits::ComponentType; vtkm::IdComponent sum = 0, caseNumber = 0; vtkm::IdComponent i = 0, size = static_cast(isovalues.GetNumberOfValues()); @@ -367,7 +367,7 @@ public: WholeArrayIn<> inputField, FieldOut<> output); typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_CONT MapPointField() {} @@ -417,7 +417,7 @@ struct MergeDuplicateValues : vtkm::worklet::WorkletReduceByKey ReducedValuesOut<> valueOut1, ReducedValuesOut<> valueOut2); typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; template , FieldOut<>); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_EXEC void operator()(const vtkm::Id2& input, vtkm::Id2& output) const { output = input; } diff --git a/vtkm/worklet/Mask.h b/vtkm/worklet/Mask.h index 339a6f11e..9dea59a20 100644 --- a/vtkm/worklet/Mask.h +++ b/vtkm/worklet/Mask.h @@ -48,8 +48,8 @@ public: const vtkm::Id stride, DeviceAdapter) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - typedef vtkm::cont::CellSetPermutation OutputType; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; + using OutputType = vtkm::cont::CellSetPermutation; vtkm::Id numberOfInputCells = cellSet.GetNumberOfCells(); vtkm::Id numberOfSampledCells = numberOfInputCells / stride; diff --git a/vtkm/worklet/MaskPoints.h b/vtkm/worklet/MaskPoints.h index 0084afdd8..0556cf516 100644 --- a/vtkm/worklet/MaskPoints.h +++ b/vtkm/worklet/MaskPoints.h @@ -39,7 +39,7 @@ public: const vtkm::Id stride, DeviceAdapter) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id numberOfInputPoints = cellSet.GetNumberOfPoints(); vtkm::Id numberOfSampledPoints = numberOfInputPoints / stride; diff --git a/vtkm/worklet/NDimsEntropy.h b/vtkm/worklet/NDimsEntropy.h index cc20a2faf..a7d82aa76 100644 --- a/vtkm/worklet/NDimsEntropy.h +++ b/vtkm/worklet/NDimsEntropy.h @@ -66,7 +66,7 @@ public: template vtkm::Float64 Run(DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; std::vector> binIds; vtkm::cont::ArrayHandle freqs; diff --git a/vtkm/worklet/NDimsHistMarginalization.h b/vtkm/worklet/NDimsHistMarginalization.h index 068e1a6d6..4b77fb91f 100644 --- a/vtkm/worklet/NDimsHistMarginalization.h +++ b/vtkm/worklet/NDimsHistMarginalization.h @@ -73,7 +73,7 @@ public: vtkm::cont::ArrayHandle& marginalFreqs, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; //total variables vtkm::Id numOfVariable = static_cast(binId.size()); @@ -160,7 +160,7 @@ public: vtkm::cont::ArrayHandle& marginalFreqs, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; //total variables vtkm::Id numOfVariable = static_cast(binId.size()); diff --git a/vtkm/worklet/NDimsHistogram.h b/vtkm/worklet/NDimsHistogram.h index f3690c7f1..89ef282c9 100644 --- a/vtkm/worklet/NDimsHistogram.h +++ b/vtkm/worklet/NDimsHistogram.h @@ -46,7 +46,7 @@ public: template void SetNumOfDataPoints(vtkm::Id _numDataPoints, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; NumDataPoints = _numDataPoints; @@ -93,7 +93,7 @@ public: vtkm::cont::ArrayHandle& freqs, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = typename vtkm::cont::DeviceAdapterAlgorithm; binId.resize(NumberOfBins.size()); diff --git a/vtkm/worklet/ParticleAdvection.h b/vtkm/worklet/ParticleAdvection.h index d05dd8ffc..c08b15cec 100644 --- a/vtkm/worklet/ParticleAdvection.h +++ b/vtkm/worklet/ParticleAdvection.h @@ -168,7 +168,7 @@ public: const vtkm::Id& nSteps, const DeviceAdapter&) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::worklet::particleadvection::StreamlineWorklet worklet; diff --git a/vtkm/worklet/PointAverage.h b/vtkm/worklet/PointAverage.h index b477dae3f..64f653936 100644 --- a/vtkm/worklet/PointAverage.h +++ b/vtkm/worklet/PointAverage.h @@ -39,7 +39,7 @@ public: FieldInCell<> inCellField, FieldOutPoint<> outPointField); typedef void ExecutionSignature(CellCount, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::IdComponent& numCells, diff --git a/vtkm/worklet/ScatterCounting.h b/vtkm/worklet/ScatterCounting.h index c1f2a8887..07036c368 100644 --- a/vtkm/worklet/ScatterCounting.h +++ b/vtkm/worklet/ScatterCounting.h @@ -185,7 +185,7 @@ struct ScatterCounting { } - typedef vtkm::cont::ArrayHandle OutputToInputMapType; + using OutputToInputMapType = vtkm::cont::ArrayHandle; template VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType) const @@ -193,7 +193,7 @@ struct ScatterCounting return this->OutputToInputMap; } - typedef vtkm::cont::ArrayHandle VisitArrayType; + using VisitArrayType = vtkm::cont::ArrayHandle; template VTKM_CONT VisitArrayType GetVisitArray(RangeType) const { diff --git a/vtkm/worklet/ScatterIdentity.h b/vtkm/worklet/ScatterIdentity.h index 110d48a27..431ff095e 100644 --- a/vtkm/worklet/ScatterIdentity.h +++ b/vtkm/worklet/ScatterIdentity.h @@ -40,7 +40,7 @@ namespace worklet /// struct ScatterIdentity { - typedef vtkm::cont::ArrayHandleIndex OutputToInputMapType; + using OutputToInputMapType = vtkm::cont::ArrayHandleIndex; VTKM_CONT OutputToInputMapType GetOutputToInputMap(vtkm::Id inputRange) const { @@ -52,7 +52,7 @@ struct ScatterIdentity return this->GetOutputToInputMap(inputRange[0] * inputRange[1] * inputRange[2]); } - typedef vtkm::cont::ArrayHandleConstant VisitArrayType; + using VisitArrayType = vtkm::cont::ArrayHandleConstant; VTKM_CONT VisitArrayType GetVisitArray(vtkm::Id inputRange) const { return VisitArrayType(0, inputRange); } VTKM_CONT diff --git a/vtkm/worklet/ScatterUniform.h b/vtkm/worklet/ScatterUniform.h index 422ad4dff..2ae7c80f3 100644 --- a/vtkm/worklet/ScatterUniform.h +++ b/vtkm/worklet/ScatterUniform.h @@ -93,7 +93,7 @@ struct ScatterUniform return this->GetOutputRange(inputRange[0] * inputRange[1] * inputRange[2]); } - typedef vtkm::cont::ArrayHandleImplicit OutputToInputMapType; + using OutputToInputMapType = vtkm::cont::ArrayHandleImplicit; template VTKM_CONT OutputToInputMapType GetOutputToInputMap(RangeType inputRange) const { @@ -101,7 +101,7 @@ struct ScatterUniform this->GetOutputRange(inputRange)); } - typedef vtkm::cont::ArrayHandleImplicit VisitArrayType; + using VisitArrayType = vtkm::cont::ArrayHandleImplicit; template VTKM_CONT VisitArrayType GetVisitArray(RangeType inputRange) const { diff --git a/vtkm/worklet/StreamLineUniformGrid.h b/vtkm/worklet/StreamLineUniformGrid.h index 17f75eff4..253115e28 100644 --- a/vtkm/worklet/StreamLineUniformGrid.h +++ b/vtkm/worklet/StreamLineUniformGrid.h @@ -155,9 +155,9 @@ public: } }; - typedef vtkm::cont::ArrayHandle> FieldHandle; - typedef - typename FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; + using FieldHandle = vtkm::cont::ArrayHandle>; + using FieldPortalConstType = + typename FieldHandle::template ExecutionTypes::PortalConst; class MakeStreamLines : public vtkm::worklet::WorkletMapField { @@ -168,9 +168,9 @@ public: WholeArrayOut validPoint, WholeArrayOut streamLines); typedef void ExecutionSignature(_1, _2, _3, _4, _5, VisitIndex); - typedef _1 InputDomain; + using InputDomain = _1; - typedef vtkm::worklet::ScatterUniform ScatterType; + using ScatterType = vtkm::worklet::ScatterUniform; VTKM_CONT ScatterType GetScatter() const { return ScatterType(2); } @@ -346,7 +346,7 @@ public: vtkm::Id maxSteps, FieldType timeStep) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // Get information from input dataset vtkm::cont::CellSetStructured<3> inCellSet; @@ -398,7 +398,7 @@ public: // Worklet to make the streamlines MakeStreamLines makeStreamLines( timeStep, streamMode, maxSteps, vdims, fieldArray.PrepareForInput(DeviceAdapter())); - typedef typename vtkm::worklet::DispatcherMapField MakeStreamLinesDispatcher; + using MakeStreamLinesDispatcher = typename vtkm::worklet::DispatcherMapField; MakeStreamLinesDispatcher makeStreamLinesDispatcher(makeStreamLines); makeStreamLinesDispatcher.Invoke( seedIdArray, seedPosArray, numIndices, validPoint, streamArray); diff --git a/vtkm/worklet/Tetrahedralize.h b/vtkm/worklet/Tetrahedralize.h index a89ed8266..0f2759417 100644 --- a/vtkm/worklet/Tetrahedralize.h +++ b/vtkm/worklet/Tetrahedralize.h @@ -39,7 +39,7 @@ public: typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices); typedef void ExecutionSignature(_1, _2); - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } diff --git a/vtkm/worklet/Threshold.h b/vtkm/worklet/Threshold.h index 736daadac..8c7d6a8d2 100644 --- a/vtkm/worklet/Threshold.h +++ b/vtkm/worklet/Threshold.h @@ -138,7 +138,7 @@ public: { case vtkm::cont::Field::ASSOC_POINTS: { - typedef ThresholdByPointField ThresholdWorklet; + using ThresholdWorklet = ThresholdByPointField; ThresholdWorklet worklet(predicate); DispatcherMapTopology dispatcher(worklet); @@ -147,7 +147,7 @@ public: } case vtkm::cont::Field::ASSOC_CELL_SET: { - typedef ThresholdByCellField ThresholdWorklet; + using ThresholdWorklet = ThresholdByCellField; ThresholdWorklet worklet(predicate); DispatcherMapTopology dispatcher(worklet); diff --git a/vtkm/worklet/ThresholdPoints.h b/vtkm/worklet/ThresholdPoints.h index bf67cb784..c368b274b 100644 --- a/vtkm/worklet/ThresholdPoints.h +++ b/vtkm/worklet/ThresholdPoints.h @@ -79,11 +79,11 @@ public: const UnaryPredicate& predicate, DeviceAdapter) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle passFlags; - typedef ThresholdPointField ThresholdWorklet; + using ThresholdWorklet = ThresholdPointField; ThresholdWorklet worklet(predicate); DispatcherMapTopology dispatcher(worklet); diff --git a/vtkm/worklet/Triangulate.h b/vtkm/worklet/Triangulate.h index 08de547af..0cceaf3c5 100644 --- a/vtkm/worklet/Triangulate.h +++ b/vtkm/worklet/Triangulate.h @@ -39,7 +39,7 @@ public: typedef void ControlSignature(FieldIn<> inIndices, FieldOut<> outIndices); typedef void ExecutionSignature(_1, _2); - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } diff --git a/vtkm/worklet/VertexClustering.h b/vtkm/worklet/VertexClustering.h index ac23b75d2..209dec5b1 100644 --- a/vtkm/worklet/VertexClustering.h +++ b/vtkm/worklet/VertexClustering.h @@ -167,7 +167,7 @@ struct VertexClustering template VTKM_EXEC vtkm::Id GetClusterId(const PointType& p) const { - typedef typename PointType::ComponentType ComponentType; + using ComponentType = typename PointType::ComponentType; PointType gridOrigin(static_cast(this->Grid.origin[0]), static_cast(this->Grid.origin[1]), static_cast(this->Grid.origin[2])); diff --git a/vtkm/worklet/WaveletCompressor.h b/vtkm/worklet/WaveletCompressor.h index 5f5dbebe9..b4b97749a 100644 --- a/vtkm/worklet/WaveletCompressor.h +++ b/vtkm/worklet/WaveletCompressor.h @@ -70,12 +70,12 @@ public: std::vector L1d(3, 0); // Use an intermediate array - typedef typename CoeffArrayType::ValueType OutputValueType; - typedef vtkm::cont::ArrayHandle InterArrayType; + using OutputValueType = typename CoeffArrayType::ValueType; + using InterArrayType = vtkm::cont::ArrayHandle; // Define a few more types - typedef vtkm::cont::ArrayHandleCounting IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; + using IdArrayType = vtkm::cont::ArrayHandleCounting; + using PermutArrayType = vtkm::cont::ArrayHandlePermutation; vtkm::cont::ArrayCopy(sigIn, coeffOut, DeviceTag()); @@ -120,10 +120,10 @@ public: L1d[0] = L[0]; L1d[1] = L[1]; - typedef typename SignalArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutArrayBasic; - typedef vtkm::cont::ArrayHandleCounting IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; + using OutValueType = typename SignalArrayType::ValueType; + using OutArrayBasic = vtkm::cont::ArrayHandle; + using IdArrayType = vtkm::cont::ArrayHandleCounting; + using PermutArrayType = vtkm::cont::ArrayHandlePermutation; vtkm::cont::ArrayCopy(coeffIn, sigOut, DeviceTag()); @@ -181,8 +181,8 @@ public: vtkm::Id currentLenZ = inZ; std::vector L3d(27, 0); - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + using OutValueType = typename OutArrayType::ValueType; + using OutBasicArray = vtkm::cont::ArrayHandle; // First level transform writes to the output array vtkm::Float64 computationTime = WaveletDWT::DWT3D(sigIn, @@ -260,8 +260,8 @@ public: { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + using OutValueType = typename OutArrayType::ValueType; + using OutBasicArray = vtkm::cont::ArrayHandle; vtkm::Float64 computationTime = 0.0; OutBasicArray outBuffer; @@ -356,8 +356,8 @@ public: std::vector L2d(10, 0); vtkm::Float64 computationTime = 0.0; - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + using OutValueType = typename OutArrayType::ValueType; + using OutBasicArray = vtkm::cont::ArrayHandle; // First level transform operates writes to the output array computationTime += WaveletDWT::DWT2D( @@ -403,8 +403,8 @@ public: { throw vtkm::cont::ErrorBadValue("Number of levels of transform is not supported! "); } - typedef typename OutArrayType::ValueType OutValueType; - typedef vtkm::cont::ArrayHandle OutBasicArray; + using OutValueType = typename OutArrayType::ValueType; + using OutBasicArray = vtkm::cont::ArrayHandle; vtkm::Float64 computationTime = 0.0; OutBasicArray outBuffer; @@ -472,8 +472,8 @@ public: if (ratio > 1.0) { vtkm::Id coeffLen = coeffIn.GetNumberOfValues(); - typedef typename CoeffArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle CoeffArrayBasic; + using ValueType = typename CoeffArrayType::ValueType; + using CoeffArrayBasic = vtkm::cont::ArrayHandle; CoeffArrayBasic sortedArray; vtkm::cont::ArrayCopy(coeffIn, sortedArray, DeviceTag()); @@ -486,7 +486,7 @@ public: nthVal *= -1.0; } - typedef vtkm::worklet::wavelets::ThresholdWorklet ThresholdType; + using ThresholdType = vtkm::worklet::wavelets::ThresholdWorklet; ThresholdType thresholdWorklet(nthVal); vtkm::worklet::DispatcherMapField dispatcher(thresholdWorklet); dispatcher.Invoke(coeffIn); @@ -505,17 +505,17 @@ public: #define MAKEVAL(a) (static_cast(a)) VAL VarOrig = WaveletBase::DeviceCalculateVariance(original, DeviceTag()); - typedef typename ArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ArrayBasic; + using ValueType = typename ArrayType::ValueType; + using ArrayBasic = vtkm::cont::ArrayHandle; ArrayBasic errorArray, errorSquare; // Use a worklet to calculate point-wise error, and its square - typedef vtkm::worklet::wavelets::Differencer DifferencerWorklet; + using DifferencerWorklet = vtkm::worklet::wavelets::Differencer; DifferencerWorklet dw; vtkm::worklet::DispatcherMapField dwDispatcher(dw); dwDispatcher.Invoke(original, reconstruct, errorArray); - typedef vtkm::worklet::wavelets::SquareWorklet SquareWorklet; + using SquareWorklet = vtkm::worklet::wavelets::SquareWorklet; SquareWorklet sw; vtkm::worklet::DispatcherMapField swDispatcher(sw); swDispatcher.Invoke(errorArray, errorSquare); diff --git a/vtkm/worklet/WorkletMapField.h b/vtkm/worklet/WorkletMapField.h index 18e84e802..13c4c526f 100644 --- a/vtkm/worklet/WorkletMapField.h +++ b/vtkm/worklet/WorkletMapField.h @@ -54,9 +54,9 @@ public: template struct FieldIn : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagArrayIn TransportTag; - typedef vtkm::exec::arg::FetchTagArrayDirectIn FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagArrayIn; + using FetchTag = vtkm::exec::arg::FetchTagArrayDirectIn; }; /// \brief A control signature tag for output fields. @@ -67,9 +67,9 @@ public: template struct FieldOut : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagArrayOut TransportTag; - typedef vtkm::exec::arg::FetchTagArrayDirectOut FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagArrayOut; + using FetchTag = vtkm::exec::arg::FetchTagArrayDirectOut; }; /// \brief A control signature tag for input-output (in-place) fields. @@ -80,9 +80,9 @@ public: template struct FieldInOut : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagArrayInOut TransportTag; - typedef vtkm::exec::arg::FetchTagArrayDirectInOut FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagArrayInOut; + using FetchTag = vtkm::exec::arg::FetchTagArrayDirectInOut; }; }; } diff --git a/vtkm/worklet/WorkletPointNeighborhood.h b/vtkm/worklet/WorkletPointNeighborhood.h index 70cf326e6..b82ebdbcb 100644 --- a/vtkm/worklet/WorkletPointNeighborhood.h +++ b/vtkm/worklet/WorkletPointNeighborhood.h @@ -94,7 +94,7 @@ public: }; /// All worklets must define their scatter operation. - typedef vtkm::worklet::ScatterIdentity ScatterType; + using ScatterType = vtkm::worklet::ScatterIdentity; /// In addition to defining the scatter type, the worklet must produce the /// scatter. The default vtkm::worklet::ScatterIdentity has no state, @@ -104,7 +104,7 @@ public: /// All neighborhood worklets must define their boundary type operation. /// The boundary type determines how loading on boundaries will work. - typedef vtkm::worklet::BoundaryClamp BoundaryType; + using BoundaryType = vtkm::worklet::BoundaryClamp; /// In addition to defining the boundary type, the worklet must produce the /// boundary condition. The default BoundaryClamp has no state, so just return an diff --git a/vtkm/worklet/connectivities/GraphConnectivity.h b/vtkm/worklet/connectivities/GraphConnectivity.h index c5b777d20..23168803b 100644 --- a/vtkm/worklet/connectivities/GraphConnectivity.h +++ b/vtkm/worklet/connectivities/GraphConnectivity.h @@ -36,7 +36,7 @@ public: WholeArrayInOut comp); typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; // TODO: Use Scatter? template @@ -62,7 +62,7 @@ class PointerJumping : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn index, WholeArrayInOut comp); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(vtkm::Id index, InOutPortalType& comp) const @@ -80,7 +80,7 @@ class IsStar : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn index, WholeArrayIn comp, FieldOut<>); typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC bool operator()(vtkm::Id index, InOutPortalType& comp) const diff --git a/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h b/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h index 0a211a092..7285b2f1e 100644 --- a/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h +++ b/vtkm/worklet/contourtree/ActiveEdgeTransferrer.h @@ -108,12 +108,11 @@ public: WholeArrayInOut edgeFar, // (i/o) high end of each edge WholeArrayOut newActiveEdges); // (output) new active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); - typedef _1 InputDomain; + using InputDomain = _1; // Passed in constructor because of argument limit on operator - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst - IdPortalType; + using IdPortalType = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; IdPortalType activeEdges; // (input) active edges IdPortalType prunesTo; // (input) where a vertex prunes to diff --git a/vtkm/worklet/contourtree/ChainDoubler.h b/vtkm/worklet/contourtree/ChainDoubler.h index 741cb64d1..602f1fa2d 100644 --- a/vtkm/worklet/contourtree/ChainDoubler.h +++ b/vtkm/worklet/contourtree/ChainDoubler.h @@ -103,7 +103,7 @@ class ChainDoubler : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn vertexID, WholeArrayInOut chains); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/ChainGraph.h b/vtkm/worklet/contourtree/ChainGraph.h index 390b34ce3..bd4a96b00 100644 --- a/vtkm/worklet/contourtree/ChainGraph.h +++ b/vtkm/worklet/contourtree/ChainGraph.h @@ -134,7 +134,7 @@ template class ChainGraph { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // we will want a reference to the original data array const vtkm::cont::ArrayHandle& values; @@ -386,8 +386,8 @@ void ChainGraph::CompactActiveVertices() std::cout << "=======================" << std::endl; std::cout << std::endl; #endif - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; + using IdArrayType = vtkm::cont::ArrayHandle; + using PermuteIndexType = vtkm::cont::ArrayHandlePermutation; // create a temporary array the same size vtkm::cont::ArrayHandle newActiveVertices; @@ -640,10 +640,10 @@ void ChainGraph::DebugPrint(const char* message) std::cout << "---------------------------" << std::endl; std::cout << std::endl; - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandle ValueArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; - typedef vtkm::cont::ArrayHandlePermutation PermuteValueType; + using IdArrayType = vtkm::cont::ArrayHandle; + using ValueArrayType = vtkm::cont::ArrayHandle; + using PermuteIndexType = vtkm::cont::ArrayHandlePermutation; + using PermuteValueType = vtkm::cont::ArrayHandlePermutation; // Full Vertex Arrays vtkm::Id nValues = valueIndex.GetNumberOfValues(); diff --git a/vtkm/worklet/contourtree/ContourTree.h b/vtkm/worklet/contourtree/ContourTree.h index 21783b29a..a86490c0a 100644 --- a/vtkm/worklet/contourtree/ContourTree.h +++ b/vtkm/worklet/contourtree/ContourTree.h @@ -173,12 +173,12 @@ template class ContourTree { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandle ValueArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; - typedef vtkm::cont::ArrayHandlePermutation PermuteValueType; + using IdArrayType = vtkm::cont::ArrayHandle; + using ValueArrayType = vtkm::cont::ArrayHandle; + using PermuteIndexType = vtkm::cont::ArrayHandlePermutation; + using PermuteValueType = vtkm::cont::ArrayHandlePermutation; // reference to the underlying data const vtkm::cont::ArrayHandle values; @@ -248,7 +248,7 @@ public: WholeArrayIn superarcs, FieldOut hasSuperArc); typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; bool vertexIsAssigned; diff --git a/vtkm/worklet/contourtree/CopyJoinSplit.h b/vtkm/worklet/contourtree/CopyJoinSplit.h index b088a61fa..6254d83d8 100644 --- a/vtkm/worklet/contourtree/CopyJoinSplit.h +++ b/vtkm/worklet/contourtree/CopyJoinSplit.h @@ -87,7 +87,7 @@ public: WholeArrayIn outdegree, // (input) WholeArrayOut outbound); // (output) join or split arcs typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/CopyNeighbors.h b/vtkm/worklet/contourtree/CopyNeighbors.h index 44ac688cf..cf7d2eb9a 100644 --- a/vtkm/worklet/contourtree/CopyNeighbors.h +++ b/vtkm/worklet/contourtree/CopyNeighbors.h @@ -87,7 +87,7 @@ public: WholeArrayIn arcs, // (input) merge tree arcs FieldOut sortVector); // (output) neighbors for active edge typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/CopySupernodes.h b/vtkm/worklet/contourtree/CopySupernodes.h index c0e6376a1..72feb867b 100644 --- a/vtkm/worklet/contourtree/CopySupernodes.h +++ b/vtkm/worklet/contourtree/CopySupernodes.h @@ -90,7 +90,7 @@ public: WholeArrayOut updegree, // (output) compacted updegree WholeArrayOut downdegree); // (output) compacted downdegree typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/DegreeDelta.h b/vtkm/worklet/contourtree/DegreeDelta.h index d6382224a..32407733a 100644 --- a/vtkm/worklet/contourtree/DegreeDelta.h +++ b/vtkm/worklet/contourtree/DegreeDelta.h @@ -85,7 +85,7 @@ public: WholeArrayIn sortVector, // (input) sorted vector of vertices WholeArrayOut candidate); // (output) candidate typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nCandidates; diff --git a/vtkm/worklet/contourtree/DegreeSubrangeOffset.h b/vtkm/worklet/contourtree/DegreeSubrangeOffset.h index 46244ea57..0221d8393 100644 --- a/vtkm/worklet/contourtree/DegreeSubrangeOffset.h +++ b/vtkm/worklet/contourtree/DegreeSubrangeOffset.h @@ -85,7 +85,7 @@ public: WholeArrayIn sortVector, // (input) WholeArrayOut degree); // (output) typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/EdgePeakComparator.h b/vtkm/worklet/contourtree/EdgePeakComparator.h index 9cf89e2d9..9aaee40f8 100644 --- a/vtkm/worklet/contourtree/EdgePeakComparator.h +++ b/vtkm/worklet/contourtree/EdgePeakComparator.h @@ -96,11 +96,10 @@ template class EdgePeakComparator { public: - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst ValuePortalType; - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst - IdPortalType; + using ValuePortalType = typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst; + using IdPortalType = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; ValuePortalType values; IdPortalType valueIndex; diff --git a/vtkm/worklet/contourtree/FillSupernodes.h b/vtkm/worklet/contourtree/FillSupernodes.h index dc6cc6947..13ed5d5da 100644 --- a/vtkm/worklet/contourtree/FillSupernodes.h +++ b/vtkm/worklet/contourtree/FillSupernodes.h @@ -84,7 +84,7 @@ public: FieldIn downCandidate, // (input) FieldOut isSupernode); // (output) typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/FindLeaves.h b/vtkm/worklet/contourtree/FindLeaves.h index b86d12c8c..9d11a3a2c 100644 --- a/vtkm/worklet/contourtree/FindLeaves.h +++ b/vtkm/worklet/contourtree/FindLeaves.h @@ -88,7 +88,7 @@ public: WholeArrayIn splitArc, // (input) WholeArrayInOut superarc); // (i/o) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/GoverningSaddleFinder.h b/vtkm/worklet/contourtree/GoverningSaddleFinder.h index 6226b76ea..7c9b550bb 100644 --- a/vtkm/worklet/contourtree/GoverningSaddleFinder.h +++ b/vtkm/worklet/contourtree/GoverningSaddleFinder.h @@ -104,7 +104,7 @@ public: WholeArrayOut prunesTo, // (output) where vertex is pruned to WholeArrayOut outdegree); // (output) updegree of vertex typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/JoinArcConnector.h b/vtkm/worklet/contourtree/JoinArcConnector.h index e8582fe1c..9ea960599 100644 --- a/vtkm/worklet/contourtree/JoinArcConnector.h +++ b/vtkm/worklet/contourtree/JoinArcConnector.h @@ -102,7 +102,7 @@ public: WholeArrayIn saddles, // (input) saddles WholeArrayOut mergeArcs); // (output) target for write back typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/JoinSuperArcFinder.h b/vtkm/worklet/contourtree/JoinSuperArcFinder.h index 5f14f7ef9..51858a536 100644 --- a/vtkm/worklet/contourtree/JoinSuperArcFinder.h +++ b/vtkm/worklet/contourtree/JoinSuperArcFinder.h @@ -118,7 +118,7 @@ public: WholeArrayInOut saddles, // (in out) saddles WholeArrayInOut extrema); // (in out) maxima typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; bool isJoinTree; diff --git a/vtkm/worklet/contourtree/JoinTreeTransferrer.h b/vtkm/worklet/contourtree/JoinTreeTransferrer.h index 4e51856f8..0e180c591 100644 --- a/vtkm/worklet/contourtree/JoinTreeTransferrer.h +++ b/vtkm/worklet/contourtree/JoinTreeTransferrer.h @@ -106,7 +106,7 @@ public: WholeArrayOut saddles, // (output) saddle array for writing WholeArrayOut arcArray); // (output) arc / max array for writing typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/MergeTree.h b/vtkm/worklet/contourtree/MergeTree.h index 5df4515ed..07251957a 100644 --- a/vtkm/worklet/contourtree/MergeTree.h +++ b/vtkm/worklet/contourtree/MergeTree.h @@ -134,7 +134,7 @@ template class MergeTree { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // original data array const vtkm::cont::ArrayHandle& values; diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h index f2931b94b..a74b7e698 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_SaddleStarter.h @@ -112,7 +112,7 @@ public: WholeArrayOut edgeFar, // (output) high end of edges WholeArrayOut activeEdges); // (output) active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nRows; // (input) number of rows in 2D vtkm::Id nCols; // (input) number of cols in 2D diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h index 19a3f8025..773106600 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_Triangulation.h @@ -109,7 +109,7 @@ template class Mesh2D_DEM_Triangulation { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // original data array const vtkm::cont::ArrayHandle& values; @@ -218,8 +218,8 @@ void Mesh2D_DEM_Triangulation::SetSaddleStarts( // copy the chain maximum from arcArray // : mergeGraph.chainExtremum[vID] = inverseIndex[mergeGraph.arcArray[mergeGraph.valueIndex[vID]]] - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; + using IdArrayType = vtkm::cont::ArrayHandle; + using PermuteIndexType = vtkm::cont::ArrayHandlePermutation; vtkm::cont::ArrayHandle tArray; tArray.Allocate(nCriticalPoints); diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h index 87bb6c874..d7b05aba6 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexOutdegreeStarter.h @@ -103,7 +103,7 @@ public: FieldOut outdegree, // (output) outdegree FieldOut isCritical); // (output) whether critical typedef void ExecutionSignature(_1, _2, _3, _4, _5 /*, _6*/); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nRows; // (input) number of rows in 2D vtkm::Id nCols; // (input) number of cols in 2D diff --git a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h index 678a630be..80a8890c7 100644 --- a/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h +++ b/vtkm/worklet/contourtree/Mesh2D_DEM_VertexStarter.h @@ -108,7 +108,7 @@ public: FieldOut chain, // (output) modify the chains FieldOut linkMask); // (output) modify the mask typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nRows; // (input) number of rows in 2D vtkm::Id nCols; // (input) number of cols in 2D diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h index 46365560f..52430eb2b 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_SaddleStarter.h @@ -114,12 +114,12 @@ public: WholeArrayOut edgeFar, // (output) high end of edges WholeArrayOut activeEdges); // (output) active edge list typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + using InputDomain = _1; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst IdComponentPortalType; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst IdPortalType; + using IdComponentPortalType = typename vtkm::cont::ArrayHandle< + vtkm::IdComponent>::template ExecutionTypes::PortalConst; + using IdPortalType = typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst; vtkm::Id nRows; // (input) number of rows in 3D vtkm::Id nCols; // (input) number of cols in 3D diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h index 8b70eed7e..b7d631d55 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_Triangulation.h @@ -111,7 +111,7 @@ template class Mesh3D_DEM_Triangulation { public: - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; // original data array const vtkm::cont::ArrayHandle& values; @@ -240,8 +240,8 @@ void Mesh3D_DEM_Triangulation::SetSaddleStarts( // copy the chain maximum from arcArray // : mergeGraph.chainExtremum[vID] = inverseIndex[mergeGraph.arcArray[mergeGraph.valueIndex[vID]]] - typedef vtkm::cont::ArrayHandle IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermuteIndexType; + using IdArrayType = vtkm::cont::ArrayHandle; + using PermuteIndexType = vtkm::cont::ArrayHandlePermutation; vtkm::cont::ArrayHandle tArray; tArray.Allocate(nCriticalPoints); diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h index c994279f1..661910d36 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexOutdegreeStarter.h @@ -105,12 +105,12 @@ public: FieldOut outdegree, // (output) outdegree FieldOut isCritical); // (output) whether critical typedef void ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst IdComponentPortalType; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst IdPortalType; + using IdComponentPortalType = typename vtkm::cont::ArrayHandle< + vtkm::IdComponent>::template ExecutionTypes::PortalConst; + using IdPortalType = typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst; vtkm::Id nRows; // (input) number of rows in 3D vtkm::Id nCols; // (input) number of cols in 3D diff --git a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h index 93f22ef4a..fd5b5d7ca 100644 --- a/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h +++ b/vtkm/worklet/contourtree/Mesh3D_DEM_VertexStarter.h @@ -109,7 +109,7 @@ public: FieldOut chain, // (output) modify the chains FieldOut linkMask); // (output) modify the mask typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nRows; // (input) number of rows in 3D vtkm::Id nCols; // (input) number of cols in 3D diff --git a/vtkm/worklet/contourtree/RegularPointTransferrer.h b/vtkm/worklet/contourtree/RegularPointTransferrer.h index 8038f1dbd..6927b75b3 100644 --- a/vtkm/worklet/contourtree/RegularPointTransferrer.h +++ b/vtkm/worklet/contourtree/RegularPointTransferrer.h @@ -111,7 +111,7 @@ public: WholeArrayInOut prunesTo, // (i/o) where vertex is pruned to WholeArrayOut outdegree); // (output) updegree of vertex typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; bool isJoinGraph; diff --git a/vtkm/worklet/contourtree/RegularToCandidate.h b/vtkm/worklet/contourtree/RegularToCandidate.h index a389a79ff..e9ad1038a 100644 --- a/vtkm/worklet/contourtree/RegularToCandidate.h +++ b/vtkm/worklet/contourtree/RegularToCandidate.h @@ -86,7 +86,7 @@ public: WholeArrayIn regularToCritical, // (input) sorting indices FieldOut sortVector); // (output) target for write back typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/RegularToCriticalDown.h b/vtkm/worklet/contourtree/RegularToCriticalDown.h index 1dd0c38e9..4c74c6321 100644 --- a/vtkm/worklet/contourtree/RegularToCriticalDown.h +++ b/vtkm/worklet/contourtree/RegularToCriticalDown.h @@ -86,7 +86,7 @@ public: WholeArrayIn regularToCritical, // (input) FieldOut sortVector); // (output) typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/RegularToCriticalUp.h b/vtkm/worklet/contourtree/RegularToCriticalUp.h index dce16af7c..17a2d22c8 100644 --- a/vtkm/worklet/contourtree/RegularToCriticalUp.h +++ b/vtkm/worklet/contourtree/RegularToCriticalUp.h @@ -84,7 +84,7 @@ public: FieldIn candidate, // (input) candidate index WholeArrayOut critical); // (output) typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/ResetDegrees.h b/vtkm/worklet/contourtree/ResetDegrees.h index 11f61b075..368eb6ddf 100644 --- a/vtkm/worklet/contourtree/ResetDegrees.h +++ b/vtkm/worklet/contourtree/ResetDegrees.h @@ -84,7 +84,7 @@ public: WholeArrayOut updegree, // output WholeArrayOut downdegree); // output typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SaddleAscentFunctor.h b/vtkm/worklet/contourtree/SaddleAscentFunctor.h index 60c46a8a0..cb2577f37 100644 --- a/vtkm/worklet/contourtree/SaddleAscentFunctor.h +++ b/vtkm/worklet/contourtree/SaddleAscentFunctor.h @@ -103,7 +103,7 @@ public: WholeArrayInOut edgeFar, // (input) high ends of edges FieldOut newOutdegree); // (output) new updegree of vertex typedef _7 ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SaddleAscentTransferrer.h b/vtkm/worklet/contourtree/SaddleAscentTransferrer.h index 8a5d9d1a2..bf9c27518 100644 --- a/vtkm/worklet/contourtree/SaddleAscentTransferrer.h +++ b/vtkm/worklet/contourtree/SaddleAscentTransferrer.h @@ -101,7 +101,7 @@ public: WholeArrayIn firstEdge, // (input) first edges WholeArrayOut edgeSorter); // (output) edge sorter typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h b/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h index fe61ef500..5a5ec5578 100644 --- a/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h +++ b/vtkm/worklet/contourtree/SetJoinAndSplitArcs.h @@ -88,7 +88,7 @@ public: FieldOut joinArc, // (output) FieldOut splitArc); // (output) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SetSupernodeInward.h b/vtkm/worklet/contourtree/SetSupernodeInward.h index 8602372c2..d29db5111 100644 --- a/vtkm/worklet/contourtree/SetSupernodeInward.h +++ b/vtkm/worklet/contourtree/SetSupernodeInward.h @@ -88,7 +88,7 @@ public: WholeArrayIn outdegree, // (input) WholeArrayInOut superarcs); // (in out) typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SkipVertex.h b/vtkm/worklet/contourtree/SkipVertex.h index d65b33d72..98b9b2c65 100644 --- a/vtkm/worklet/contourtree/SkipVertex.h +++ b/vtkm/worklet/contourtree/SkipVertex.h @@ -86,7 +86,7 @@ public: WholeArrayInOut joinArcs, // (i/o) WholeArrayInOut splitArcs); // (i/o) typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/SubrangeOffset.h b/vtkm/worklet/contourtree/SubrangeOffset.h index 4b568bb94..caf0c3388 100644 --- a/vtkm/worklet/contourtree/SubrangeOffset.h +++ b/vtkm/worklet/contourtree/SubrangeOffset.h @@ -85,7 +85,7 @@ public: WholeArrayIn sortVector, // (input) sorted vector of vertices WholeArrayOut candidate); // (output) candidate typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/TrunkBuilder.h b/vtkm/worklet/contourtree/TrunkBuilder.h index c6842c69b..aa68d4133 100644 --- a/vtkm/worklet/contourtree/TrunkBuilder.h +++ b/vtkm/worklet/contourtree/TrunkBuilder.h @@ -103,7 +103,7 @@ public: WholeArrayIn chainExtremum, // (input) chain extemum for vertices WholeArrayOut prunesTo); // (output) where a vertex prunes to typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/UpdateOutbound.h b/vtkm/worklet/contourtree/UpdateOutbound.h index 565e42959..ae8315006 100644 --- a/vtkm/worklet/contourtree/UpdateOutbound.h +++ b/vtkm/worklet/contourtree/UpdateOutbound.h @@ -84,7 +84,7 @@ public: typedef void ControlSignature(FieldIn superID, // input WholeArrayInOut outbound); // i/o typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/contourtree/VertexDegreeUpdater.h b/vtkm/worklet/contourtree/VertexDegreeUpdater.h index 5bcd17de2..20324763e 100644 --- a/vtkm/worklet/contourtree/VertexDegreeUpdater.h +++ b/vtkm/worklet/contourtree/VertexDegreeUpdater.h @@ -107,7 +107,7 @@ public: WholeArrayInOut chainExtemum, // (i/o) chain extemum for vertices FieldOut newOutdegree); // (output) new updegree of vertex typedef _8 ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); - typedef _1 InputDomain; + using InputDomain = _1; // chainMaximum is safe for I/O here because: // we have previously eliminated maxima from the active vertex list diff --git a/vtkm/worklet/contourtree/VertexMergeComparator.h b/vtkm/worklet/contourtree/VertexMergeComparator.h index 2910bf948..ad6a62edb 100644 --- a/vtkm/worklet/contourtree/VertexMergeComparator.h +++ b/vtkm/worklet/contourtree/VertexMergeComparator.h @@ -101,11 +101,10 @@ template class VertexMergeComparator { public: - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapter>::PortalConst ValuePortalType; - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst - IdPortalType; + using ValuePortalType = typename vtkm::cont::ArrayHandle::template ExecutionTypes< + DeviceAdapter>::PortalConst; + using IdPortalType = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::PortalConst; ValuePortalType values; IdPortalType extrema; diff --git a/vtkm/worklet/cosmotools/ComputeBinIndices.h b/vtkm/worklet/cosmotools/ComputeBinIndices.h index ef67de382..cb2e497f0 100644 --- a/vtkm/worklet/cosmotools/ComputeBinIndices.h +++ b/vtkm/worklet/cosmotools/ComputeBinIndices.h @@ -80,7 +80,7 @@ public: FieldOut binY, FieldOut binZ); typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numBinsX, numBinsY, numBinsZ; // Number of bins each dimension diff --git a/vtkm/worklet/cosmotools/ComputeBinRange.h b/vtkm/worklet/cosmotools/ComputeBinRange.h index e04367f2b..0bba6f180 100644 --- a/vtkm/worklet/cosmotools/ComputeBinRange.h +++ b/vtkm/worklet/cosmotools/ComputeBinRange.h @@ -78,7 +78,7 @@ public: typedef void ControlSignature(FieldIn leftNeighbor, // (input) left neighbor id FieldOut rightNeighbor); // (output) right neighbor id typedef _2 ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id xNum; diff --git a/vtkm/worklet/cosmotools/ComputeBins.h b/vtkm/worklet/cosmotools/ComputeBins.h index 555e9856d..40df22f40 100644 --- a/vtkm/worklet/cosmotools/ComputeBins.h +++ b/vtkm/worklet/cosmotools/ComputeBins.h @@ -84,7 +84,7 @@ public: FieldIn zLoc, // (input) z location in halo FieldOut binId); // (output) bin Id typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; T xMin, xMax, yMin, yMax, zMin, zMax; vtkm::Id xNum, yNum, zNum; diff --git a/vtkm/worklet/cosmotools/ComputeNeighborBins.h b/vtkm/worklet/cosmotools/ComputeNeighborBins.h index f6679d4df..732c8d817 100644 --- a/vtkm/worklet/cosmotools/ComputeNeighborBins.h +++ b/vtkm/worklet/cosmotools/ComputeNeighborBins.h @@ -79,7 +79,7 @@ public: FieldIn binId, // (input) bin Id WholeArrayOut leftNeighbor); // (output) neighbor Id typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id xNum, yNum, zNum; vtkm::Id NUM_NEIGHBORS; diff --git a/vtkm/worklet/cosmotools/ComputePotential.h b/vtkm/worklet/cosmotools/ComputePotential.h index 16dbf16d5..5cda4a0dc 100644 --- a/vtkm/worklet/cosmotools/ComputePotential.h +++ b/vtkm/worklet/cosmotools/ComputePotential.h @@ -89,7 +89,7 @@ public: WholeArrayIn lastParticleId, // (input) last particle in halo FieldOut potential); // (output) bin ID typedef _8 ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); - typedef _1 InputDomain; + using InputDomain = _1; T mass; diff --git a/vtkm/worklet/cosmotools/ComputePotentialBin.h b/vtkm/worklet/cosmotools/ComputePotentialBin.h index 428705bd0..09e5f4346 100644 --- a/vtkm/worklet/cosmotools/ComputePotentialBin.h +++ b/vtkm/worklet/cosmotools/ComputePotentialBin.h @@ -87,7 +87,7 @@ public: FieldInOut bestPot, // (output) best potential estimate FieldInOut worstPot); // (output) worst potential estimate typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nBins; // Number of bins T mass; // Particle mass diff --git a/vtkm/worklet/cosmotools/ComputePotentialMxN.h b/vtkm/worklet/cosmotools/ComputePotentialMxN.h index 185a25abf..57a435f57 100644 --- a/vtkm/worklet/cosmotools/ComputePotentialMxN.h +++ b/vtkm/worklet/cosmotools/ComputePotentialMxN.h @@ -86,7 +86,7 @@ public: WholeArrayIn zLoc, // (input) z location in domain FieldOut potential); // (output) bin ID typedef _6 ExecutionSignature(_1, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nParticles; // Number of particles in halo T mass; // Particle mass diff --git a/vtkm/worklet/cosmotools/ComputePotentialNeighbors.h b/vtkm/worklet/cosmotools/ComputePotentialNeighbors.h index ffeb75e9b..6e23b9e2a 100644 --- a/vtkm/worklet/cosmotools/ComputePotentialNeighbors.h +++ b/vtkm/worklet/cosmotools/ComputePotentialNeighbors.h @@ -90,7 +90,7 @@ public: WholeArrayIn lastParticleId, // (input) last particle in halo FieldOut potential); // (output) bin ID typedef _9 ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id xNum, yNum, zNum; vtkm::Id NUM_NEIGHBORS; diff --git a/vtkm/worklet/cosmotools/ComputePotentialNxN.h b/vtkm/worklet/cosmotools/ComputePotentialNxN.h index 81b0350be..499da422d 100644 --- a/vtkm/worklet/cosmotools/ComputePotentialNxN.h +++ b/vtkm/worklet/cosmotools/ComputePotentialNxN.h @@ -85,7 +85,7 @@ public: WholeArrayIn zLoc, // (input) z location in domain FieldOut potential); // (output) bin ID typedef _5 ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nParticles; // Number of particles in halo T mass; // Particle mass diff --git a/vtkm/worklet/cosmotools/ComputePotentialOnCandidates.h b/vtkm/worklet/cosmotools/ComputePotentialOnCandidates.h index c14930ae6..00d4a38d1 100644 --- a/vtkm/worklet/cosmotools/ComputePotentialOnCandidates.h +++ b/vtkm/worklet/cosmotools/ComputePotentialOnCandidates.h @@ -85,7 +85,7 @@ public: WholeArrayIn zLoc, // (input) z location in domain FieldOut potential); // (output) bin ID typedef _5 ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id nParticles; // Number of particles in halo T mass; // Particle mass diff --git a/vtkm/worklet/cosmotools/EqualsMinimumPotential.h b/vtkm/worklet/cosmotools/EqualsMinimumPotential.h index 054ebf117..51639103a 100644 --- a/vtkm/worklet/cosmotools/EqualsMinimumPotential.h +++ b/vtkm/worklet/cosmotools/EqualsMinimumPotential.h @@ -84,7 +84,7 @@ public: FieldIn potential2, // (input) minimum potential FieldOut minParticleIndx); // (output) particle Id of min typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/cosmotools/GraftParticles.h b/vtkm/worklet/cosmotools/GraftParticles.h index 036ce1730..b1c42c293 100644 --- a/vtkm/worklet/cosmotools/GraftParticles.h +++ b/vtkm/worklet/cosmotools/GraftParticles.h @@ -87,7 +87,7 @@ public: WholeArrayIn lastParticleId, // (input) last particle index vector WholeArrayOut haloId); typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, _7, _8, _9); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id xNum, yNum, zNum; vtkm::Id NUM_NEIGHBORS; diff --git a/vtkm/worklet/cosmotools/IsStar.h b/vtkm/worklet/cosmotools/IsStar.h index 79673cb89..037ff099f 100644 --- a/vtkm/worklet/cosmotools/IsStar.h +++ b/vtkm/worklet/cosmotools/IsStar.h @@ -80,7 +80,7 @@ public: WholeArrayInOut haloIdLast, WholeArrayInOut<> rootedStar); typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/cosmotools/MarkActiveNeighbors.h b/vtkm/worklet/cosmotools/MarkActiveNeighbors.h index 83a15df43..7f33f78a0 100644 --- a/vtkm/worklet/cosmotools/MarkActiveNeighbors.h +++ b/vtkm/worklet/cosmotools/MarkActiveNeighbors.h @@ -86,7 +86,7 @@ public: WholeArrayIn lastPartId, // (input) vector of last particle indices FieldOut flag); // (output) active bin neighbors mask typedef _8 ExecutionSignature(_1, _2, _3, _4, _5, _6, _7); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id xNum, yNum, zNum; vtkm::Id NUM_NEIGHBORS; diff --git a/vtkm/worklet/cosmotools/PointerJump.h b/vtkm/worklet/cosmotools/PointerJump.h index 66b10920e..fad3558a9 100644 --- a/vtkm/worklet/cosmotools/PointerJump.h +++ b/vtkm/worklet/cosmotools/PointerJump.h @@ -76,7 +76,7 @@ class PointerJump : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn index, WholeArrayInOut D); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT diff --git a/vtkm/worklet/cosmotools/SetCandidateParticles.h b/vtkm/worklet/cosmotools/SetCandidateParticles.h index da575d165..eaa4dcfd2 100644 --- a/vtkm/worklet/cosmotools/SetCandidateParticles.h +++ b/vtkm/worklet/cosmotools/SetCandidateParticles.h @@ -84,7 +84,7 @@ public: FieldIn partCount, // (input) count of particles in bin WholeArrayOut candidate); // (input) z location in bin typedef void ExecutionSignature(_1, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; T cutoffPotential; // Lowest potential for a candidate bin diff --git a/vtkm/worklet/cosmotools/ValidHalo.h b/vtkm/worklet/cosmotools/ValidHalo.h index 28f4686f0..7c558b61b 100644 --- a/vtkm/worklet/cosmotools/ValidHalo.h +++ b/vtkm/worklet/cosmotools/ValidHalo.h @@ -79,7 +79,7 @@ public: WholeArrayIn haloId, FieldOut isValidHalo); typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id pmin; diff --git a/vtkm/worklet/gradient/CellGradient.h b/vtkm/worklet/gradient/CellGradient.h index d288b60d5..85316d939 100644 --- a/vtkm/worklet/gradient/CellGradient.h +++ b/vtkm/worklet/gradient/CellGradient.h @@ -48,7 +48,7 @@ struct CellGradient : vtkm::worklet::WorkletMapPointToCell GradientOutputs outputFields); typedef void ExecutionSignature(CellShape, PointCount, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; template input, FieldOut output); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const InputType& input, OutputType& divergence) const diff --git a/vtkm/worklet/gradient/PointGradient.h b/vtkm/worklet/gradient/PointGradient.h index 6ce4fdff8..364388158 100644 --- a/vtkm/worklet/gradient/PointGradient.h +++ b/vtkm/worklet/gradient/PointGradient.h @@ -50,7 +50,7 @@ struct PointGradient : public vtkm::worklet::WorkletMapCellToPoint GradientOutputs outputFields); typedef void ExecutionSignature(CellCount, CellIndices, WorkIndex, _2, _3, _4, _5); - typedef _1 InputDomain; + using InputDomain = _1; template input, FieldOut output); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const InputType& input, OutputType& qcriterion) const diff --git a/vtkm/worklet/gradient/StructuredPointGradient.h b/vtkm/worklet/gradient/StructuredPointGradient.h index fade0ba06..cc1bd1cec 100644 --- a/vtkm/worklet/gradient/StructuredPointGradient.h +++ b/vtkm/worklet/gradient/StructuredPointGradient.h @@ -48,7 +48,7 @@ struct StructuredPointGradient : public vtkm::worklet::WorkletPointNeighborhood3 typedef void ExecutionSignature(OnBoundary, _2, _3, _4); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::exec::arg::BoundaryState& boundary, diff --git a/vtkm/worklet/gradient/Transpose.h b/vtkm/worklet/gradient/Transpose.h index 430e73eac..314c766fe 100644 --- a/vtkm/worklet/gradient/Transpose.h +++ b/vtkm/worklet/gradient/Transpose.h @@ -42,7 +42,7 @@ struct Transpose3x3 : vtkm::worklet::WorkletMapField typedef void ControlSignature(FieldInOut> field); typedef void ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(FieldInVecType& field) const diff --git a/vtkm/worklet/gradient/Vorticity.h b/vtkm/worklet/gradient/Vorticity.h index e66b2475c..79b091f56 100644 --- a/vtkm/worklet/gradient/Vorticity.h +++ b/vtkm/worklet/gradient/Vorticity.h @@ -40,7 +40,7 @@ struct Vorticity : public vtkm::worklet::WorkletMapField { typedef void ControlSignature(FieldIn input, FieldOut output); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const InputType& input, OutputType& vorticity) const diff --git a/vtkm/worklet/histogram/ComputeNDHistogram.h b/vtkm/worklet/histogram/ComputeNDHistogram.h index 9bb22e38c..31ce3ee41 100644 --- a/vtkm/worklet/histogram/ComputeNDHistogram.h +++ b/vtkm/worklet/histogram/ComputeNDHistogram.h @@ -41,7 +41,7 @@ namespace histogram template T compute_delta(T fieldMinValue, T fieldMaxValue, vtkm::Id num) { - typedef vtkm::VecTraits VecType; + using VecType = vtkm::VecTraits; const T fieldRange = fieldMaxValue - fieldMinValue; return fieldRange / static_cast(num); } @@ -56,7 +56,7 @@ class SetHistogramBin : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn<> value, FieldIn<> binIndexIn, FieldOut<> binIndexOut); typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numberOfBins; vtkm::Float64 minValue; @@ -102,7 +102,7 @@ public: template VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& field) const { - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; const vtkm::Vec initValue(field.GetPortalConstControl().Get(0)); vtkm::Vec minMax = Algorithm::Reduce(field, initValue, vtkm::MinAndMax()); @@ -131,7 +131,7 @@ public: FieldOut<> bin1DIndexOut, FieldOut<> oneVariableIndexOut); typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numberOfBins; diff --git a/vtkm/worklet/histogram/MarginalizeNDHistogram.h b/vtkm/worklet/histogram/MarginalizeNDHistogram.h index 28fc4754f..09d91fb3c 100644 --- a/vtkm/worklet/histogram/MarginalizeNDHistogram.h +++ b/vtkm/worklet/histogram/MarginalizeNDHistogram.h @@ -65,7 +65,7 @@ class To1DIndex : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn<> bin, FieldIn<> binIndexIn, FieldOut<> binIndexOut); typedef void ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; vtkm::Id numberOfBins; diff --git a/vtkm/worklet/internal/ClipTables.h b/vtkm/worklet/internal/ClipTables.h index 2d783102d..b364ad03c 100644 --- a/vtkm/worklet/internal/ClipTables.h +++ b/vtkm/worklet/internal/ClipTables.h @@ -19459,7 +19459,7 @@ static vtkm::UInt8 CellEdges[CELL_EDGES_SIZE] = { class ClipTables { public: - typedef vtkm::Vec EdgeVec; + using EdgeVec = vtkm::Vec; template class DevicePortal diff --git a/vtkm/worklet/internal/DispatcherBase.h b/vtkm/worklet/internal/DispatcherBase.h index 8d50d3eac..b05df4ea1 100644 --- a/vtkm/worklet/internal/DispatcherBase.h +++ b/vtkm/worklet/internal/DispatcherBase.h @@ -161,7 +161,7 @@ struct DispatcherBaseControlSignatureTagCheck // If you get a compile error here, it means there is something that is // not a valid control signature tag in a worklet's ControlSignature. VTKM_IS_CONTROL_SIGNATURE_TAG(ControlSignatureTag); - typedef ControlSignatureTag type; + using type = ControlSignatureTag; }; }; @@ -175,7 +175,7 @@ struct DispatcherBaseExecutionSignatureTagCheck // If you get a compile error here, it means there is something that is not // a valid execution signature tag in a worklet's ExecutionSignature. VTKM_IS_EXECUTION_SIGNATURE_TAG(ExecutionSignatureTag); - typedef ExecutionSignatureTag type; + using type = ExecutionSignatureTag; }; }; @@ -185,8 +185,8 @@ template struct DispatcherBaseTransportInvokeTypes { //Moved out of DispatcherBaseTransportFunctor to reduce code generation - typedef typename ControlInterface::template ParameterType::type ControlSignatureTag; - typedef typename ControlSignatureTag::TransportTag TransportTag; + using ControlSignatureTag = typename ControlInterface::template ParameterType::type; + using TransportTag = typename ControlSignatureTag::TransportTag; }; VTKM_CONT @@ -353,25 +353,25 @@ template class DispatcherBase { private: - typedef DispatcherBase MyType; + using MyType = DispatcherBase; friend struct detail::for_each_dynamic_arg<0>; protected: - typedef vtkm::internal::FunctionInterface - ControlInterface; - typedef vtkm::internal::FunctionInterface - ExecutionInterface; + using ControlInterface = + vtkm::internal::FunctionInterface; + using ExecutionInterface = + vtkm::internal::FunctionInterface; static const vtkm::IdComponent NUM_INVOKE_PARAMS = ControlInterface::ARITY; private: // We don't really need these types, but declaring them checks the arguments // of the control and execution signatures. - typedef typename ControlInterface::template StaticTransformType< - detail::DispatcherBaseControlSignatureTagCheck>::type ControlSignatureCheck; - typedef typename ExecutionInterface::template StaticTransformType< - detail::DispatcherBaseExecutionSignatureTagCheck>::type ExecutionSignatureCheck; + using ControlSignatureCheck = typename ControlInterface::template StaticTransformType< + detail::DispatcherBaseControlSignatureTagCheck>::type; + using ExecutionSignatureCheck = typename ExecutionInterface::template StaticTransformType< + detail::DispatcherBaseExecutionSignatureTagCheck>::type; template VTKM_CONT void StartInvoke(Args&&... args) const @@ -529,16 +529,15 @@ private: // control environment) in a FunctionInterface. Specifically, we use a // static transform of the FunctionInterface to call the transport on each // argument and return the corresponding execution environment object. - typedef typename Invocation::ParameterInterface ParameterInterfaceType; + using ParameterInterfaceType = typename Invocation::ParameterInterface; const ParameterInterfaceType& parameters = invocation.Parameters; - typedef detail::DispatcherBaseTransportFunctor - TransportFunctorType; - typedef - typename ParameterInterfaceType::template StaticTransformType::type - ExecObjectParameters; + using TransportFunctorType = + detail::DispatcherBaseTransportFunctor; + using ExecObjectParameters = + typename ParameterInterfaceType::template StaticTransformType::type; ExecObjectParameters execObjectParameters = parameters.StaticTransformCont( TransportFunctorType(invocation.GetInputDomain(), inputRange, outputRange)); diff --git a/vtkm/worklet/internal/TriangulateTables.h b/vtkm/worklet/internal/TriangulateTables.h index 4eca9979d..67e55b621 100644 --- a/vtkm/worklet/internal/TriangulateTables.h +++ b/vtkm/worklet/internal/TriangulateTables.h @@ -35,8 +35,8 @@ namespace worklet namespace internal { -typedef vtkm::cont::ArrayHandle - TriangulateArrayHandle; +using TriangulateArrayHandle = + vtkm::cont::ArrayHandle; static vtkm::IdComponent TriangleCountData[vtkm::NUMBER_OF_CELL_SHAPES] = { 0, // 0 = vtkm::CELL_SHAPE_EMPTY_CELL @@ -92,7 +92,7 @@ template class TriangulateTablesExecutionObject : public vtkm::exec::ExecutionObjectBase { public: - typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst PortalType; + using PortalType = typename TriangulateArrayHandle::ExecutionTypes::PortalConst; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC @@ -265,7 +265,7 @@ template class TetrahedralizeTablesExecutionObject : public vtkm::exec::ExecutionObjectBase { public: - typedef typename TriangulateArrayHandle::ExecutionTypes::PortalConst PortalType; + using PortalType = typename TriangulateArrayHandle::ExecutionTypes::PortalConst; VTKM_SUPPRESS_EXEC_WARNINGS VTKM_EXEC diff --git a/vtkm/worklet/internal/WorkletBase.h b/vtkm/worklet/internal/WorkletBase.h index dec54d454..be89c39ca 100644 --- a/vtkm/worklet/internal/WorkletBase.h +++ b/vtkm/worklet/internal/WorkletBase.h @@ -133,63 +133,63 @@ namespace internal class WorkletBase : public vtkm::exec::FunctorBase { public: - typedef vtkm::placeholders::_1 _1; - typedef vtkm::placeholders::_2 _2; - typedef vtkm::placeholders::_3 _3; - typedef vtkm::placeholders::_4 _4; - typedef vtkm::placeholders::_5 _5; - typedef vtkm::placeholders::_6 _6; - typedef vtkm::placeholders::_7 _7; - typedef vtkm::placeholders::_8 _8; - typedef vtkm::placeholders::_9 _9; - typedef vtkm::placeholders::_10 _10; - typedef vtkm::placeholders::_11 _11; - typedef vtkm::placeholders::_12 _12; - typedef vtkm::placeholders::_13 _13; - typedef vtkm::placeholders::_14 _14; - typedef vtkm::placeholders::_15 _15; - typedef vtkm::placeholders::_16 _16; - typedef vtkm::placeholders::_17 _17; - typedef vtkm::placeholders::_18 _18; - typedef vtkm::placeholders::_19 _19; - typedef vtkm::placeholders::_20 _20; + using _1 = vtkm::placeholders::_1; + using _2 = vtkm::placeholders::_2; + using _3 = vtkm::placeholders::_3; + using _4 = vtkm::placeholders::_4; + using _5 = vtkm::placeholders::_5; + using _6 = vtkm::placeholders::_6; + using _7 = vtkm::placeholders::_7; + using _8 = vtkm::placeholders::_8; + using _9 = vtkm::placeholders::_9; + using _10 = vtkm::placeholders::_10; + using _11 = vtkm::placeholders::_11; + using _12 = vtkm::placeholders::_12; + using _13 = vtkm::placeholders::_13; + using _14 = vtkm::placeholders::_14; + using _15 = vtkm::placeholders::_15; + using _16 = vtkm::placeholders::_16; + using _17 = vtkm::placeholders::_17; + using _18 = vtkm::placeholders::_18; + using _19 = vtkm::placeholders::_19; + using _20 = vtkm::placeholders::_20; /// \c ExecutionSignature tag for getting the work index. /// - typedef vtkm::exec::arg::WorkIndex WorkIndex; + using WorkIndex = vtkm::exec::arg::WorkIndex; /// \c ExecutionSignature tag for getting the input index. /// - typedef vtkm::exec::arg::InputIndex InputIndex; + using InputIndex = vtkm::exec::arg::InputIndex; /// \c ExecutionSignature tag for getting the output index. /// - typedef vtkm::exec::arg::OutputIndex OutputIndex; + using OutputIndex = vtkm::exec::arg::OutputIndex; /// \c ExecutionSignature tag for getting the thread indices. /// - typedef vtkm::exec::arg::ThreadIndices ThreadIndices; + using ThreadIndices = vtkm::exec::arg::ThreadIndices; /// \c ExecutionSignature tag for getting the visit index. /// - typedef vtkm::exec::arg::VisitIndex VisitIndex; + using VisitIndex = vtkm::exec::arg::VisitIndex; /// \c ControlSignature tag for execution object inputs. struct ExecObject : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagExecObject TypeCheckTag; - typedef vtkm::cont::arg::TransportTagExecObject TransportTag; - typedef vtkm::exec::arg::FetchTagExecObject FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagExecObject; + using TransportTag = vtkm::cont::arg::TransportTagExecObject; + using FetchTag = vtkm::exec::arg::FetchTagExecObject; }; /// Default input domain is the first argument. Worklet subclasses can /// override this by redefining this type. - typedef _1 InputDomain; + using InputDomain = _1; /// All worklets must define their scatter operation. The scatter defines /// what output each input contributes to. The default scatter is the /// identity scatter (1-to-1 input to output). - typedef vtkm::worklet::ScatterIdentity ScatterType; + using ScatterType = vtkm::worklet::ScatterIdentity; /// In addition to defining the scatter type, the worklet must produce the /// scatter. The default ScatterIdentity has no state, so just return an @@ -201,91 +201,91 @@ public: /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagId IdType; + using IdType = vtkm::TypeListTagId; /// \brief A type list containing the type vtkm::Id2. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagId2 Id2Type; + using Id2Type = vtkm::TypeListTagId2; /// \brief A type list containing the type vtkm::Id3. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagId3 Id3Type; + using Id3Type = vtkm::TypeListTagId3; /// \brief A type list containing the type vtkm::IdComponent. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagIdComponent IdComponentType; + using IdComponentType = vtkm::TypeListTagIdComponent; /// \brief A list of types commonly used for indexing. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagIndex Index; + using Index = vtkm::TypeListTagIndex; /// \brief A list of types commonly used for scalar fields. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagFieldScalar Scalar; + using Scalar = vtkm::TypeListTagFieldScalar; /// \brief A list of all basic types used for scalar fields. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagScalarAll ScalarAll; + using ScalarAll = vtkm::TypeListTagScalarAll; /// \brief A list of types commonly used for vector fields of 2 components. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagFieldVec2 Vec2; + using Vec2 = vtkm::TypeListTagFieldVec2; /// \brief A list of types commonly used for vector fields of 3 components. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagFieldVec3 Vec3; + using Vec3 = vtkm::TypeListTagFieldVec3; /// \brief A list of types commonly used for vector fields of 4 components. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagFieldVec4 Vec4; + using Vec4 = vtkm::TypeListTagFieldVec4; /// \brief A list of all basic types used for vector fields. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagVecAll VecAll; + using VecAll = vtkm::TypeListTagVecAll; /// \brief A list of types (scalar and vector) commonly used in fields. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagField FieldCommon; + using FieldCommon = vtkm::TypeListTagField; /// \brief A list of vector types commonly used in fields. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagVecCommon VecCommon; + using VecCommon = vtkm::TypeListTagVecCommon; /// \brief A list of generally common types. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagCommon CommonTypes; + using CommonTypes = vtkm::TypeListTagCommon; /// \brief A list of all basic types. /// /// This is a convenience type to use as template arguments to \c /// ControlSignature tags to specify the types of worklet arguments. - typedef vtkm::TypeListTagAll AllTypes; + using AllTypes = vtkm::TypeListTagAll; /// \c ControlSignature tag for whole input arrays. /// @@ -300,9 +300,9 @@ public: template struct WholeArrayIn : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagWholeArrayIn TransportTag; - typedef vtkm::exec::arg::FetchTagExecObject FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagWholeArrayIn; + using FetchTag = vtkm::exec::arg::FetchTagExecObject; }; /// \c ControlSignature tag for whole output arrays. @@ -319,9 +319,9 @@ public: template struct WholeArrayOut : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagWholeArrayOut TransportTag; - typedef vtkm::exec::arg::FetchTagExecObject FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagWholeArrayOut; + using FetchTag = vtkm::exec::arg::FetchTagExecObject; }; /// \c ControlSignature tag for whole input/output arrays. @@ -339,9 +339,9 @@ public: template struct WholeArrayInOut : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagWholeArrayInOut TransportTag; - typedef vtkm::exec::arg::FetchTagExecObject FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagArray; + using TransportTag = vtkm::cont::arg::TransportTagWholeArrayInOut; + using FetchTag = vtkm::exec::arg::FetchTagExecObject; }; /// \c ControlSignature tag for whole input/output arrays. @@ -359,9 +359,9 @@ public: template struct AtomicArrayInOut : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagAtomicArray TypeCheckTag; - typedef vtkm::cont::arg::TransportTagAtomicArray TransportTag; - typedef vtkm::exec::arg::FetchTagExecObject FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagAtomicArray; + using TransportTag = vtkm::cont::arg::TransportTagAtomicArray; + using FetchTag = vtkm::exec::arg::FetchTagExecObject; }; /// \c ControlSignature tag for whole input topology. @@ -377,9 +377,9 @@ public: template struct WholeCellSetIn : vtkm::cont::arg::ControlSignatureTagBase { - typedef vtkm::cont::arg::TypeCheckTagCellSet TypeCheckTag; - typedef vtkm::cont::arg::TransportTagCellSetIn TransportTag; - typedef vtkm::exec::arg::FetchTagWholeCellSetIn FetchTag; + using TypeCheckTag = vtkm::cont::arg::TypeCheckTagCellSet; + using TransportTag = vtkm::cont::arg::TransportTagCellSetIn; + using FetchTag = vtkm::exec::arg::FetchTagWholeCellSetIn; }; /// \brief Creates a \c ThreadIndices object. diff --git a/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx b/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx index b28016de2..20efebee7 100644 --- a/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx +++ b/vtkm/worklet/internal/testing/UnitTestDispatcherBase.cxx @@ -29,7 +29,7 @@ namespace { -typedef vtkm::cont::DeviceAdapterTagSerial Device; +using Device = vtkm::cont::DeviceAdapterTagSerial; static const vtkm::Id ARRAY_SIZE = 10; diff --git a/vtkm/worklet/particleadvection/GridEvaluators.h b/vtkm/worklet/particleadvection/GridEvaluators.h index ca971122d..1bc555eb6 100644 --- a/vtkm/worklet/particleadvection/GridEvaluators.h +++ b/vtkm/worklet/particleadvection/GridEvaluators.h @@ -130,7 +130,7 @@ private: template class UniformGridEvaluate { - typedef vtkm::cont::ArrayHandle> FieldHandle; + using FieldHandle = vtkm::cont::ArrayHandle>; public: VTKM_CONT @@ -143,8 +143,8 @@ public: { vectors = vectorField.PrepareForInput(DeviceAdapterTag()); - typedef vtkm::cont::ArrayHandleUniformPointCoordinates UniformType; - typedef vtkm::cont::CellSetStructured<3> StructuredType; + using UniformType = vtkm::cont::ArrayHandleUniformPointCoordinates; + using StructuredType = vtkm::cont::CellSetStructured<3>; if (!coords.GetData().IsType()) throw vtkm::cont::ErrorInternal("Coordinates are not uniform."); @@ -174,7 +174,7 @@ public: VTKM_CONT UniformGridEvaluate(const vtkm::cont::DataSet& ds) { - typedef vtkm::cont::ArrayHandleUniformPointCoordinates UniformType; + using UniformType = vtkm::cont::ArrayHandleUniformPointCoordinates; auto coordArray = ds.GetCoordinateSystem().GetData(); if (!coordArray.IsType()) @@ -311,7 +311,7 @@ private: template class RectilinearGridEvaluate { - typedef vtkm::cont::ArrayHandle> FieldHandle; + using FieldHandle = vtkm::cont::ArrayHandle>; public: VTKM_CONT @@ -319,7 +319,7 @@ public: const vtkm::cont::DynamicCellSet& cellSet, const FieldHandle& vectorField) { - typedef vtkm::cont::CellSetStructured<3> StructuredType; + using StructuredType = vtkm::cont::CellSetStructured<3>; if (!coords.GetData().IsType()) throw vtkm::cont::ErrorInternal("Coordinates are not rectilinear."); @@ -492,11 +492,11 @@ public: } private: - typedef vtkm::cont::ArrayHandle AxisHandle; - typedef vtkm::cont::ArrayHandleCartesianProduct - RectilinearType; - typedef typename RectilinearType::template ExecutionTypes::PortalConst - RectilinearConstPortal; + using AxisHandle = vtkm::cont::ArrayHandle; + using RectilinearType = + vtkm::cont::ArrayHandleCartesianProduct; + using RectilinearConstPortal = + typename RectilinearType::template ExecutionTypes::PortalConst; typename AxisHandle::template ExecutionTypes::PortalConst xAxis; typename AxisHandle::template ExecutionTypes::PortalConst yAxis; typename AxisHandle::template ExecutionTypes::PortalConst zAxis; diff --git a/vtkm/worklet/particleadvection/ParticleAdvectionWorklets.h b/vtkm/worklet/particleadvection/ParticleAdvectionWorklets.h index 97cf9d746..0ff2c7b3e 100644 --- a/vtkm/worklet/particleadvection/ParticleAdvectionWorklets.h +++ b/vtkm/worklet/particleadvection/ParticleAdvectionWorklets.h @@ -44,7 +44,7 @@ class ParticleAdvectWorklet : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn idx, ExecObject ic); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::Id& idx, IntegralCurveType& ic) const @@ -86,11 +86,11 @@ template DeviceAlgorithm; - typedef vtkm::worklet::particleadvection::ParticleAdvectWorklet - ParticleAdvectWorkletType; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; + using ParticleAdvectWorkletType = + vtkm::worklet::particleadvection::ParticleAdvectWorklet; ParticleAdvectionWorklet() {} @@ -139,14 +139,14 @@ template > FieldHandle; - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; - typedef typename FieldHandle::template ExecutionTypes::PortalConst - FieldPortalConstType; - typedef vtkm::worklet::particleadvection::ParticleAdvectWorklet - ParticleAdvectWorkletType; + using FieldHandle = vtkm::cont::ArrayHandle>; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; + using FieldPortalConstType = + typename FieldHandle::template ExecutionTypes::PortalConst; + using ParticleAdvectWorkletType = + vtkm::worklet::particleadvection::ParticleAdvectWorklet; StreamlineWorklet() {} @@ -183,10 +183,10 @@ private: vtkm::cont::ArrayHandle& status, vtkm::cont::ArrayHandle& stepsTaken) { - typedef typename vtkm::worklet::DispatcherMapField - ParticleWorkletDispatchType; - typedef vtkm::worklet::particleadvection::StateRecordingParticles - StreamlineType; + using ParticleWorkletDispatchType = + typename vtkm::worklet::DispatcherMapField; + using StreamlineType = + vtkm::worklet::particleadvection::StateRecordingParticles; vtkm::Id numSeeds = static_cast(seedArray.GetNumberOfValues()); diff --git a/vtkm/worklet/particleadvection/Particles.h b/vtkm/worklet/particleadvection/Particles.h index 54645851a..92db7b43b 100644 --- a/vtkm/worklet/particleadvection/Particles.h +++ b/vtkm/worklet/particleadvection/Particles.h @@ -48,11 +48,10 @@ class Particles : public vtkm::exec::ExecutionObjectBase { private: - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - IdPortal; - typedef typename vtkm::cont::ArrayHandle>::template ExecutionTypes< - DeviceAdapterTag>::Portal PosPortal; + using IdPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; + using PosPortal = typename vtkm::cont::ArrayHandle>::template ExecutionTypes< + DeviceAdapterTag>::Portal; public: VTKM_EXEC_CONT @@ -208,13 +207,12 @@ class StateRecordingParticles : public Particles { private: - typedef - typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal - IdPortal; - typedef typename vtkm::cont::ArrayHandle::template ExecutionTypes< - DeviceAdapterTag>::Portal IdComponentPortal; - typedef typename vtkm::cont::ArrayHandle>::template ExecutionTypes< - DeviceAdapterTag>::Portal PosPortal; + using IdPortal = + typename vtkm::cont::ArrayHandle::template ExecutionTypes::Portal; + using IdComponentPortal = typename vtkm::cont::ArrayHandle< + vtkm::IdComponent>::template ExecutionTypes::Portal; + using PosPortal = typename vtkm::cont::ArrayHandle>::template ExecutionTypes< + DeviceAdapterTag>::Portal; public: VTKM_EXEC_CONT diff --git a/vtkm/worklet/spatialstructure/KdTree3DConstruction.h b/vtkm/worklet/spatialstructure/KdTree3DConstruction.h index 356d02531..f0d88d0c9 100644 --- a/vtkm/worklet/spatialstructure/KdTree3DConstruction.h +++ b/vtkm/worklet/spatialstructure/KdTree3DConstruction.h @@ -238,7 +238,7 @@ public: BinaryFunctor binary_functor, DeviceAdapter vtkmNotUsed(device)) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle resultHandle; @@ -337,7 +337,7 @@ public: vtkm::cont::ArrayHandle& segIdHandle, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle segCountAryHandle; { @@ -363,7 +363,7 @@ public: vtkm::cont::ArrayHandle& C_Handle, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle D_Handle; T initValue = 0; @@ -400,7 +400,7 @@ public: vtkm::cont::ArrayHandle& D_Handle, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id nPoints = A_Handle.GetNumberOfValues(); @@ -464,7 +464,7 @@ public: vtkm::cont::ArrayHandle& Z_Handle, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle D_Handle; T initValue = 0; @@ -518,7 +518,7 @@ public: vtkm::Int32 level, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandle flag_Handle; if (level % 3 == 0) @@ -581,7 +581,7 @@ public: vtkm::cont::ArrayHandle& splitId_Handle, DeviceAdapter device) { - typedef typename vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::Id nTrainingPoints = coordi_Handle.GetNumberOfValues(); vtkm::cont::ArrayHandleCounting counting_Handle(0, 1, nTrainingPoints); diff --git a/vtkm/worklet/splatkernels/KernelBase.h b/vtkm/worklet/splatkernels/KernelBase.h index 47e1f0efb..143884bd7 100644 --- a/vtkm/worklet/splatkernels/KernelBase.h +++ b/vtkm/worklet/splatkernels/KernelBase.h @@ -31,7 +31,7 @@ namespace splatkernels { // Vector class used in the kernels -typedef vtkm::Vec vector_type; +using vector_type = vtkm::Vec; // Pi compatibility #ifndef M_PI #define M_PI vtkm::Pi() diff --git a/vtkm/worklet/testing/UnitTestCellSetConnectivity.cpp b/vtkm/worklet/testing/UnitTestCellSetConnectivity.cpp index 76b63d937..e5b5fa547 100644 --- a/vtkm/worklet/testing/UnitTestCellSetConnectivity.cpp +++ b/vtkm/worklet/testing/UnitTestCellSetConnectivity.cpp @@ -30,7 +30,7 @@ class TangleField : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn vertexId, FieldOut v); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; const vtkm::Id xdim, ydim, zdim; const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax; diff --git a/vtkm/worklet/testing/UnitTestClipping.cxx b/vtkm/worklet/testing/UnitTestClipping.cxx index 7e928bd5a..a60ea2bb5 100644 --- a/vtkm/worklet/testing/UnitTestClipping.cxx +++ b/vtkm/worklet/testing/UnitTestClipping.cxx @@ -35,7 +35,7 @@ #include -typedef vtkm::Vec Coord3D; +using Coord3D = vtkm::Vec; const vtkm::Float32 clipValue = 0.5; diff --git a/vtkm/worklet/testing/UnitTestCosmoTools.cxx b/vtkm/worklet/testing/UnitTestCosmoTools.cxx index 3693d85d6..0c7175246 100644 --- a/vtkm/worklet/testing/UnitTestCosmoTools.cxx +++ b/vtkm/worklet/testing/UnitTestCosmoTools.cxx @@ -130,7 +130,7 @@ vtkm::cont::DataSet MakeCosmo_3DDataSet_0() // Coordinates const int nVerts = 14; const int nCells = 14; - typedef vtkm::Vec CoordType; + using CoordType = vtkm::Vec; std::vector coords(nVerts); coords[0] = CoordType(20.8125f, 10.8864f, 0.309784f); diff --git a/vtkm/worklet/testing/UnitTestExternalFaces.cxx b/vtkm/worklet/testing/UnitTestExternalFaces.cxx index 634976f08..28e377676 100644 --- a/vtkm/worklet/testing/UnitTestExternalFaces.cxx +++ b/vtkm/worklet/testing/UnitTestExternalFaces.cxx @@ -79,7 +79,7 @@ void TestExternalFaces1() //--------------Construct a VTK-m Test Dataset---------------- const int nVerts = 8; //A cube that is tetrahedralized - typedef vtkm::Vec CoordType; + using CoordType = vtkm::Vec; vtkm::cont::ArrayHandle coordinates; coordinates.Allocate(nVerts); coordinates.GetPortalControl().Set(0, CoordType(0.0f, 0.0f, 0.0f)); diff --git a/vtkm/worklet/testing/UnitTestExtractGeometry.cxx b/vtkm/worklet/testing/UnitTestExtractGeometry.cxx index c1af77958..2ab60372f 100644 --- a/vtkm/worklet/testing/UnitTestExtractGeometry.cxx +++ b/vtkm/worklet/testing/UnitTestExtractGeometry.cxx @@ -34,8 +34,8 @@ public: { std::cout << "Testing extract cell explicit by id:" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -67,7 +67,7 @@ public: { std::cout << "Testing extract cells with implicit function (box) on explicit:" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -109,8 +109,8 @@ public: { std::cout << "Testing extract cells structured by id:" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created @@ -143,8 +143,8 @@ public: { std::cout << "Testing extract cells structured by id:" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -176,7 +176,7 @@ public: { std::cout << "Testing extract cells with implicit function (box):" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -217,7 +217,7 @@ public: { std::cout << "Testing extract cells with implicit function (sphere):" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); diff --git a/vtkm/worklet/testing/UnitTestExtractPoints.cxx b/vtkm/worklet/testing/UnitTestExtractPoints.cxx index 3227aad52..430c876b1 100644 --- a/vtkm/worklet/testing/UnitTestExtractPoints.cxx +++ b/vtkm/worklet/testing/UnitTestExtractPoints.cxx @@ -33,7 +33,7 @@ public: { std::cout << "Testing extract points structured by id:" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -60,7 +60,7 @@ public: { std::cout << "Testing extract points with implicit function (box):" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -92,7 +92,7 @@ public: { std::cout << "Testing extract points with implicit function (box):" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -124,7 +124,7 @@ public: { std::cout << "Testing extract points with implicit function (sphere):" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -156,7 +156,7 @@ public: { std::cout << "Testing extract points with implicit function (box) on explicit:" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -188,7 +188,7 @@ public: { std::cout << "Testing extract points with implicit function (box) on explicit:" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); @@ -220,7 +220,7 @@ public: { std::cout << "Testing extract points explicit by id:" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); diff --git a/vtkm/worklet/testing/UnitTestExtractStructured.cxx b/vtkm/worklet/testing/UnitTestExtractStructured.cxx index b89407423..5f24497f4 100644 --- a/vtkm/worklet/testing/UnitTestExtractStructured.cxx +++ b/vtkm/worklet/testing/UnitTestExtractStructured.cxx @@ -33,7 +33,7 @@ public: void TestUniform2D() const { std::cout << "Testing extract structured uniform 2D" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DUniformDataSet1(); @@ -57,7 +57,7 @@ public: void TestUniform3D() const { std::cout << "Testing extract structured uniform 3D" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet1(); @@ -122,7 +122,7 @@ public: void TestUniform3D1() const { std::cout << "Testing extract structured uniform with sampling" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet1(); @@ -172,7 +172,7 @@ public: void TestRectilinear2D() const { std::cout << "Testing extract structured rectilinear" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DRectilinearDataSet0(); @@ -197,7 +197,7 @@ public: void TestRectilinear3D() const { std::cout << "Testing extract structured rectilinear" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DRectilinearDataSet0(); diff --git a/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx b/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx index 1945c11bd..fdc95b00d 100644 --- a/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx +++ b/vtkm/worklet/testing/UnitTestKdTreeBuildNNS.cxx @@ -24,7 +24,7 @@ namespace { -typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; +using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; ////brute force method ///// template diff --git a/vtkm/worklet/testing/UnitTestMagnitude.cxx b/vtkm/worklet/testing/UnitTestMagnitude.cxx index d13462b16..da36d6486 100644 --- a/vtkm/worklet/testing/UnitTestMagnitude.cxx +++ b/vtkm/worklet/testing/UnitTestMagnitude.cxx @@ -32,9 +32,9 @@ void TestMagnitude() vtkm::worklet::Magnitude magnitudeWorklet; - typedef vtkm::cont::ArrayHandle ArrayReturnType; - typedef vtkm::cont::ArrayHandle> ArrayVectorType; - typedef ArrayVectorType::PortalControl PortalType; + using ArrayReturnType = vtkm::cont::ArrayHandle; + using ArrayVectorType = vtkm::cont::ArrayHandle>; + using PortalType = ArrayVectorType::PortalControl; ArrayVectorType pythagoreanTriples; pythagoreanTriples.Allocate(5); diff --git a/vtkm/worklet/testing/UnitTestMarchingCubes.cxx b/vtkm/worklet/testing/UnitTestMarchingCubes.cxx index 02457d4d7..9dc010730 100644 --- a/vtkm/worklet/testing/UnitTestMarchingCubes.cxx +++ b/vtkm/worklet/testing/UnitTestMarchingCubes.cxx @@ -36,7 +36,7 @@ class TangleField : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn vertexId, FieldOut v); typedef void ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; const vtkm::Id xdim, ydim, zdim; const vtkm::FloatDefault xmin, ymin, zmin, xmax, ymax, zmax; @@ -169,8 +169,8 @@ public: VTKM_EXEC_CONT vtkm::Id operator()(vtkm::Id vertex) const { - typedef vtkm::CellShapeTagHexahedron HexTag; - typedef vtkm::CellTraits HexTraits; + using HexTag = vtkm::CellShapeTagHexahedron; + using HexTraits = vtkm::CellTraits; vtkm::Id cellId = vertex / HexTraits::NUM_POINTS; vtkm::Id localId = vertex % HexTraits::NUM_POINTS; @@ -210,18 +210,16 @@ private: class MakeRadiantDataSet { public: - typedef vtkm::cont::ArrayHandleUniformPointCoordinates CoordinateArrayHandle; - typedef vtkm::cont::ArrayHandleTransform - DataArrayHandle; - typedef vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity> - ConnectivityArrayHandle; - - typedef vtkm::cont::CellSetSingleType< + using CoordinateArrayHandle = vtkm::cont::ArrayHandleUniformPointCoordinates; + using DataArrayHandle = + vtkm::cont::ArrayHandleTransform; + using ConnectivityArrayHandle = vtkm::cont::ArrayHandleTransform, - CubeGridConnectivity>::StorageTag> - CellSet; + CubeGridConnectivity>; + + using CellSet = vtkm::cont::CellSetSingleType< + vtkm::cont::ArrayHandleTransform, + CubeGridConnectivity>::StorageTag>; vtkm::cont::DataSet Make3DRadiantDataSet(vtkm::IdComponent dim = 5); }; @@ -233,10 +231,10 @@ inline vtkm::cont::DataSet MakeRadiantDataSet::Make3DRadiantDataSet(vtkm::IdComp vtkm::cont::DataSet dataSet; - typedef vtkm::CellShapeTagHexahedron HexTag; - typedef vtkm::CellTraits HexTraits; + using HexTag = vtkm::CellShapeTagHexahedron; + using HexTraits = vtkm::CellTraits; - typedef vtkm::Vec CoordType; + using CoordType = vtkm::Vec; const vtkm::IdComponent nCells = dim * dim * dim; @@ -284,7 +282,7 @@ void TestMarchingCubesUniformGrid() vtkm::Id3 dims(4, 4, 4); vtkm::cont::DataSet dataSet = MakeIsosurfaceTestDataSet(dims); - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; vtkm::cont::CellSetStructured<3> cellSet; dataSet.GetCellSet().CopyTo(cellSet); vtkm::cont::ArrayHandle pointFieldArray; @@ -338,10 +336,10 @@ void TestMarchingCubesExplicit() { std::cout << "Testing MarchingCubes filter on explicit data" << std::endl; - typedef MakeRadiantDataSet DataSetGenerator; - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef vtkm::cont::ArrayHandle> Vec3Handle; - typedef vtkm::cont::ArrayHandle DataHandle; + using DataSetGenerator = MakeRadiantDataSet; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using Vec3Handle = vtkm::cont::ArrayHandle>; + using DataHandle = vtkm::cont::ArrayHandle; DataSetGenerator dataSetGenerator; diff --git a/vtkm/worklet/testing/UnitTestMask.cxx b/vtkm/worklet/testing/UnitTestMask.cxx index 86af74620..ef7ad3d48 100644 --- a/vtkm/worklet/testing/UnitTestMask.cxx +++ b/vtkm/worklet/testing/UnitTestMask.cxx @@ -41,8 +41,8 @@ public: { std::cout << "Testing mask cells structured:" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); @@ -69,8 +69,8 @@ public: { std::cout << "Testing mask cells structured:" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); CellSetType cellSet; @@ -96,8 +96,8 @@ public: { std::cout << "Testing mask cells explicit:" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; + using OutCellSetType = vtkm::cont::CellSetPermutation; // Input data set created vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); diff --git a/vtkm/worklet/testing/UnitTestMaskPoints.cxx b/vtkm/worklet/testing/UnitTestMaskPoints.cxx index f564d6d95..9fab6cdf4 100644 --- a/vtkm/worklet/testing/UnitTestMaskPoints.cxx +++ b/vtkm/worklet/testing/UnitTestMaskPoints.cxx @@ -43,7 +43,7 @@ public: { std::cout << "Testing mask points stride on 2D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); @@ -64,7 +64,7 @@ public: { std::cout << "Testing mask points stride on 3D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -85,7 +85,7 @@ public: { std::cout << "Testing mask points stride on 3D explicit dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); diff --git a/vtkm/worklet/testing/UnitTestParticleAdvection.cxx b/vtkm/worklet/testing/UnitTestParticleAdvection.cxx index 58bb17fec..7fa044fc6 100644 --- a/vtkm/worklet/testing/UnitTestParticleAdvection.cxx +++ b/vtkm/worklet/testing/UnitTestParticleAdvection.cxx @@ -162,8 +162,8 @@ void CreateConstantVectorField(vtkm::Id num, const vtkm::Vec& vec, vtkm::cont::ArrayHandle>& vecField) { - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef typename vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using DeviceAlgorithm = typename vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::ArrayHandleConstant> vecConst; vecConst = vtkm::cont::make_ArrayHandleConstant(vec, num); @@ -199,9 +199,9 @@ void ValidateEvaluator(const EvalType& eval, const vtkm::Vec& vec, const std::string& msg) { - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef TestEvaluatorWorklet EvalTester; - typedef vtkm::worklet::DispatcherMapField EvalTesterDispatcher; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using EvalTester = TestEvaluatorWorklet; + using EvalTesterDispatcher = vtkm::worklet::DispatcherMapField; EvalTester evalTester(eval); EvalTesterDispatcher evalTesterDispatcher(evalTester); vtkm::cont::ArrayHandle> pointsHandle = @@ -257,10 +257,10 @@ void ValidateIntegrator(const IntegratorType& integrator, const std::vector>& expStepResults, const std::string& msg) { - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef TestIntegratorWorklet IntegratorTester; - typedef vtkm::worklet::DispatcherMapField IntegratorTesterDispatcher; - typedef vtkm::worklet::particleadvection::ParticleStatus Status; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using IntegratorTester = TestIntegratorWorklet; + using IntegratorTesterDispatcher = vtkm::worklet::DispatcherMapField; + using Status = vtkm::worklet::particleadvection::ParticleStatus; IntegratorTester integratorTester(integrator); IntegratorTesterDispatcher integratorTesterDispatcher(integratorTester); vtkm::cont::ArrayHandle> pointsHandle = @@ -291,30 +291,30 @@ void ValidateIntegrator(const IntegratorType& integrator, void TestEvaluators() { - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef vtkm::Float32 FieldType; - typedef vtkm::cont::ArrayHandle> FieldHandle; - typedef FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using FieldType = vtkm::Float32; + using FieldHandle = vtkm::cont::ArrayHandle>; + using FieldPortalConstType = FieldHandle::template ExecutionTypes::PortalConst; //Constant field evaluator and RK4 integrator. - typedef vtkm::worklet::particleadvection::ConstantField CEvalType; - typedef vtkm::worklet::particleadvection::RK4Integrator RK4CType; + using CEvalType = vtkm::worklet::particleadvection::ConstantField; + using RK4CType = vtkm::worklet::particleadvection::RK4Integrator; //Uniform grid evaluator and RK4 integrator. - typedef vtkm::worklet::particleadvection::UniformGridEvaluate - UniformEvalType; - typedef vtkm::worklet::particleadvection::RK4Integrator - RK4UniformType; + using UniformEvalType = + vtkm::worklet::particleadvection::UniformGridEvaluate; + using RK4UniformType = + vtkm::worklet::particleadvection::RK4Integrator; //Rectilinear grid evaluator and RK4 integrator. - typedef vtkm::worklet::particleadvection::RectilinearGridEvaluate - RectilinearEvalType; - typedef vtkm::worklet::particleadvection::RK4Integrator - RK4RectilinearType; + using RectilinearEvalType = + vtkm::worklet::particleadvection::RectilinearGridEvaluate; + using RK4RectilinearType = + vtkm::worklet::particleadvection::RK4Integrator; std::vector> vecs; vecs.push_back(vtkm::Vec(1, 0, 0)); @@ -410,10 +410,10 @@ void TestEvaluators() void TestParticleWorklets() { - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; - typedef vtkm::Float32 FieldType; - typedef vtkm::cont::ArrayHandle> FieldHandle; - typedef FieldHandle::template ExecutionTypes::PortalConst FieldPortalConstType; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; + using FieldType = vtkm::Float32; + using FieldHandle = vtkm::cont::ArrayHandle>; + using FieldPortalConstType = FieldHandle::template ExecutionTypes::PortalConst; FieldType stepSize = 0.05f; @@ -433,11 +433,10 @@ void TestParticleWorklets() } vtkm::cont::DataSet ds = dataSetBuilder.Create(dims); - typedef vtkm::worklet::particleadvection::UniformGridEvaluate - RGEvalType; - typedef vtkm::worklet::particleadvection::RK4Integrator RK4RGType; + using RGEvalType = vtkm::worklet::particleadvection::UniformGridEvaluate; + using RK4RGType = vtkm::worklet::particleadvection::RK4Integrator; vtkm::cont::ArrayHandle> fieldArray; fieldArray = vtkm::cont::make_ArrayHandle(field); diff --git a/vtkm/worklet/testing/UnitTestScatterCounting.cxx b/vtkm/worklet/testing/UnitTestScatterCounting.cxx index 3b0c3b263..e45f749f6 100644 --- a/vtkm/worklet/testing/UnitTestScatterCounting.cxx +++ b/vtkm/worklet/testing/UnitTestScatterCounting.cxx @@ -55,7 +55,7 @@ TestScatterArrays MakeScatterArraysShort() const vtkm::IdComponent visitArray[outputSize] = { 0, 0, 1, 0, 0, 0 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; // Need to copy arrays so that the data does not go out of scope. Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); @@ -78,7 +78,7 @@ TestScatterArrays MakeScatterArraysLong() const vtkm::IdComponent visitArray[outputSize] = { 0, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 2, 3, 4 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; // Need to copy arrays so that the data does not go out of scope. Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); @@ -98,7 +98,7 @@ TestScatterArrays MakeScatterArraysZero() const vtkm::Id inputToOutputMap[countArraySize] = { 0, 0, 0, 0, 0, 0 }; TestScatterArrays arrays; - typedef vtkm::cont::DeviceAdapterAlgorithm Algorithm; + using Algorithm = vtkm::cont::DeviceAdapterAlgorithm; // Need to copy arrays so that the data does not go out of scope. Algorithm::Copy(vtkm::cont::make_ArrayHandle(countArray, countArraySize), arrays.CountArray); @@ -118,7 +118,7 @@ struct TestScatterCountingWorklet : public vtkm::worklet::WorkletMapField FieldOut<> recordWorkId); typedef void ExecutionSignature(_1, _2, _3, _4, VisitIndex, WorkIndex); - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } @@ -161,7 +161,7 @@ private: template void CompareArrays(vtkm::cont::ArrayHandle array1, vtkm::cont::ArrayHandle array2) { - typedef typename vtkm::cont::ArrayHandle::PortalConstControl PortalType; + using PortalType = typename vtkm::cont::ArrayHandle::PortalConstControl; PortalType portal1 = array1.GetPortalConstControl(); PortalType portal2 = array2.GetPortalConstControl(); diff --git a/vtkm/worklet/testing/UnitTestSplatKernels.cxx b/vtkm/worklet/testing/UnitTestSplatKernels.cxx index 769b59ac5..6ee8e5cca 100644 --- a/vtkm/worklet/testing/UnitTestSplatKernels.cxx +++ b/vtkm/worklet/testing/UnitTestSplatKernels.cxx @@ -31,7 +31,7 @@ #include "KernelWendland.h" */ -typedef vtkm::Vec Vector; +using Vector = vtkm::Vec; // Simpson integradion rule double SimpsonIntegration(const std::vector& y, const std::vector& x) diff --git a/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx b/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx index 048eb1f08..eb13a2ec0 100644 --- a/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx +++ b/vtkm/worklet/testing/UnitTestStreamLineUniformGrid.cxx @@ -113,7 +113,7 @@ void TestStreamLineUniformGrid() { std::cout << "Testing StreamLineUniformGrid Filter" << std::endl; - typedef VTKM_DEFAULT_DEVICE_ADAPTER_TAG DeviceAdapter; + using DeviceAdapter = VTKM_DEFAULT_DEVICE_ADAPTER_TAG; // Parameters for streamlines vtkm::Id numSeeds = 5; diff --git a/vtkm/worklet/testing/UnitTestStreamingSine.cxx b/vtkm/worklet/testing/UnitTestStreamingSine.cxx index 1f74450fd..1a30b4e98 100644 --- a/vtkm/worklet/testing/UnitTestStreamingSine.cxx +++ b/vtkm/worklet/testing/UnitTestStreamingSine.cxx @@ -77,7 +77,7 @@ void TestStreamingSine() } input = vtkm::cont::make_ArrayHandle(data); - typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithms; + using DeviceAlgorithms = vtkm::cont::DeviceAdapterAlgorithm; vtkm::worklet::SineWorklet sineWorklet; vtkm::worklet::DispatcherStreamingMapField dispatcher(sineWorklet); dispatcher.SetNumberOfBlocks(NBlocks); diff --git a/vtkm/worklet/testing/UnitTestTetrahedralize.cxx b/vtkm/worklet/testing/UnitTestTetrahedralize.cxx index d3dd4e182..a0c127fa3 100644 --- a/vtkm/worklet/testing/UnitTestTetrahedralize.cxx +++ b/vtkm/worklet/testing/UnitTestTetrahedralize.cxx @@ -40,8 +40,8 @@ public: void TestStructured() const { std::cout << "Testing TetrahedralizeStructured" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DUniformDataSet0(); @@ -68,8 +68,8 @@ public: void TestExplicit() const { std::cout << "Testing TetrahedralizeExplicit" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Create the input explicit cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make3DExplicitDataSet5(); diff --git a/vtkm/worklet/testing/UnitTestThreshold.cxx b/vtkm/worklet/testing/UnitTestThreshold.cxx index a3cbb72a3..5beba5e5e 100644 --- a/vtkm/worklet/testing/UnitTestThreshold.cxx +++ b/vtkm/worklet/testing/UnitTestThreshold.cxx @@ -61,8 +61,8 @@ public: { std::cout << "Testing threshold on 2D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; + using OutCellSetType = vtkm::cont::CellSetPermutation; vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet0(); @@ -92,8 +92,8 @@ public: { std::cout << "Testing threshold on 3D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetStructured<3> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<3>; + using OutCellSetType = vtkm::cont::CellSetPermutation; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet0(); @@ -124,8 +124,8 @@ public: { std::cout << "Testing threshold on 3D explicit dataset" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; - typedef vtkm::cont::CellSetPermutation OutCellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; + using OutCellSetType = vtkm::cont::CellSetPermutation; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet0(); diff --git a/vtkm/worklet/testing/UnitTestThresholdPoints.cxx b/vtkm/worklet/testing/UnitTestThresholdPoints.cxx index c02c311e7..ae7d67fa6 100644 --- a/vtkm/worklet/testing/UnitTestThresholdPoints.cxx +++ b/vtkm/worklet/testing/UnitTestThresholdPoints.cxx @@ -106,7 +106,7 @@ public: { std::cout << "Testing threshold on 2D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make2DUniformDataSet1(); @@ -138,7 +138,7 @@ public: { std::cout << "Testing threshold on 3D uniform dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DUniformDataSet1(); @@ -164,7 +164,7 @@ public: { std::cout << "Testing threshold on 3D explicit dataset" << std::endl; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; vtkm::cont::DataSet dataset = MakeTestDataSet().Make3DExplicitDataSet5(); diff --git a/vtkm/worklet/testing/UnitTestTriangulate.cxx b/vtkm/worklet/testing/UnitTestTriangulate.cxx index d2bcfc91e..58d8c04dc 100644 --- a/vtkm/worklet/testing/UnitTestTriangulate.cxx +++ b/vtkm/worklet/testing/UnitTestTriangulate.cxx @@ -35,8 +35,8 @@ public: void TestStructured() const { std::cout << "Testing TriangulateStructured:" << std::endl; - typedef vtkm::cont::CellSetStructured<2> CellSetType; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using CellSetType = vtkm::cont::CellSetStructured<2>; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DUniformDataSet1(); @@ -60,8 +60,8 @@ public: void TestExplicit() const { std::cout << "Testing TriangulateExplicit:" << std::endl; - typedef vtkm::cont::CellSetExplicit<> CellSetType; - typedef vtkm::cont::CellSetSingleType<> OutCellSetType; + using CellSetType = vtkm::cont::CellSetExplicit<>; + using OutCellSetType = vtkm::cont::CellSetSingleType<>; // Create the input uniform cell set vtkm::cont::DataSet dataSet = MakeTestDataSet().Make2DExplicitDataSet0(); diff --git a/vtkm/worklet/testing/UnitTestVertexClustering.cxx b/vtkm/worklet/testing/UnitTestVertexClustering.cxx index b8d18fa08..5f6ed89f3 100644 --- a/vtkm/worklet/testing/UnitTestVertexClustering.cxx +++ b/vtkm/worklet/testing/UnitTestVertexClustering.cxx @@ -67,7 +67,7 @@ void TestVertexClustering() vtkm::Float32 output_cellvar[output_pointIds / 3] = { 145.f, 134.f, 138.f, 140.f, 149.f, 144.f }; { - typedef vtkm::cont::CellSetSingleType<> CellSetType; + using CellSetType = vtkm::cont::CellSetSingleType<>; CellSetType cellSet; outDataSet.GetCellSet(0).CopyTo(cellSet); auto cellArray = @@ -89,7 +89,7 @@ void TestVertexClustering() VTKM_TEST_ASSERT(outDataSet.GetNumberOfCoordinateSystems() == 1, "Number of output coordinate systems mismatch"); - typedef vtkm::Vec PointType; + using PointType = vtkm::Vec; auto pointArray = outDataSet.GetCoordinateSystem(0).GetData(); VTKM_TEST_ASSERT(pointArray.GetNumberOfValues() == output_points, "Number of output points mismatch"); @@ -100,7 +100,7 @@ void TestVertexClustering() VTKM_TEST_ASSERT(test_equal(p1, p2), "Point Array mismatch"); } - typedef vtkm::cont::CellSetSingleType<> CellSetType; + using CellSetType = vtkm::cont::CellSetSingleType<>; VTKM_TEST_ASSERT(outDataSet.GetNumberOfCellSets() == 1, "Number of output cellsets mismatch"); CellSetType cellSet; outDataSet.GetCellSet(0).CopyTo(cellSet); diff --git a/vtkm/worklet/testing/UnitTestWaveletCompressor.cxx b/vtkm/worklet/testing/UnitTestWaveletCompressor.cxx index 9c7632eaf..ec166d529 100644 --- a/vtkm/worklet/testing/UnitTestWaveletCompressor.cxx +++ b/vtkm/worklet/testing/UnitTestWaveletCompressor.cxx @@ -152,7 +152,7 @@ private: template void FillArray2D(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY) { - typedef vtkm::worklet::wavelets::GaussianWorklet2D WorkletType; + using WorkletType = vtkm::worklet::wavelets::GaussianWorklet2D; WorkletType worklet(dimX, dimY, 100.0, @@ -166,7 +166,7 @@ void FillArray2D(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY) template void FillArray3D(ArrayType& array, vtkm::Id dimX, vtkm::Id dimY, vtkm::Id dimZ) { - typedef vtkm::worklet::wavelets::GaussianWorklet3D WorkletType; + using WorkletType = vtkm::worklet::wavelets::GaussianWorklet3D; WorkletType worklet(dimX, dimY, dimZ); vtkm::worklet::DispatcherMapField dispatcher(worklet); dispatcher.Invoke(array); diff --git a/vtkm/worklet/testing/UnitTestWorkletMapField.cxx b/vtkm/worklet/testing/UnitTestWorkletMapField.cxx index 970242690..107a8aac9 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapField.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapField.cxx @@ -175,7 +175,7 @@ struct DoTestWorklet void TestWorkletMapField() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Map Field on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx b/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx index 3b35923c6..45c7fba52 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapFieldExecArg.cxx @@ -104,7 +104,7 @@ struct DoTestWorklet void TestWorkletMapFieldExecArg() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Worklet with WholeArray on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx b/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx index 286d2d546..49d9e34e5 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapFieldWholeArray.cxx @@ -38,20 +38,20 @@ public: const InOutPortalType& inOutPortal, const OutPortalType& outPortal) const { - typedef typename InPortalType::ValueType inT; + using inT = typename InPortalType::ValueType; if (!test_equal(inPortal.Get(index), TestValue(index, inT()))) { this->RaiseError("Got wrong input value."); } - typedef typename InOutPortalType::ValueType inOutT; + using inOutT = typename InOutPortalType::ValueType; if (!test_equal(inOutPortal.Get(index), TestValue(index, inOutT()) + inOutT(100))) { this->RaiseError("Got wrong input/output value."); } inOutPortal.Set(index, TestValue(index, inOutT())); - typedef typename OutPortalType::ValueType outT; + using outT = typename OutPortalType::ValueType; outPortal.Set(index, TestValue(index, outT())); } }; @@ -61,12 +61,12 @@ class TestAtomicArrayWorklet : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn<>, AtomicArrayInOut<>); typedef void ExecutionSignature(WorkIndex, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC void operator()(const vtkm::Id& index, const AtomicArrayType& atomicArray) const { - typedef typename AtomicArrayType::ValueType ValueType; + using ValueType = typename AtomicArrayType::ValueType; atomicArray.Add(0, static_cast(index)); } }; @@ -78,7 +78,7 @@ static const vtkm::Id ARRAY_SIZE = 10; struct DoTestWholeArrayWorklet { - typedef TestWholeArrayWorklet WorkletType; + using WorkletType = TestWholeArrayWorklet; // This just demonstrates that the WholeArray tags support dynamic arrays. VTKM_CONT @@ -122,7 +122,7 @@ struct DoTestWholeArrayWorklet struct DoTestAtomicArrayWorklet { - typedef TestAtomicArrayWorklet WorkletType; + using WorkletType = TestAtomicArrayWorklet; // This just demonstrates that the WholeArray tags support dynamic arrays. VTKM_CONT @@ -153,7 +153,7 @@ struct DoTestAtomicArrayWorklet void TestWorkletMapFieldExecArg() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Worklet with WholeArray on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletMapPointNeighborhood.cxx b/vtkm/worklet/testing/UnitTestWorkletMapPointNeighborhood.cxx index 9810c0fe2..489708676 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapPointNeighborhood.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapPointNeighborhood.cxx @@ -44,7 +44,7 @@ struct MaxNeighborValue : public vtkm::worklet::WorkletPointNeighborhood3x3x3 typedef void ExecutionSignature(OnBoundary, _1, _3); //verify input domain can be something other than first parameter - typedef _2 InputDomain; + using InputDomain = _2; template VTKM_EXEC void operator()(const vtkm::exec::arg::BoundaryState& boundary, @@ -210,7 +210,7 @@ static void TestScatterUnfiormNeighbor(); void TestWorkletPointNeighborhood() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Point Neighborhood Worklet on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx b/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx index 2fe43836c..6cfd1a682 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapTopologyExplicit.cxx @@ -42,7 +42,7 @@ public: CellSetIn topology, FieldOutCell outCells); typedef void ExecutionSignature(_1, _4, _2, PointCount, CellShape, PointIndices); - typedef _3 InputDomain; + using InputDomain = _3; VTKM_CONT MaxPointOrCellValue() {} @@ -78,7 +78,7 @@ static void TestAvgCellToPoint(); void TestWorkletMapTopologyExplicit() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Topology Worklet ( Explicit ) on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx index f3da0be35..7d88d583d 100644 --- a/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletMapTopologyUniform.cxx @@ -42,7 +42,7 @@ public: CellSetIn topology, FieldOutCell outCells); typedef void ExecutionSignature(_1, _4, _2, PointCount, CellShape, PointIndices); - typedef _3 InputDomain; + using InputDomain = _3; VTKM_CONT MaxPointOrCellValue() {} @@ -101,7 +101,7 @@ static void TestStructuredUniformPointCoords(); void TestWorkletMapTopologyUniform() { - typedef vtkm::cont::DeviceAdapterTraits DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Topology Worklet ( Uniform ) on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx b/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx index 25b624fda..bac8b5eb3 100644 --- a/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx +++ b/vtkm/worklet/testing/UnitTestWorkletReduceByKey.cxx @@ -57,7 +57,7 @@ struct CheckKeyValuesWorklet : vtkm::worklet::WorkletReduceByKey ValuesInOut<> valuesToModify, ValuesOut<> writeKey); typedef void ExecutionSignature(_1, _2, _3, _4, _5, WorkIndex, ValueCount); - typedef _1 InputDomain; + using InputDomain = _1; template DeviceAdapterTraits; + using DeviceAdapterTraits = vtkm::cont::DeviceAdapterTraits; std::cout << "Testing Map Field on device adapter: " << DeviceAdapterTraits::GetName() << std::endl; diff --git a/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h b/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h index 26b14245a..39e8155b2 100644 --- a/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h +++ b/vtkm/worklet/tetrahedralize/TetrahedralizeExplicit.h @@ -57,7 +57,7 @@ public: public: typedef void ControlSignature(FieldIn<> shapes, ExecObject tables, FieldOut<> tetrahedronCount); typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_CONT TetrahedraPerCell() {} @@ -83,9 +83,9 @@ public: ExecObject tables, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(CellShape, PointIndices, _2, _3, VisitIndex); - typedef _1 InputDomain; + using InputDomain = _1; - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } diff --git a/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h b/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h index 75c01053d..a9f2dc653 100644 --- a/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h +++ b/vtkm/worklet/tetrahedralize/TetrahedralizeStructured.h @@ -56,9 +56,9 @@ public: public: typedef void ControlSignature(CellSetIn cellset, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(PointIndices, _2, ThreadIndices); - typedef _1 InputDomain; + using InputDomain = _1; - typedef vtkm::worklet::ScatterUniform ScatterType; + using ScatterType = vtkm::worklet::ScatterUniform; VTKM_CONT ScatterType GetScatter() const { return ScatterType(5); } @@ -94,7 +94,7 @@ public: vtkm::cont::CellSetSingleType<> Run(const CellSetType& cellSet, vtkm::cont::ArrayHandle& outCellsPerCell) { - typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); vtkm::cont::ArrayHandle connectivity; diff --git a/vtkm/worklet/triangulate/TriangulateExplicit.h b/vtkm/worklet/triangulate/TriangulateExplicit.h index c214cbaed..0876efad6 100644 --- a/vtkm/worklet/triangulate/TriangulateExplicit.h +++ b/vtkm/worklet/triangulate/TriangulateExplicit.h @@ -60,7 +60,7 @@ public: ExecObject tables, FieldOut<> triangleCount); typedef _4 ExecutionSignature(_1, _2, _3); - typedef _1 InputDomain; + using InputDomain = _1; VTKM_CONT TrianglesPerCell() {} @@ -86,9 +86,9 @@ public: ExecObject tables, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(CellShape, PointIndices, _2, _3, VisitIndex); - typedef _1 InputDomain; + using InputDomain = _1; - typedef vtkm::worklet::ScatterCounting ScatterType; + using ScatterType = vtkm::worklet::ScatterCounting; VTKM_CONT ScatterType GetScatter() const { return this->Scatter; } diff --git a/vtkm/worklet/triangulate/TriangulateStructured.h b/vtkm/worklet/triangulate/TriangulateStructured.h index 43307996d..6e9443842 100644 --- a/vtkm/worklet/triangulate/TriangulateStructured.h +++ b/vtkm/worklet/triangulate/TriangulateStructured.h @@ -56,9 +56,9 @@ public: public: typedef void ControlSignature(CellSetIn cellset, FieldOutCell<> connectivityOut); typedef void ExecutionSignature(PointIndices, _2, VisitIndex); - typedef _1 InputDomain; + using InputDomain = _1; - typedef vtkm::worklet::ScatterUniform ScatterType; + using ScatterType = vtkm::worklet::ScatterUniform; VTKM_CONT ScatterType GetScatter() const { return ScatterType(2); } @@ -84,7 +84,7 @@ public: vtkm::cont::ArrayHandle& outCellsPerCell) { - typedef vtkm::cont::DeviceAdapterAlgorithm DeviceAlgorithm; + using DeviceAlgorithm = vtkm::cont::DeviceAdapterAlgorithm; vtkm::cont::CellSetSingleType<> outCellSet(cellSet.GetName()); vtkm::cont::ArrayHandle connectivity; diff --git a/vtkm/worklet/wavelets/WaveletBase.h b/vtkm/worklet/wavelets/WaveletBase.h index c0ec5ed97..fec15c4d8 100644 --- a/vtkm/worklet/wavelets/WaveletBase.h +++ b/vtkm/worklet/wavelets/WaveletBase.h @@ -110,7 +110,7 @@ public: vtkm::Id startIdx, DeviceTag) { - typedef vtkm::worklet::wavelets::CopyWorklet CopyType; + using CopyType = vtkm::worklet::wavelets::CopyWorklet; CopyType cp(startIdx); vtkm::worklet::DispatcherMapField dispatcher(cp); dispatcher.Invoke(srcArray, dstArray); @@ -120,7 +120,7 @@ public: template void DeviceAssignZero(ArrayType& array, vtkm::Id index, DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZeroWorklet ZeroWorklet; + using ZeroWorklet = vtkm::worklet::wavelets::AssignZeroWorklet; ZeroWorklet worklet(index); vtkm::worklet::DispatcherMapField dispatcher(worklet); dispatcher.Invoke(array); @@ -134,7 +134,7 @@ public: vtkm::Id rowIdx, DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; + using AssignZero2DType = vtkm::worklet::wavelets::AssignZero2DWorklet; AssignZero2DType zeroWorklet(dimX, dimY, -1, rowIdx); vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); dispatcher.Invoke(array); @@ -148,7 +148,7 @@ public: vtkm::Id colIdx, DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero2DWorklet AssignZero2DType; + using AssignZero2DType = vtkm::worklet::wavelets::AssignZero2DWorklet; AssignZero2DType zeroWorklet(dimX, dimY, colIdx, -1); vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); dispatcher.Invoke(array); @@ -163,7 +163,7 @@ public: vtkm::Id zeroX, // X idx to set zero DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + using AssignZero3DType = vtkm::worklet::wavelets::AssignZero3DWorklet; AssignZero3DType zeroWorklet(dimX, dimY, dimZ, zeroX, -1, -1); vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); dispatcher.Invoke(array); @@ -178,7 +178,7 @@ public: vtkm::Id zeroY, // Y idx to set zero DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + using AssignZero3DType = vtkm::worklet::wavelets::AssignZero3DWorklet; AssignZero3DType zeroWorklet(dimX, dimY, dimZ, -1, zeroY, -1); vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); dispatcher.Invoke(array); @@ -193,7 +193,7 @@ public: vtkm::Id zeroZ, // Y idx to set zero DeviceTag) { - typedef vtkm::worklet::wavelets::AssignZero3DWorklet AssignZero3DType; + using AssignZero3DType = vtkm::worklet::wavelets::AssignZero3DWorklet; AssignZero3DType zeroWorklet(dimX, dimY, dimZ, -1, -1, zeroZ); vtkm::worklet::DispatcherMapField dispatcher(zeroWorklet); dispatcher.Invoke(array); @@ -280,7 +280,7 @@ public: vtkm::cont::ArrayHandle squaredDeviation; // Use a worklet - typedef vtkm::worklet::wavelets::SquaredDeviation SDWorklet; + using SDWorklet = vtkm::worklet::wavelets::SquaredDeviation; SDWorklet sdw(mean); vtkm::worklet::DispatcherMapField dispatcher(sdw); dispatcher.Invoke(array, squaredDeviation); @@ -303,7 +303,7 @@ public: vtkm::Id startY, DeviceTag) { - typedef vtkm::worklet::wavelets::RectangleCopyTo CopyToWorklet; + using CopyToWorklet = vtkm::worklet::wavelets::RectangleCopyTo; CopyToWorklet cp(smallX, smallY, bigX, bigY, startX, startY); vtkm::worklet::DispatcherMapField dispatcher(cp); dispatcher.Invoke(smallRect, bigRect); @@ -324,7 +324,7 @@ public: vtkm::Id startZ, DeviceTag) { - typedef vtkm::worklet::wavelets::CubeCopyTo CopyToWorklet; + using CopyToWorklet = vtkm::worklet::wavelets::CubeCopyTo; CopyToWorklet cp(smallX, smallY, smallZ, bigX, bigY, bigZ, startX, startY, startZ); vtkm::worklet::DispatcherMapField dispatcher(cp); dispatcher.Invoke(smallCube, bigCube); diff --git a/vtkm/worklet/wavelets/WaveletDWT.h b/vtkm/worklet/wavelets/WaveletDWT.h index 813a195ed..fc10c4f1a 100644 --- a/vtkm/worklet/wavelets/WaveletDWT.h +++ b/vtkm/worklet/wavelets/WaveletDWT.h @@ -88,10 +88,10 @@ public: return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + using ValueType = typename SigInArrayType::ValueType; + using ExtendArrayType = vtkm::cont::ArrayHandle; + using ExtensionWorklet = vtkm::worklet::wavelets::ExtensionWorklet3D; + using DispatcherType = typename vtkm::worklet::DispatcherMapField; vtkm::Id extDimX, extDimY, extDimZ; vtkm::worklet::wavelets::ExtensionDirection dir; @@ -253,10 +253,10 @@ public: return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + using ValueType = typename SigInArrayType::ValueType; + using ExtendArrayType = vtkm::cont::ArrayHandle; + using ExtensionWorklet = vtkm::worklet::wavelets::ExtensionWorklet3D; + using DispatcherType = typename vtkm::worklet::DispatcherMapField; vtkm::Id extDimX, extDimY, extDimZ; vtkm::worklet::wavelets::ExtensionDirection dir; @@ -418,10 +418,10 @@ public: return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet3D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + using ValueType = typename SigInArrayType::ValueType; + using ExtendArrayType = vtkm::cont::ArrayHandle; + using ExtensionWorklet = vtkm::worklet::wavelets::ExtensionWorklet3D; + using DispatcherType = typename vtkm::worklet::DispatcherMapField; vtkm::Id extDimX, extDimY, extDimZ; vtkm::worklet::wavelets::ExtensionDirection dir; @@ -630,16 +630,16 @@ public: } vtkm::Id addLen = filterLen / 2; - typedef typename ArrayInType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ArrayType; - typedef vtkm::worklet::wavelets::ForwardTransform3DLeftRight LeftRightXFormType; - typedef vtkm::worklet::wavelets::ForwardTransform3DTopDown TopDownXFormType; - typedef vtkm::worklet::wavelets::ForwardTransform3DFrontBack FrontBackXFormType; - typedef vtkm::worklet::DispatcherMapField - LeftRightDispatcherType; - typedef vtkm::worklet::DispatcherMapField TopDownDispatcherType; - typedef vtkm::worklet::DispatcherMapField - FrontBackDispatcherType; + using ValueType = typename ArrayInType::ValueType; + using ArrayType = vtkm::cont::ArrayHandle; + using LeftRightXFormType = vtkm::worklet::wavelets::ForwardTransform3DLeftRight; + using TopDownXFormType = vtkm::worklet::wavelets::ForwardTransform3DTopDown; + using FrontBackXFormType = vtkm::worklet::wavelets::ForwardTransform3DFrontBack; + using LeftRightDispatcherType = + vtkm::worklet::DispatcherMapField; + using TopDownDispatcherType = vtkm::worklet::DispatcherMapField; + using FrontBackDispatcherType = + vtkm::worklet::DispatcherMapField; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; @@ -821,15 +821,15 @@ public: vtkm::Id inPretendDimZ = L[2] + L[5]; vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - typedef vtkm::cont::ArrayHandle BasicArrayType; - typedef vtkm::worklet::wavelets::InverseTransform3DLeftRight LeftRightXFormType; - typedef vtkm::worklet::wavelets::InverseTransform3DTopDown TopDownXFormType; - typedef vtkm::worklet::wavelets::InverseTransform3DFrontBack FrontBackXFormType; - typedef vtkm::worklet::DispatcherMapField - LeftRightDispatcherType; - typedef vtkm::worklet::DispatcherMapField TopDownDispatcherType; - typedef vtkm::worklet::DispatcherMapField - FrontBackDispatcherType; + using BasicArrayType = vtkm::cont::ArrayHandle; + using LeftRightXFormType = vtkm::worklet::wavelets::InverseTransform3DLeftRight; + using TopDownXFormType = vtkm::worklet::wavelets::InverseTransform3DTopDown; + using FrontBackXFormType = vtkm::worklet::wavelets::InverseTransform3DFrontBack; + using LeftRightDispatcherType = + vtkm::worklet::DispatcherMapField; + using TopDownDispatcherType = vtkm::worklet::DispatcherMapField; + using FrontBackDispatcherType = + vtkm::worklet::DispatcherMapField; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; @@ -1081,10 +1081,10 @@ public: return 0; } - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ExtendArrayType; - typedef vtkm::worklet::wavelets::ExtensionWorklet2D ExtensionWorklet; - typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + using ValueType = typename SigInArrayType::ValueType; + using ExtendArrayType = vtkm::cont::ArrayHandle; + using ExtensionWorklet = vtkm::worklet::wavelets::ExtensionWorklet2D; + using DispatcherType = typename vtkm::worklet::DispatcherMapField; vtkm::Id extDimX, extDimY; vtkm::worklet::wavelets::ExtensionDirection dir; @@ -1251,9 +1251,9 @@ public: // "right extension" can be attached a zero on either end, but not both ends. VTKM_ASSERT(!attachZeroRightRight || !attachZeroRightLeft); - typedef typename SigInArrayType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ExtensionArrayType; - typedef vtkm::cont::ArrayHandleConcatenate ArrayConcat; + using ValueType = typename SigInArrayType::ValueType; + using ExtensionArrayType = vtkm::cont::ArrayHandle; + using ArrayConcat = vtkm::cont::ArrayHandleConcatenate; ExtensionArrayType leftExtend, rightExtend; @@ -1278,14 +1278,14 @@ public: leftExtend.PrepareForOutput(addLen, DeviceTag()); vtkm::Id sigInLen = sigIn.GetNumberOfValues(); - typedef vtkm::worklet::wavelets::LeftSYMHExtentionWorklet LeftSYMH; - typedef vtkm::worklet::wavelets::LeftSYMWExtentionWorklet LeftSYMW; - typedef vtkm::worklet::wavelets::RightSYMHExtentionWorklet RightSYMH; - typedef vtkm::worklet::wavelets::RightSYMWExtentionWorklet RightSYMW; - typedef vtkm::worklet::wavelets::LeftASYMHExtentionWorklet LeftASYMH; - typedef vtkm::worklet::wavelets::LeftASYMWExtentionWorklet LeftASYMW; - typedef vtkm::worklet::wavelets::RightASYMHExtentionWorklet RightASYMH; - typedef vtkm::worklet::wavelets::RightASYMWExtentionWorklet RightASYMW; + using LeftSYMH = vtkm::worklet::wavelets::LeftSYMHExtentionWorklet; + using LeftSYMW = vtkm::worklet::wavelets::LeftSYMWExtentionWorklet; + using RightSYMH = vtkm::worklet::wavelets::RightSYMHExtentionWorklet; + using RightSYMW = vtkm::worklet::wavelets::RightSYMWExtentionWorklet; + using LeftASYMH = vtkm::worklet::wavelets::LeftASYMHExtentionWorklet; + using LeftASYMW = vtkm::worklet::wavelets::LeftASYMWExtentionWorklet; + using RightASYMH = vtkm::worklet::wavelets::RightASYMHExtentionWorklet; + using RightASYMW = vtkm::worklet::wavelets::RightASYMWExtentionWorklet; switch (leftExtMethod) { @@ -1379,7 +1379,7 @@ public: } else // attachZeroRightLeft mode { - typedef vtkm::cont::ArrayHandleConcatenate ConcatArray; + using ConcatArray = vtkm::cont::ArrayHandleConcatenate; // attach a zero at the end of sigIn ExtensionArrayType singleValArray; singleValArray.PrepareForOutput(1, DeviceTag()); @@ -1497,11 +1497,11 @@ public: vtkm::Id sigExtendedLen = sigInLen + 2 * addLen; - typedef typename SignalArrayType::ValueType SigInValueType; - typedef vtkm::cont::ArrayHandle SigInBasic; + using SigInValueType = typename SignalArrayType::ValueType; + using SigInBasic = vtkm::cont::ArrayHandle; - typedef vtkm::cont::ArrayHandleConcatenate ConcatType1; - typedef vtkm::cont::ArrayHandleConcatenate ConcatType2; + using ConcatType1 = vtkm::cont::ArrayHandleConcatenate; + using ConcatType2 = vtkm::cont::ArrayHandleConcatenate; ConcatType2 sigInExtended; @@ -1610,8 +1610,8 @@ public: cDTempLen = L[1]; } - typedef vtkm::cont::ArrayHandleCounting IdArrayType; - typedef vtkm::cont::ArrayHandlePermutation PermutArrayType; + using IdArrayType = vtkm::cont::ArrayHandleCounting; + using PermutArrayType = vtkm::cont::ArrayHandlePermutation; // Separate cA and cD IdArrayType approxIndices(0, 1, L[0]); @@ -1619,10 +1619,10 @@ public: PermutArrayType cA(approxIndices, coeffIn); PermutArrayType cD(detailIndices, coeffIn); - typedef typename CoeffArrayType::ValueType CoeffValueType; - typedef vtkm::cont::ArrayHandle ExtensionArrayType; - typedef vtkm::cont::ArrayHandleConcatenate Concat1; - typedef vtkm::cont::ArrayHandleConcatenate Concat2; + using CoeffValueType = typename CoeffArrayType::ValueType; + using ExtensionArrayType = vtkm::cont::ArrayHandle; + using Concat1 = vtkm::cont::ArrayHandleConcatenate; + using Concat2 = vtkm::cont::ArrayHandleConcatenate; Concat2 cATemp, cDTemp; @@ -1769,10 +1769,10 @@ public: } vtkm::Id addLen = filterLen / 2; - typedef typename ArrayInType::ValueType ValueType; - typedef vtkm::cont::ArrayHandle ArrayType; - typedef vtkm::worklet::wavelets::ForwardTransform2D ForwardXForm; - typedef typename vtkm::worklet::DispatcherMapField DispatcherType; + using ValueType = typename ArrayInType::ValueType; + using ArrayType = vtkm::cont::ArrayHandle; + using ForwardXForm = vtkm::worklet::wavelets::ForwardTransform2D; + using DispatcherType = typename vtkm::worklet::DispatcherMapField; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; @@ -1882,9 +1882,9 @@ public: vtkm::Id inPretendDimY = L[1] + L[3]; vtkm::Id filterLen = WaveletBase::filter.GetFilterLength(); - typedef vtkm::cont::ArrayHandle BasicArrayType; - typedef vtkm::worklet::wavelets::InverseTransform2D IDWT2DWorklet; - typedef vtkm::worklet::DispatcherMapField Dispatcher; + using BasicArrayType = vtkm::cont::ArrayHandle; + using IDWT2DWorklet = vtkm::worklet::wavelets::InverseTransform2D; + using Dispatcher = vtkm::worklet::DispatcherMapField; vtkm::cont::Timer timer; vtkm::Float64 computationTime = 0.0; diff --git a/vtkm/worklet/wavelets/WaveletFilter.h b/vtkm/worklet/wavelets/WaveletFilter.h index 21dfdde10..84f6957a3 100644 --- a/vtkm/worklet/wavelets/WaveletFilter.h +++ b/vtkm/worklet/wavelets/WaveletFilter.h @@ -115,7 +115,7 @@ public: bool isSymmetric() { return this->Symmetricity; } - typedef vtkm::cont::ArrayHandle FilterType; + using FilterType = vtkm::cont::ArrayHandle; const FilterType& GetLowDecomposeFilter() const { return this->LowDecomType; } const FilterType& GetHighDecomposeFilter() const { return this->HighDecomType; } diff --git a/vtkm/worklet/wavelets/WaveletTransforms.h b/vtkm/worklet/wavelets/WaveletTransforms.h index 7b0c6255e..abacc0cc6 100644 --- a/vtkm/worklet/wavelets/WaveletTransforms.h +++ b/vtkm/worklet/wavelets/WaveletTransforms.h @@ -59,7 +59,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension WholeArrayIn); // signal typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -876,7 +876,7 @@ public: WholeArrayIn, // right extension WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + using InputDomain = _4; VTKM_EXEC_CONT ForwardTransform3DLeftRight(const vtkm::cont::ArrayHandle& loFilter, @@ -981,7 +981,7 @@ public: vtkm::Id workX, workY, workZ, output1D; Output1Dto3D(workIndex, workX, workY, workZ); vtkm::Id inputCube, inputIdx; - typedef typename OutputPortalType::ValueType OutputValueType; + using OutputValueType = typename OutputPortalType::ValueType; if (workX % 2 == 0) // calculate cA { @@ -1032,7 +1032,7 @@ public: WholeArrayIn, // right extension WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + using InputDomain = _4; VTKM_EXEC_CONT ForwardTransform3DTopDown(const vtkm::cont::ArrayHandle& loFilter, @@ -1137,7 +1137,7 @@ public: vtkm::Id workX, workY, workZ, output1D; Output1Dto3D(workIndex, workX, workY, workZ); vtkm::Id inputCube, inputIdx; - typedef typename OutputPortalType::ValueType OutputValueType; + using OutputValueType = typename OutputPortalType::ValueType; if (workY % 2 == 0) // calculate cA { @@ -1188,7 +1188,7 @@ public: WholeArrayIn, // right extension WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + using InputDomain = _4; VTKM_EXEC_CONT ForwardTransform3DFrontBack(const vtkm::cont::ArrayHandle& loFilter, @@ -1293,7 +1293,7 @@ public: vtkm::Id workX, workY, workZ, output1D; Output1Dto3D(workIndex, workX, workY, workZ); vtkm::Id inputCube, inputIdx; - typedef typename OutputPortalType::ValueType OutputValueType; + using OutputValueType = typename OutputPortalType::ValueType; if (workZ % 2 == 0) // calculate cA { @@ -1359,7 +1359,7 @@ public: WholeArrayIn, // cA+cD (signal) FieldOut); // outptu coefficients typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); - typedef _6 InputDomain; + using InputDomain = _6; // Constructor VTKM_EXEC_CONT @@ -1593,7 +1593,7 @@ public: WholeArrayIn, // cA+cD (signal) FieldOut); // outptu coefficients typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); - typedef _6 InputDomain; + using InputDomain = _6; // Constructor VTKM_EXEC_CONT @@ -1827,7 +1827,7 @@ public: WholeArrayIn, // cA+cD (signal) FieldOut); // outptu coefficients typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); - typedef _6 InputDomain; + using InputDomain = _6; // Constructor VTKM_EXEC_CONT @@ -2312,7 +2312,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -2463,7 +2463,7 @@ public: WholeArrayIn, // right/bottom extension WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, _3, _4, WorkIndex); - typedef _4 InputDomain; + using InputDomain = _4; // Constructor VTKM_EXEC_CONT @@ -2547,7 +2547,7 @@ public: vtkm::Id workX, workY, output1D; Output1Dto2D(workIndex, workX, workY); vtkm::Id inputMatrix, inputIdx; - typedef typename OutputPortalType::ValueType OutputValueType; + using OutputValueType = typename OutputPortalType::ValueType; if (modeLR) { @@ -2654,7 +2654,7 @@ public: WholeArrayIn, // cA+cD (signal) FieldOut); // outptu coeffs typedef void ExecutionSignature(_1, _2, _3, _4, _5, _6, WorkIndex); - typedef _6 InputDomain; + using InputDomain = _6; // Constructor VTKM_EXEC_CONT @@ -2960,7 +2960,7 @@ public: typedef void ControlSignature(WholeArrayIn, // sigIn WholeArrayOut); // cA followed by cD typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -2990,7 +2990,7 @@ public: OutputPortalType& coeffOut, const vtkm::Id& workIndex) const { - typedef typename OutputPortalType::ValueType OutputValueType; + using OutputValueType = typename OutputPortalType::ValueType; if (workIndex < approxLen + detailLen) { if (workIndex % 2 == 0) // calculate cA @@ -3045,7 +3045,7 @@ public: // cA followed by cD WholeArrayOut); // output typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3127,7 +3127,7 @@ public: // cA followed by cD WholeArrayOut); // output typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3217,7 +3217,7 @@ class ThresholdWorklet : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldInOut); // Thresholding in-place typedef void ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor ThresholdWorklet(vtkm::Float64 t) @@ -3246,7 +3246,7 @@ class SquaredDeviation : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn, FieldOut); typedef _2 ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor template @@ -3272,7 +3272,7 @@ class Differencer : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn, FieldIn, FieldOut); typedef _3 ExecutionSignature(_1, _2); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC ValueType1 operator()(const ValueType1& v1, const ValueType2& v2) const @@ -3286,7 +3286,7 @@ class SquareWorklet : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(FieldIn, FieldOut); typedef _2 ExecutionSignature(_1); - typedef _1 InputDomain; + using InputDomain = _1; template VTKM_EXEC ValueType operator()(const ValueType& v) const @@ -3300,7 +3300,7 @@ class CopyWorklet : public vtkm::worklet::WorkletMapField public: typedef void ControlSignature(WholeArrayIn, WholeArrayOut); typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3325,7 +3325,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3353,7 +3353,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3381,7 +3381,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3409,7 +3409,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3437,7 +3437,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3465,7 +3465,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3493,7 +3493,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT @@ -3521,7 +3521,7 @@ public: typedef void ControlSignature(WholeArrayOut, // extension part WholeArrayIn); // signal part typedef void ExecutionSignature(_1, _2, WorkIndex); - typedef _1 InputDomain; + using InputDomain = _1; // Constructor VTKM_EXEC_CONT