From 3e1339f9a7bdd83b6087a4e655d0fea15214bfe0 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Fri, 11 Nov 2022 14:34:13 -0700 Subject: [PATCH] Remove deprecated features from VTK-m With the major revision 2.0 of VTK-m, many items previously marked as deprecated were removed. If updating to a new version of VTK-m, it is recommended to first update to VTK-m 1.9, which will include the deprecated features but provide warnings (with the right compiler) that will point to the replacement code. Once the deprecations have been fixed, updating to 2.0 should be smoother. --- docs/changelog/remove-deprecated.md | 8 + .../contour_tree_augmented/ContourTreeApp.cxx | 1 - examples/game_of_life/GameOfLife.cxx | 6 +- examples/oscillator/Oscillator.cxx | 4 +- vtkm/Algorithms.h | 79 - vtkm/CMakeLists.txt | 3 - vtkm/CellClassification.h | 20 - vtkm/ImplicitFunction.h | 26 - vtkm/List.h | 105 +- vtkm/ListTag.h | 327 ---- vtkm/TypeListTag.h | 115 -- vtkm/cont/ArrayCopyDevice.h | 62 +- vtkm/cont/ArrayHandle.cxx | 42 - vtkm/cont/ArrayHandle.h | 90 -- vtkm/cont/ArrayHandleBasic.h | 14 - vtkm/cont/ArrayHandleCompositeVector.h | 1 - vtkm/cont/ArrayHandleConcatenate.h | 63 +- vtkm/cont/ArrayHandleMultiplexer.h | 14 - vtkm/cont/ArrayHandleReverse.h | 43 +- vtkm/cont/ArrayHandleSOA.h | 87 - vtkm/cont/ArrayHandleView.h | 39 +- vtkm/cont/ArrayRangeCompute.hxx | 29 - vtkm/cont/AtomicArray.h | 21 - vtkm/cont/BitField.cxx | 29 - vtkm/cont/BitField.h | 106 -- vtkm/cont/CMakeLists.txt | 22 - vtkm/cont/CellLocatorUniformBins.h | 30 - vtkm/cont/CellSetExplicit.h | 38 - vtkm/cont/CellSetExplicit.hxx | 2 + vtkm/cont/CellSetExtrude.h | 29 - vtkm/cont/CellSetListTag.h | 78 - vtkm/cont/CellSetPermutation.h | 21 +- vtkm/cont/CellSetStructured.h | 23 - vtkm/cont/ColorTable.cxx | 6 - vtkm/cont/ColorTable.h | 31 - vtkm/cont/ColorTablePresets.cxx | 48 +- vtkm/cont/CoordinateSystem.h | 1 - vtkm/cont/DataSetBuilderExplicit.h | 26 - vtkm/cont/DataSetFieldAdd.h | 105 -- vtkm/cont/DeviceAdapterListTag.h | 54 - vtkm/cont/DynamicCellSet.h | 27 - vtkm/cont/ExecutionAndControlObjectBase.h | 3 +- vtkm/cont/ExecutionObjectBase.h | 53 +- vtkm/cont/Field.h | 88 +- vtkm/cont/FieldRangeCompute.h | 68 +- vtkm/cont/FieldRangeGlobalCompute.h | 32 +- vtkm/cont/Initialize.cxx | 42 +- vtkm/cont/Logging.cxx | 10 - vtkm/cont/Logging.h | 9 - vtkm/cont/PartitionedDataSet.h | 6 - vtkm/cont/PointLocatorUniformGrid.h | 30 - vtkm/cont/StorageImplicit.h | 29 - vtkm/cont/StorageListTag.h | 80 - vtkm/cont/UncertainCellSet.h | 138 -- vtkm/cont/UnknownArrayHandle.h | 60 +- vtkm/cont/UnknownCellSet.h | 160 +- vtkm/cont/VariantArrayHandle.h | 382 ----- vtkm/cont/arg/TransportTagArrayIn.h | 1 + vtkm/cont/arg/TransportTagArrayInOut.h | 1 + vtkm/cont/arg/TransportTagArrayOut.h | 1 + vtkm/cont/arg/TransportTagWholeArrayIn.h | 1 + vtkm/cont/arg/TransportTagWholeArrayInOut.h | 1 + vtkm/cont/arg/TransportTagWholeArrayOut.h | 1 + vtkm/cont/cuda/ChooseCudaDevice.h | 16 - .../cuda/testing/UnitTestCudaMathEdgeCases.cu | 4 +- vtkm/cont/internal/ArrayHandleDeprecated.h | 1438 ----------------- vtkm/cont/internal/AtomicInterfaceControl.h | 81 - vtkm/cont/internal/AtomicInterfaceExecution.h | 82 - vtkm/cont/internal/CMakeLists.txt | 4 - vtkm/cont/internal/CellLocatorBase.h | 9 - vtkm/cont/internal/OptionParserArguments.h | 4 - vtkm/cont/internal/PointLocatorBase.h | 9 - vtkm/cont/internal/StorageDeprecated.h | 226 --- vtkm/cont/testing/CMakeLists.txt | 3 - vtkm/cont/testing/MakeTestDataSet.h | 4 +- vtkm/cont/testing/UnitTestCellSet.cxx | 78 - vtkm/cont/testing/UnitTestDynamicCellSet.cxx | 179 -- vtkm/cont/testing/UnitTestInitialize.cxx | 35 +- vtkm/cont/testing/UnitTestLogging.cxx | 19 - vtkm/cont/testing/UnitTestStorageListTag.cxx | 78 - .../testing/UnitTestVariantArrayHandle.cxx | 455 ------ vtkm/cont/testlib/CMakeLists.txt | 2 +- vtkm/cont/testlib/Testing.cxx | 60 +- vtkm/exec/AtomicArrayExecutionObject.h | 62 +- vtkm/exec/CellDerivative.h | 23 - vtkm/exec/CellEdge.h | 56 - vtkm/exec/CellFace.h | 80 - vtkm/exec/CellInterpolate.h | 19 - .../CellLocatorBoundingIntervalHierarchy.h | 5 - vtkm/exec/CellLocatorMultiplexer.h | 5 - vtkm/exec/CellLocatorRectilinearGrid.h | 5 - vtkm/exec/CellLocatorTwoLevel.h | 5 - vtkm/exec/CellLocatorUniformGrid.h | 5 - vtkm/exec/ColorTable.h | 39 - vtkm/exec/ParametricCoordinates.h | 117 -- vtkm/exec/PointLocatorSparseGrid.h | 6 - vtkm/exec/cuda/testing/UnitTestTaskStrided.cu | 9 +- vtkm/filter/AmrArrays.h | 32 - vtkm/filter/CMakeLists.txt | 88 - vtkm/filter/CellAverage.h | 34 - vtkm/filter/CellMeasures.h | 24 - vtkm/filter/CellSetConnectivity.h | 34 - vtkm/filter/CleanGrid.h | 32 - vtkm/filter/ClipWithField.h | 33 - vtkm/filter/ClipWithImplicitFunction.h | 34 - vtkm/filter/ComputeMoments.h | 34 - vtkm/filter/Contour.h | 32 - vtkm/filter/ContourTreeUniform.h | 34 - vtkm/filter/ContourTreeUniformAugmented.h | 34 - vtkm/filter/ContourTreeUniformDistributed.h | 34 - vtkm/filter/CoordinateSystemTransform.h | 36 - vtkm/filter/CreateResult.h | 168 -- vtkm/filter/CrossProduct.h | 35 - vtkm/filter/DotProduct.h | 34 - vtkm/filter/Entropy.h | 32 - vtkm/filter/ExternalFaces.h | 34 - vtkm/filter/ExtractGeometry.h | 34 - vtkm/filter/ExtractPoints.h | 34 - vtkm/filter/ExtractStructured.h | 34 - vtkm/filter/FieldMetadata.h | 94 -- vtkm/filter/FieldSelection.h | 9 - vtkm/filter/FieldToColors.h | 34 - vtkm/filter/Filter.h | 351 ---- vtkm/filter/Filter.hxx | 469 ------ vtkm/filter/FilterCell.h | 28 - vtkm/filter/FilterDataSet.h | 78 - vtkm/filter/FilterDataSet.hxx | 82 - vtkm/filter/FilterDataSetWithField.h | 120 -- vtkm/filter/FilterDataSetWithField.hxx | 141 -- vtkm/filter/FilterField.h | 123 -- vtkm/filter/FilterField.hxx | 119 -- vtkm/filter/FilterTraits.h | 50 - vtkm/filter/GenerateIds.h | 34 - vtkm/filter/GhostCellClassify.h | 34 - vtkm/filter/GhostCellRemove.h | 34 - vtkm/filter/Gradient.h | 33 - vtkm/filter/Histogram.h | 33 - vtkm/filter/ImageConnectivity.h | 34 - vtkm/filter/ImageDifference.h | 34 - vtkm/filter/ImageMedian.h | 34 - vtkm/filter/Instantiations.h | 33 - vtkm/filter/Lagrangian.h | 32 - vtkm/filter/LagrangianStructures.h | 34 - vtkm/filter/MIRFilter.h | 32 - vtkm/filter/Mask.h | 32 - vtkm/filter/MaskPoints.h | 34 - vtkm/filter/MeshQuality.h | 33 - vtkm/filter/NDEntropy.h | 33 - vtkm/filter/NDHistogram.h | 34 - vtkm/filter/ParticleAdvection.h | 34 - vtkm/filter/ParticleDensityCloudInCell.h | 34 - vtkm/filter/ParticleDensityNearestGridPoint.h | 34 - vtkm/filter/PathParticle.h | 32 - vtkm/filter/Pathline.h | 32 - vtkm/filter/PointAverage.h | 34 - vtkm/filter/PointElevation.h | 34 - vtkm/filter/PointTransform.h | 34 - vtkm/filter/PolicyBase.h | 486 ------ vtkm/filter/PolicyDefault.h | 28 - vtkm/filter/Probe.h | 32 - vtkm/filter/Slice.h | 32 - vtkm/filter/SplitSharpEdges.h | 34 - vtkm/filter/StreamSurface.h | 32 - vtkm/filter/Streamline.h | 32 - vtkm/filter/SurfaceNormals.h | 34 - vtkm/filter/Tetrahedralize.h | 34 - vtkm/filter/Threshold.h | 33 - vtkm/filter/ThresholdPoints.h | 34 - vtkm/filter/Triangulate.h | 34 - vtkm/filter/Tube.h | 32 - vtkm/filter/VectorMagnitude.h | 34 - vtkm/filter/VertexClustering.h | 35 - vtkm/filter/WarpScalar.h | 33 - vtkm/filter/WarpVector.h | 33 - vtkm/filter/ZFPCompressor1D.h | 33 - vtkm/filter/ZFPCompressor2D.h | 33 - vtkm/filter/ZFPCompressor3D.h | 33 - vtkm/filter/ZFPDecompressor1D.h | 34 - vtkm/filter/ZFPDecompressor2D.h | 34 - vtkm/filter/ZFPDecompressor3D.h | 34 - vtkm/filter/clean_grid/CleanGrid.h | 6 - .../clean_grid/worklet/RemoveUnusedPoints.h | 37 - .../CellSetConnectivity.h | 6 - .../connected_components/ImageConnectivity.h | 6 - vtkm/filter/contour/ClipWithField.h | 5 - .../filter/contour/ClipWithImplicitFunction.h | 5 - vtkm/filter/contour/Contour.h | 5 - vtkm/filter/contour/MIRFilter.h | 5 - vtkm/filter/contour/Slice.h | 5 - vtkm/filter/density_estimate/Entropy.h | 5 - vtkm/filter/density_estimate/Histogram.h | 5 - vtkm/filter/density_estimate/NDEntropy.h | 5 - vtkm/filter/density_estimate/NDHistogram.h | 5 - .../ParticleDensityCloudInCell.cxx | 15 - .../ParticleDensityCloudInCell.h | 14 - .../ParticleDensityNearestGridPoint.cxx | 17 - .../ParticleDensityNearestGridPoint.h | 14 - vtkm/filter/entity_extraction/ExternalFaces.h | 5 - .../entity_extraction/ExtractGeometry.h | 5 - vtkm/filter/entity_extraction/ExtractPoints.h | 5 - .../entity_extraction/ExtractStructured.h | 6 - .../entity_extraction/GhostCellRemove.h | 5 - vtkm/filter/entity_extraction/Mask.h | 5 - vtkm/filter/entity_extraction/MaskPoints.h | 5 - vtkm/filter/entity_extraction/Threshold.h | 5 - .../entity_extraction/ThresholdPoints.h | 5 - vtkm/filter/field_conversion/CellAverage.h | 5 - vtkm/filter/field_conversion/PointAverage.h | 5 - .../CylindricalCoordinateTransform.h | 6 - vtkm/filter/field_transform/FieldToColors.h | 21 - vtkm/filter/field_transform/GenerateIds.h | 5 - vtkm/filter/field_transform/PointElevation.h | 5 - vtkm/filter/field_transform/PointTransform.h | 5 - .../SphericalCoordinateTransform.h | 5 - vtkm/filter/field_transform/WarpScalar.h | 5 - vtkm/filter/field_transform/WarpVector.h | 5 - vtkm/filter/flow/Lagrangian.cxx | 62 - vtkm/filter/flow/Lagrangian.h | 28 +- vtkm/filter/flow/LagrangianStructures.h | 5 - vtkm/filter/flow/ParticleAdvection.h | 5 - vtkm/filter/flow/PathParticle.h | 5 - vtkm/filter/flow/Pathline.h | 5 - vtkm/filter/flow/StreamSurface.h | 5 - vtkm/filter/flow/Streamline.h | 5 - .../geometry_refinement/SplitSharpEdges.h | 6 - .../geometry_refinement/Tetrahedralize.h | 5 - vtkm/filter/geometry_refinement/Triangulate.h | 5 - vtkm/filter/geometry_refinement/Tube.h | 5 - .../geometry_refinement/VertexClustering.h | 6 - vtkm/filter/image_processing/ComputeMoments.h | 5 - .../filter/image_processing/ImageDifference.h | 5 - vtkm/filter/image_processing/ImageMedian.h | 5 - vtkm/filter/internal/CMakeLists.txt | 17 - .../internal/ResolveFieldTypeAndExecute.h | 48 - vtkm/filter/internal/ResolveFieldTypeAndMap.h | 65 - vtkm/filter/mesh_info/CellMeasures.h | 79 - vtkm/filter/mesh_info/GhostCellClassify.h | 5 - vtkm/filter/mesh_info/MeshQuality.cxx | 66 - vtkm/filter/mesh_info/MeshQuality.h | 73 - vtkm/filter/multi_block/AmrArrays.h | 8 - vtkm/filter/resampling/Probe.h | 7 - .../scalar_topology/ContourTreeUniform.h | 10 - .../ContourTreeUniformAugmented.h | 18 - .../ContourTreeUniformDistributed.cxx | 24 - .../ContourTreeUniformDistributed.h | 54 - vtkm/filter/testing/CMakeLists.txt | 1 - vtkm/filter/testing/UnitTestFieldMetadata.cxx | 80 - vtkm/filter/vector_analysis/CrossProduct.h | 5 - vtkm/filter/vector_analysis/DotProduct.h | 5 - vtkm/filter/vector_analysis/Gradient.h | 5 - vtkm/filter/vector_analysis/SurfaceNormals.h | 5 - vtkm/filter/vector_analysis/VectorMagnitude.h | 5 - vtkm/filter/zfp/ZFPCompressor1D.h | 5 - vtkm/filter/zfp/ZFPCompressor2D.h | 5 - vtkm/filter/zfp/ZFPCompressor3D.h | 5 - vtkm/filter/zfp/ZFPDecompressor1D.h | 5 - vtkm/filter/zfp/ZFPDecompressor2D.h | 5 - vtkm/filter/zfp/ZFPDecompressor3D.h | 5 - vtkm/internal/VariantImpl.h | 11 - vtkm/io/CMakeLists.txt | 2 - vtkm/io/reader/BOVDataSetReader.h | 40 - vtkm/io/reader/CMakeLists.txt | 18 - vtkm/io/reader/VTKDataSetReader.h | 41 - vtkm/io/writer/CMakeLists.txt | 17 - vtkm/io/writer/VTKDataSetWriter.h | 36 - vtkm/rendering/CMakeLists.txt | 2 - vtkm/rendering/Camera.h | 4 - vtkm/rendering/Canvas.h | 10 - vtkm/rendering/ConnectivityProxy.h | 7 - vtkm/rendering/DecodePNG.h | 34 - vtkm/rendering/EncodePNG.h | 42 - vtkm/rendering/Mapper.h | 7 - vtkm/rendering/TextAnnotation.h | 2 - vtkm/rendering/View.cxx | 12 - vtkm/rendering/View.h | 9 - .../raytracing/BoundingVolumeHierarchy.cxx | 34 - vtkm/rendering/raytracing/Camera.cxx | 14 - vtkm/testing/CMakeLists.txt | 3 - vtkm/testing/UnitTestAlgorithms.cxx | 91 -- vtkm/testing/UnitTestListTag.cxx | 340 ---- vtkm/testing/UnitTestTypeListTag.cxx | 305 ---- vtkm/worklet/CMakeLists.txt | 1 - vtkm/worklet/KdTree3D.h | 77 - vtkm/worklet/Keys.h | 28 - vtkm/worklet/WorkletMapTopology.h | 6 - vtkm/worklet/spatialstructure/CMakeLists.txt | 2 - .../spatialstructure/KdTree3DConstruction.h | 601 ------- .../spatialstructure/KdTree3DNNSearch.h | 226 --- vtkm/worklet/testing/UnitTestKeys.cxx | 10 - 289 files changed, 100 insertions(+), 13936 deletions(-) create mode 100644 docs/changelog/remove-deprecated.md delete mode 100644 vtkm/Algorithms.h delete mode 100644 vtkm/ListTag.h delete mode 100644 vtkm/TypeListTag.h delete mode 100644 vtkm/cont/ArrayRangeCompute.hxx delete mode 100644 vtkm/cont/CellLocatorUniformBins.h delete mode 100644 vtkm/cont/CellSetListTag.h delete mode 100644 vtkm/cont/DataSetFieldAdd.h delete mode 100644 vtkm/cont/DeviceAdapterListTag.h delete mode 100644 vtkm/cont/DynamicCellSet.h delete mode 100644 vtkm/cont/PointLocatorUniformGrid.h delete mode 100644 vtkm/cont/StorageImplicit.h delete mode 100644 vtkm/cont/StorageListTag.h delete mode 100644 vtkm/cont/VariantArrayHandle.h delete mode 100644 vtkm/cont/internal/ArrayHandleDeprecated.h delete mode 100644 vtkm/cont/internal/AtomicInterfaceControl.h delete mode 100644 vtkm/cont/internal/AtomicInterfaceExecution.h delete mode 100644 vtkm/cont/internal/StorageDeprecated.h delete mode 100644 vtkm/cont/testing/UnitTestDynamicCellSet.cxx delete mode 100644 vtkm/cont/testing/UnitTestStorageListTag.cxx delete mode 100644 vtkm/cont/testing/UnitTestVariantArrayHandle.cxx delete mode 100644 vtkm/filter/AmrArrays.h delete mode 100644 vtkm/filter/CellAverage.h delete mode 100644 vtkm/filter/CellMeasures.h delete mode 100644 vtkm/filter/CellSetConnectivity.h delete mode 100644 vtkm/filter/CleanGrid.h delete mode 100644 vtkm/filter/ClipWithField.h delete mode 100644 vtkm/filter/ClipWithImplicitFunction.h delete mode 100644 vtkm/filter/ComputeMoments.h delete mode 100644 vtkm/filter/Contour.h delete mode 100644 vtkm/filter/ContourTreeUniform.h delete mode 100644 vtkm/filter/ContourTreeUniformAugmented.h delete mode 100644 vtkm/filter/ContourTreeUniformDistributed.h delete mode 100644 vtkm/filter/CoordinateSystemTransform.h delete mode 100644 vtkm/filter/CreateResult.h delete mode 100644 vtkm/filter/CrossProduct.h delete mode 100644 vtkm/filter/DotProduct.h delete mode 100644 vtkm/filter/Entropy.h delete mode 100644 vtkm/filter/ExternalFaces.h delete mode 100644 vtkm/filter/ExtractGeometry.h delete mode 100644 vtkm/filter/ExtractPoints.h delete mode 100644 vtkm/filter/ExtractStructured.h delete mode 100644 vtkm/filter/FieldMetadata.h delete mode 100644 vtkm/filter/FieldToColors.h delete mode 100644 vtkm/filter/Filter.h delete mode 100644 vtkm/filter/Filter.hxx delete mode 100644 vtkm/filter/FilterCell.h delete mode 100644 vtkm/filter/FilterDataSet.h delete mode 100644 vtkm/filter/FilterDataSet.hxx delete mode 100644 vtkm/filter/FilterDataSetWithField.h delete mode 100644 vtkm/filter/FilterDataSetWithField.hxx delete mode 100644 vtkm/filter/FilterField.h delete mode 100644 vtkm/filter/FilterField.hxx delete mode 100644 vtkm/filter/FilterTraits.h delete mode 100644 vtkm/filter/GenerateIds.h delete mode 100644 vtkm/filter/GhostCellClassify.h delete mode 100644 vtkm/filter/GhostCellRemove.h delete mode 100644 vtkm/filter/Gradient.h delete mode 100644 vtkm/filter/Histogram.h delete mode 100644 vtkm/filter/ImageConnectivity.h delete mode 100644 vtkm/filter/ImageDifference.h delete mode 100644 vtkm/filter/ImageMedian.h delete mode 100644 vtkm/filter/Instantiations.h delete mode 100644 vtkm/filter/Lagrangian.h delete mode 100644 vtkm/filter/LagrangianStructures.h delete mode 100644 vtkm/filter/MIRFilter.h delete mode 100644 vtkm/filter/Mask.h delete mode 100644 vtkm/filter/MaskPoints.h delete mode 100644 vtkm/filter/MeshQuality.h delete mode 100644 vtkm/filter/NDEntropy.h delete mode 100644 vtkm/filter/NDHistogram.h delete mode 100644 vtkm/filter/ParticleAdvection.h delete mode 100644 vtkm/filter/ParticleDensityCloudInCell.h delete mode 100644 vtkm/filter/ParticleDensityNearestGridPoint.h delete mode 100644 vtkm/filter/PathParticle.h delete mode 100644 vtkm/filter/Pathline.h delete mode 100644 vtkm/filter/PointAverage.h delete mode 100644 vtkm/filter/PointElevation.h delete mode 100644 vtkm/filter/PointTransform.h delete mode 100644 vtkm/filter/PolicyBase.h delete mode 100644 vtkm/filter/PolicyDefault.h delete mode 100644 vtkm/filter/Probe.h delete mode 100644 vtkm/filter/Slice.h delete mode 100644 vtkm/filter/SplitSharpEdges.h delete mode 100644 vtkm/filter/StreamSurface.h delete mode 100644 vtkm/filter/Streamline.h delete mode 100644 vtkm/filter/SurfaceNormals.h delete mode 100644 vtkm/filter/Tetrahedralize.h delete mode 100644 vtkm/filter/Threshold.h delete mode 100644 vtkm/filter/ThresholdPoints.h delete mode 100644 vtkm/filter/Triangulate.h delete mode 100644 vtkm/filter/Tube.h delete mode 100644 vtkm/filter/VectorMagnitude.h delete mode 100644 vtkm/filter/VertexClustering.h delete mode 100644 vtkm/filter/WarpScalar.h delete mode 100644 vtkm/filter/WarpVector.h delete mode 100644 vtkm/filter/ZFPCompressor1D.h delete mode 100644 vtkm/filter/ZFPCompressor2D.h delete mode 100644 vtkm/filter/ZFPCompressor3D.h delete mode 100644 vtkm/filter/ZFPDecompressor1D.h delete mode 100644 vtkm/filter/ZFPDecompressor2D.h delete mode 100644 vtkm/filter/ZFPDecompressor3D.h delete mode 100644 vtkm/filter/internal/CMakeLists.txt delete mode 100644 vtkm/filter/internal/ResolveFieldTypeAndExecute.h delete mode 100644 vtkm/filter/internal/ResolveFieldTypeAndMap.h delete mode 100644 vtkm/filter/testing/UnitTestFieldMetadata.cxx delete mode 100644 vtkm/io/reader/BOVDataSetReader.h delete mode 100644 vtkm/io/reader/CMakeLists.txt delete mode 100644 vtkm/io/reader/VTKDataSetReader.h delete mode 100644 vtkm/io/writer/CMakeLists.txt delete mode 100644 vtkm/io/writer/VTKDataSetWriter.h delete mode 100644 vtkm/rendering/DecodePNG.h delete mode 100644 vtkm/rendering/EncodePNG.h delete mode 100644 vtkm/testing/UnitTestAlgorithms.cxx delete mode 100644 vtkm/testing/UnitTestListTag.cxx delete mode 100644 vtkm/testing/UnitTestTypeListTag.cxx delete mode 100644 vtkm/worklet/KdTree3D.h delete mode 100644 vtkm/worklet/spatialstructure/KdTree3DConstruction.h delete mode 100644 vtkm/worklet/spatialstructure/KdTree3DNNSearch.h diff --git a/docs/changelog/remove-deprecated.md b/docs/changelog/remove-deprecated.md new file mode 100644 index 000000000..33b786dd1 --- /dev/null +++ b/docs/changelog/remove-deprecated.md @@ -0,0 +1,8 @@ +# Remove deprecated features from VTK-m + +With the major revision 2.0 of VTK-m, many items previously marked as +deprecated were removed. If updating to a new version of VTK-m, it is +recommended to first update to VTK-m 1.9, which will include the deprecated +features but provide warnings (with the right compiler) that will point to +the replacement code. Once the deprecations have been fixed, updating to +2.0 should be smoother. diff --git a/examples/contour_tree_augmented/ContourTreeApp.cxx b/examples/contour_tree_augmented/ContourTreeApp.cxx index c85243745..6e50a24e7 100644 --- a/examples/contour_tree_augmented/ContourTreeApp.cxx +++ b/examples/contour_tree_augmented/ContourTreeApp.cxx @@ -64,7 +64,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/game_of_life/GameOfLife.cxx b/examples/game_of_life/GameOfLife.cxx index dc27f532d..83649835f 100644 --- a/examples/game_of_life/GameOfLife.cxx +++ b/examples/game_of_life/GameOfLife.cxx @@ -138,7 +138,7 @@ struct UploadData bool operator()(DeviceAdapterTag device) { vtkm::cont::ArrayHandle colors; - this->Colors.GetData().CopyTo(colors); + this->Colors.GetData().AsArrayHandle(colors); vtkm::interop::TransferToOpenGL(colors, *this->ColorState, device); return true; } @@ -316,8 +316,8 @@ int main(int argc, char** argv) vtkm::cont::DataSetBuilderUniform builder; vtkm::cont::DataSet data = builder.Create(vtkm::Id2(x, y)); - auto stateField = - vtkm::cont::make_Field("state", vtkm::cont::Field::Association::Points, input_state); + auto stateField = vtkm::cont::make_FieldMove( + "state", vtkm::cont::Field::Association::Points, std::move(input_state)); data.AddField(stateField); GameOfLife filter; diff --git a/examples/oscillator/Oscillator.cxx b/examples/oscillator/Oscillator.cxx index 14e3c2428..93a6d04a3 100644 --- a/examples/oscillator/Oscillator.cxx +++ b/examples/oscillator/Oscillator.cxx @@ -313,7 +313,9 @@ int main(int argc, char** argv) if (generateOutput) { vtkm::cont::ArrayHandleBasic tmp; - rdata.GetField("oscillating", vtkm::cont::Field::Association::Points).GetData().CopyTo(tmp); + rdata.GetField("oscillating", vtkm::cont::Field::Association::Points) + .GetData() + .AsArrayHandle(tmp); const double* values = tmp.GetReadPointer(); writeData(outputDirectory, count++, sizeX, sizeY, sizeZ, values); } diff --git a/vtkm/Algorithms.h b/vtkm/Algorithms.h deleted file mode 100644 index 034bc36e4..000000000 --- a/vtkm/Algorithms.h +++ /dev/null @@ -1,79 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_Algorithms_h -#define vtk_m_Algorithms_h - -#include -#include -#include - -namespace vtkm -{ - -VTKM_DEPRECATED(1.7, "Use LowerBound.h, or UpperBound.h instead of Algorithms.h.") -inline void Algorithms_h_deprecated() {} - -inline void ActivateAlgorithms_h_deprecated_warning() -{ - Algorithms_h_deprecated(); -} - -template -VTKM_DEPRECATED(1.7, "Use LowerBound or UpperBound instead of BinarySearch.") -VTKM_EXEC_CONT IterT BinarySearch(IterT first, IterT last, const T& val, Comp comp) -{ - IterT found = vtkm::LowerBound(first, last, val, comp); - if ((found == last) || comp(val, *found) || comp(*found, val)) - { - // Element is not actually in the array - return last; - } - else - { - return found; - } -} - -VTKM_DEPRECATED_SUPPRESS_BEGIN - -template -VTKM_DEPRECATED(1.7, "Use LowerBound or UpperBound instead of BinarySearch.") -VTKM_EXEC_CONT IterT BinarySearch(IterT first, IterT last, const T& val) -{ - return vtkm::BinarySearch(first, last, val, vtkm::SortLess{}); -} - -template -VTKM_DEPRECATED(1.7, "Use LowerBound or UpperBound instead of BinarySearch.") -VTKM_EXEC_CONT vtkm::Id BinarySearch(const PortalT& portal, const T& val, Comp comp) -{ - auto first = vtkm::cont::ArrayPortalToIteratorBegin(portal); - auto last = vtkm::cont::ArrayPortalToIteratorEnd(portal); - auto result = vtkm::BinarySearch(first, last, val, comp); - return result == last ? static_cast(-1) : static_cast(result - first); -} - -// Return -1 if not found -template -VTKM_DEPRECATED(1.7, "Use LowerBound or UpperBound instead of BinarySearch.") -VTKM_EXEC_CONT vtkm::Id BinarySearch(const PortalT& portal, const T& val) -{ - auto first = vtkm::cont::ArrayPortalToIteratorBegin(portal); - auto last = vtkm::cont::ArrayPortalToIteratorEnd(portal); - auto result = vtkm::BinarySearch(first, last, val, vtkm::SortLess{}); - return result == last ? static_cast(-1) : static_cast(result - first); -} - -VTKM_DEPRECATED_SUPPRESS_END - -} // end namespace vtkm - -#endif // vtk_m_Algorithms_h diff --git a/vtkm/CMakeLists.txt b/vtkm/CMakeLists.txt index 21dae3312..dc88e725d 100644 --- a/vtkm/CMakeLists.txt +++ b/vtkm/CMakeLists.txt @@ -17,7 +17,6 @@ vtkm_install_headers( vtkm ${VTKm_BINARY_INCLUDE_DIR}/${kit_dir}/Version.h) set(headers - Algorithms.h # Deprecated, split into LowerBound.h, UpperBound.h Assert.h Atomic.h BinaryPredicates.h @@ -34,7 +33,6 @@ set(headers Hash.h ImplicitFunction.h List.h - ListTag.h # Deprecated, replaced by List.h LowerBound.h Math.h Matrix.h @@ -51,7 +49,6 @@ set(headers Transform3D.h Tuple.h TypeList.h - TypeListTag.h # Deprecated, replaced by TypeList.h Types.h TypeTraits.h VecAxisAlignedPointCoordinates.h diff --git a/vtkm/CellClassification.h b/vtkm/CellClassification.h index c9a068ae3..6f001c9a7 100644 --- a/vtkm/CellClassification.h +++ b/vtkm/CellClassification.h @@ -10,7 +10,6 @@ #ifndef vtk_m_CellClassification_h #define vtk_m_CellClassification_h -#include #include namespace vtkm @@ -45,15 +44,6 @@ public: Unused3 = 1 << 4, Unused4 = 1 << 5, Unused5 = 1 << 6, - - NORMAL VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Normal") = Normal, - GHOST VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Ghost") = Ghost, - INVALID VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Invalid") = Invalid, - UNUSED0 VTKM_DEPRECATED(1.8) = Unused0, - BLANKED VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Blanked") = Blanked, - UNUSED3 VTKM_DEPRECATED(1.8) = Unused3, - UNUSED4 VTKM_DEPRECATED(1.8) = Unused4, - UNUSED5 VTKM_DEPRECATED(1.8) = Unused5, }; VTKM_EXEC constexpr CellClassification(vtkm::UInt8 flags = vtkm::UInt8{ Normal }) @@ -64,16 +54,6 @@ public: VTKM_EXEC constexpr operator vtkm::UInt8() const { return this->Flags; } }; -// Deprecated scoping. -VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Normal.") -constexpr vtkm::CellClassification NORMAL = vtkm::CellClassification::Normal; -VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Ghost.") -constexpr vtkm::CellClassification GHOST = vtkm::CellClassification::Ghost; -VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Invalid.") -constexpr vtkm::CellClassification INVALID = vtkm::CellClassification::Invalid; -VTKM_DEPRECATED(1.8, "Use vtkm::CellClassification::Blanked.") -constexpr vtkm::CellClassification BLANKED = vtkm::CellClassification::Blanked; - } // namespace vtkm #endif // vtk_m_CellClassification_h diff --git a/vtkm/ImplicitFunction.h b/vtkm/ImplicitFunction.h index a5810af25..993c46eb3 100644 --- a/vtkm/ImplicitFunction.h +++ b/vtkm/ImplicitFunction.h @@ -11,7 +11,6 @@ #define vtk_m_ImplicitFunction_h #include -#include #include #include @@ -373,11 +372,6 @@ public: return normal; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC Box* operator->() { return this; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC const Box* operator->() const { return this; } - private: Vector MinPoint; Vector MaxPoint; @@ -441,11 +435,6 @@ public: return (point - closestPoint) * FloatDefault(2); } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC Cylinder* operator->() { return this; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC const Cylinder* operator->() const { return this; } - private: Vector Center; Vector Axis; @@ -554,11 +543,6 @@ public: return this->Normals[maxValIdx]; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC Frustum* operator->() { return this; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC const Frustum* operator->() const { return this; } - private: Vector Points[6] = { { -0.5f, 0.0f, 0.0f }, { 0.5f, 0.0f, 0.0f }, { 0.0f, -0.5f, 0.0f }, { 0.0f, 0.5f, 0.0f }, { 0.0f, 0.0f, -0.5f }, { 0.0f, 0.0f, 0.5f } }; @@ -611,11 +595,6 @@ public: VTKM_EXEC_CONT Vector Gradient(const Vector&) const { return this->Normal; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC Plane* operator->() { return this; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC const Plane* operator->() const { return this; } - private: Vector Origin; Vector Normal; @@ -670,11 +649,6 @@ public: return Scalar(2) * (point - this->Center); } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC Sphere* operator->() { return this; } - VTKM_DEPRECATED(1.6, "ImplicitFunctions are no longer pointers. Use . operator.") - VTKM_EXEC const Sphere* operator->() const { return this; } - private: Scalar Radius; Vector Center; diff --git a/vtkm/List.h b/vtkm/List.h index c9686f6fb..52c17845d 100644 --- a/vtkm/List.h +++ b/vtkm/List.h @@ -36,23 +36,13 @@ struct List VTKM_CHECK_LIST_SIZE(sizeof...(Ts)); }; -namespace detail -{ - -// This prototype is here to detect deprecated ListTag objects. When ListTags are removed, then -// this should be removed too. -struct ListRoot; -} - namespace internal { template struct IsListImpl { - // This prototype is here to detect deprecated ListTag objects. When ListTags are removed, then - // this should be changed to be just std::false_type. - using type = std::is_base_of; + using type = std::false_type; }; template @@ -88,25 +78,6 @@ struct UniversalTypeTag } // namespace detail -namespace internal -{ - -// This is here so that the old (deprecated) `ListTag`s can convert themselves to the new -// `List` style and be operated on. When that deprecated functionality goes away, we can -// probably remove `AsList` and just operate directly on the `List`s. -template -struct AsListImpl; - -template -struct AsListImpl> -{ - using type = vtkm::List; -}; - -template -using AsList = typename AsListImpl::type; -} - /// A special tag for an empty list. /// using ListEmpty = vtkm::List<>; @@ -134,7 +105,7 @@ struct ListSizeImpl> /// Becomes an std::integral_constant containing the number of types in a list. /// template -using ListSize = typename detail::ListSizeImpl>::type; +using ListSize = typename detail::ListSizeImpl::type; namespace detail { @@ -158,7 +129,7 @@ struct ListApplyImpl; /// represented by the ListTag. /// template class Target> -using ListApply = typename detail::ListApplyImpl, Target>::type; +using ListApply = typename detail::ListApplyImpl::type; namespace detail { @@ -301,7 +272,7 @@ struct ListAppendImpl, /// /// Note that this does not work correctly with `vtkm::ListUniversal`. template -using ListAppend = typename detail::ListAppendImpl...>::type; +using ListAppend = typename detail::ListAppendImpl::type; namespace detail { @@ -370,7 +341,7 @@ struct ListAtImpl, Index> /// This becomes the type of the list at the given index. /// template -using ListAt = typename detail::ListAtImpl, Index>::type; +using ListAt = typename detail::ListAtImpl::type; namespace detail { @@ -573,7 +544,7 @@ struct ListIndexOfImpl /// given type is not in the list, the value is set to -1. /// template -using ListIndexOf = typename detail::ListIndexOfImpl, T>::type; +using ListIndexOf = typename detail::ListIndexOfImpl::type; namespace detail { @@ -597,7 +568,7 @@ struct ListHasImpl /// Becomes `std::true_type` if the `T` is in `List`. `std::false_type` otherwise. /// template -using ListHas = typename detail::ListHasImpl, T>::type; +using ListHas = typename detail::ListHasImpl::type; namespace detail { @@ -618,7 +589,7 @@ struct ListTransformImpl; /// Constructs a list containing all types in a source list applied to a transform template. /// template class Transform> -using ListTransform = typename detail::ListTransformImpl, Transform>::type; +using ListTransform = typename detail::ListTransformImpl::type; namespace detail { @@ -700,7 +671,7 @@ struct ListRemoveIfImpl, Predicate> /// `std::is_integral` and `std::is_integral` resolve to `std::false_type`. /// template class Predicate> -using ListRemoveIf = typename detail::ListRemoveIfImpl, Predicate>::type; +using ListRemoveIf = typename detail::ListRemoveIfImpl::type; namespace detail { @@ -738,50 +709,27 @@ struct ListIntersectImpl /// Constructs a list containing types present in all lists. /// template -using ListIntersect = - typename detail::ListIntersectImpl, internal::AsList>::type; - -namespace detail -{ - -// We want to use an initializer list as a trick to call a function once for each type, but -// an initializer list needs a type, so create wrapper function that returns a value. -VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_EXEC_CONT inline bool ListForEachCallThrough(Functor&& f, Args&&... args) -{ - f(std::forward(args)...); - return false; // Return value does not matter. Hopefully just thrown away. -} - -VTKM_SUPPRESS_EXEC_WARNINGS -template -VTKM_EXEC_CONT void ListForEachImpl(Functor&& f, vtkm::List, Args&&... args) -{ - VTKM_STATIC_ASSERT_MSG((!std::is_same, vtkm::ListUniversal>::value), - "Cannot call ListFor on vtkm::ListUniversal."); - auto init_list = { ListForEachCallThrough( - std::forward(f), Ts{}, std::forward(args)...)... }; - (void)init_list; -} - -template -VTKM_EXEC_CONT void ListForEachImpl(Functor&&, vtkm::ListEmpty, Args&&...) -{ - // No types to run functor on. -} - -} // namespace detail +using ListIntersect = typename detail::ListIntersectImpl::type; +///@{ /// For each typename represented by the list, call the functor with a /// default instance of that type. /// -template -VTKM_EXEC_CONT void ListForEach(Functor&& f, List, Args&&... args) +VTKM_SUPPRESS_EXEC_WARNINGS +template +VTKM_EXEC_CONT void ListForEach(Functor&& f, vtkm::List, Args&&... args) { - detail::ListForEachImpl( - std::forward(f), internal::AsList{}, std::forward(args)...); + VTKM_STATIC_ASSERT_MSG((!std::is_same, vtkm::ListUniversal>::value), + "Cannot call ListFor on vtkm::ListUniversal."); + auto init_list = { (f(Ts{}, std::forward(args)...), false)... }; + (void)init_list; } +template +VTKM_EXEC_CONT void ListForEach(Functor&&, vtkm::ListEmpty, Args&&...) +{ + // No types to run functor on. +} +///@} namespace detail { @@ -808,8 +756,7 @@ struct ListCrossImpl, vtkm::List> /// The resulting list has the form of `vtkm::List, vtkm::List,...>` /// template -using ListCross = - typename detail::ListCrossImpl, internal::AsList>::type; +using ListCross = typename detail::ListCrossImpl::type; namespace detail { @@ -865,7 +812,7 @@ struct ListReduceImpl, Ope /// This continues until a single value is left. /// template class Operator, typename Initial> -using ListReduce = typename detail::ListReduceImpl, Operator, Initial>::type; +using ListReduce = typename detail::ListReduceImpl::type; /// \brief Determines whether all the types in the list are "true." /// diff --git a/vtkm/ListTag.h b/vtkm/ListTag.h deleted file mode 100644 index 5be227089..000000000 --- a/vtkm/ListTag.h +++ /dev/null @@ -1,327 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_ListTag_h -#define vtk_m_ListTag_h - -#include - -#include - -#include -#include - -#include - -struct VTKM_DEPRECATED(1.6, "ListTag.h is deprecated. Include List.h and use vtkm::List instead.") - VTKmListTagHeaderDeprecationWarning -{ -}; - -inline VTKmListTagHeaderDeprecationWarning IssueVTKmListTagHeaderDeprecationWarning() -{ - return {}; -} - -namespace vtkm -{ -namespace detail -{ - -//----------------------------------------------------------------------------- - -/// Base class that all ListTag classes inherit from. Helps identify lists -/// in macros like VTKM_IS_LIST_TAG. -/// -struct ListRoot -{ -}; - -template -using ListBase = vtkm::List; - -/// list value that is used to represent a list actually matches all values -struct UniversalTag -{ - //We never want this tag constructed, and by deleting the constructor - //we get an error when trying to use this class with ForEach. - UniversalTag() = delete; -}; - -} // namespace detail - -//----------------------------------------------------------------------------- -/// A basic tag for a list of typenames. This struct can be subclassed -/// and still behave like a list tag. -/// @cond NONE -template -struct VTKM_DEPRECATED(1.6, "ListTagBase replace by List. Note that List cannot be subclassed.") - ListTagBase : detail::ListRoot -{ - using list = detail::ListBase; -}; -/// @endcond - -/// A special tag for a list that represents holding all potential values -/// -/// Note: Can not be used with ForEach for obvious reasons. -/// @cond NONE -struct VTKM_DEPRECATED( - 1.6, - "ListTagUniversal replaced by ListUniversal. Note that ListUniversal cannot be subclassed.") - ListTagUniversal : detail::ListRoot -{ - using list = vtkm::detail::ListBase; -}; -/// @endcond - -namespace internal -{ - -/// @cond NONE -template -struct ListTagCheck : std::is_base_of -{ - static constexpr bool Valid = std::is_base_of::value; -}; -/// @endcond - -} // namespace internal - -namespace detail -{ - -/// @cond NONE -template -struct VTKM_DEPRECATED(1.6, "VTKM_IS_LIST_TAG replaced with VTKM_IS_LIST.") ListTagAssert - : internal::IsList -{ -}; -/// @endcond - -} // namespace detal - -/// Checks that the argument is a proper list tag. This is a handy concept -/// check for functions and classes to make sure that a template argument is -/// actually a device adapter tag. (You can get weird errors elsewhere in the -/// code when a mistake is made.) -/// -#define VTKM_IS_LIST_TAG(tag) \ - VTKM_STATIC_ASSERT_MSG((::vtkm::detail::ListTagAssert::value), \ - "Provided type is not a valid VTK-m list tag.") - -namespace internal -{ - -namespace detail -{ - -/// @cond NONE -template -struct ListTagAsListImpl -{ - VTKM_DEPRECATED_SUPPRESS_BEGIN - VTKM_IS_LIST_TAG(ListTag); - using type = typename ListTag::list; - VTKM_DEPRECATED_SUPPRESS_END -}; -/// @endcond - -} // namespace detail - -/// Converts a ListTag to a vtkm::List. -/// -template -using ListTagAsList = typename detail::ListTagAsListImpl::type; - -VTKM_DEPRECATED_SUPPRESS_BEGIN -namespace detail -{ - -// Could use ListApply instead, but that causes deprecation warnings. -template -struct ListAsListTagImpl; -template -struct ListAsListTagImpl> -{ - using type = vtkm::ListTagBase; -}; - -} // namespace detail - -template -using ListAsListTag = typename detail::ListAsListTagImpl::type; -VTKM_DEPRECATED_SUPPRESS_END - -// This allows the new `List` operations work on `ListTag`s. -template -struct AsListImpl -{ - VTKM_STATIC_ASSERT_MSG(ListTagCheck::value, - "Attempted to use something that is not a List with a List operation."); - VTKM_DEPRECATED_SUPPRESS_BEGIN - using type = typename std::conditional::value, - vtkm::ListUniversal, - ListTagAsList>::type; - VTKM_DEPRECATED_SUPPRESS_END -}; - -} // namespace internal - - -/// \brief Applies the list of types to a template. -/// -/// Given a ListTag and a templated class, returns the class instantiated with the types -/// represented by the ListTag. -/// -template class Target> -using ListTagApply VTKM_DEPRECATED(1.6, "ListTagApply replaced by ListApply.") = - vtkm::ListApply; - -/// A special tag for an empty list. -/// -/// @cond NONE -struct VTKM_DEPRECATED( - 1.6, - "ListTagEmpty replaced by ListEmpty. Note that ListEmpty cannot be subclassed.") ListTagEmpty - : detail::ListRoot -{ - using list = vtkm::detail::ListBase<>; -}; -/// @endcond - -/// A tag that is a construction of two other tags joined together. This struct -/// can be subclassed and still behave like a list tag. -/// @cond NONE -template -struct VTKM_DEPRECATED( - 1.6, - "ListTagJoin replaced by ListAppend. Note that ListAppend cannot be subclassed.") ListTagJoin - : vtkm::internal::ListAsListTag> -{ -}; -/// @endcond - - -/// A tag that is constructed by appending \c Type to \c ListTag. -/// @cond NONE -template -struct VTKM_DEPRECATED(1.6, - "ListTagAppend replaced by ListAppend. " - "Note that ListAppend cannot be subclassed.") ListTagAppend - : vtkm::internal::ListAsListTag>> -{ -}; -/// @endcond - -/// Append \c Type to \c ListTag only if \c ListTag does not already contain \c Type. -/// No checks are performed to see if \c ListTag itself has only unique elements. -/// @cond NONE -template -struct VTKM_DEPRECATED(1.6) ListTagAppendUnique - : std::conditional< - vtkm::ListHas::value, - vtkm::internal::ListAsListTag>, - vtkm::internal::ListAsListTag>>>::type -{ -}; -/// @endcond - -/// A tag that consists of elements that are found in both tags. This struct -/// can be subclassed and still behave like a list tag. -/// @cond NONE -template -struct VTKM_DEPRECATED( - 1.6, - "ListTagIntersect replaced by ListIntersect. Note that ListIntersect cannot be subclassed.") - ListTagIntersect : vtkm::internal::ListAsListTag> -{ -}; -/// @endcond - -/// A list tag that consists of each item in another list tag fed into a template that takes -/// a single parameter. -/// @cond NONE -template class Transform> -struct VTKM_DEPRECATED( - 1.6, - "ListTagTransform replaced by ListTransform. Note that ListTransform cannot be subclassed.") - ListTagTransform : vtkm::internal::ListAsListTag> -{ -}; -/// @endcond - -/// A list tag that takes an existing ListTag and a predicate template that is applied to -/// each type in the ListTag. Any type in the ListTag that has a value element equal to true -/// (the equivalent of std::true_type), that item will be removed from the list. For example -/// the following type -/// -/// ```cpp -/// vtkm::ListTagRemoveIf, std::is_integral> -/// ``` -/// -/// resolves to a ListTag that is equivalent to `vtkm::ListTag` because -/// `std::is_integral` and `std::is_integral` resolve to `std::true_type` -/// whereas `std::is_integral` and `std::is_integral` resolve to -/// `std::false_type`. -/// @cond NONE -template class Predicate> -struct VTKM_DEPRECATED( - 1.6, - "ListTagRemoveIf replaced by ListRemoveIf. Note that ListRemoveIf cannot be subclassed.") - ListTagRemoveIf : vtkm::internal::ListAsListTag> -{ -}; -/// @endcond - -/// Generate a tag that is the cross product of two other tags. The resulting -/// tag has the form of Tag< vtkm::List, vtkm::List .... > -/// -/// Note that as of VTK-m 1.8, the behavior of this (already depreciated) operation -/// was changed to return pairs in vtkm::List instead of brigand::list. -/// -/// @cond NONE -template -struct VTKM_DEPRECATED( - 1.6, - "ListCrossProduct replaced by ListCross. Note that ListCross cannot be subclassed.") - ListCrossProduct : vtkm::internal::ListAsListTag> -{ -}; -/// @endcond - -/// \brief Checks to see if the given \c Type is in the list pointed to by \c ListTag. -/// -/// There is a static boolean named \c value that is set to true if the type is -/// contained in the list and false otherwise. -/// -/// @cond NONE -template -struct VTKM_DEPRECATED(1.6, "ListContains replaced by ListHas.") ListContains - : vtkm::ListHas -{ -}; -/// @endcond - -/// \brief Finds the type at the given index. -/// -/// This struct contains subtype \c type that resolves to the type at the given index. -/// -template -struct VTKM_DEPRECATED(1.6, "ListTypeAt::type replaced by ListAt.") ListTypeAt -{ - VTKM_DEPRECATED_SUPPRESS_BEGIN - VTKM_IS_LIST_TAG(ListTag); - VTKM_DEPRECATED_SUPPRESS_END - using type = vtkm::ListAt; -}; - -} // namespace vtkm - -#endif //vtk_m_ListTag_h diff --git a/vtkm/TypeListTag.h b/vtkm/TypeListTag.h deleted file mode 100644 index 0555a105d..000000000 --- a/vtkm/TypeListTag.h +++ /dev/null @@ -1,115 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_TypeListTag_h -#define vtk_m_TypeListTag_h - -// Everything in this header file is deprecated and movded to TypeList.h. -#include - -struct VTKM_DEPRECATED(1.6, "TypeListTag.h is deprecated. Include TypeList.h and use vtkm::TypeList* instead.") -VTKmTypeListTagHeaderDeprecationWarning -{ -}; - -inline VTKmTypeListTagHeaderDeprecationWarning IssueVTKmTypeListTagHeaderDeprecationWarning() -{ - return {}; -} - -#ifndef VTKM_DEFAULT_TYPE_LIST_TAG -#define VTKM_DEFAULT_TYPE_LIST_TAG ::vtkm::internal::TypeListTagDefault -#endif - -#include -#include - -#define VTK_M_OLD_TYPE_LIST_DEFINITION(name) \ - struct VTKM_ALWAYS_EXPORT \ - VTKM_DEPRECATED( \ - 1.6, \ - "TypeListTag" #name " replaced by TypeList" #name ". " \ - "Note that the new TypeList" #name " cannot be subclassed.") \ - TypeListTag ## name : vtkm::internal::ListAsListTag \ - { \ - } - -VTKM_DEPRECATED_SUPPRESS_BEGIN - -namespace vtkm -{ - -VTK_M_OLD_TYPE_LIST_DEFINITION(Id); -VTK_M_OLD_TYPE_LIST_DEFINITION(Id2); -VTK_M_OLD_TYPE_LIST_DEFINITION(Id3); -VTK_M_OLD_TYPE_LIST_DEFINITION(IdComponent); -VTK_M_OLD_TYPE_LIST_DEFINITION(Index); -VTK_M_OLD_TYPE_LIST_DEFINITION(FieldScalar); -VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec2); -VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec3); -VTK_M_OLD_TYPE_LIST_DEFINITION(FieldVec4); -VTK_M_OLD_TYPE_LIST_DEFINITION(FloatVec); -VTK_M_OLD_TYPE_LIST_DEFINITION(Field); -VTK_M_OLD_TYPE_LIST_DEFINITION(ScalarAll); -VTK_M_OLD_TYPE_LIST_DEFINITION(VecCommon); -VTK_M_OLD_TYPE_LIST_DEFINITION(VecAll); -VTK_M_OLD_TYPE_LIST_DEFINITION(All); -VTK_M_OLD_TYPE_LIST_DEFINITION(Common); - -namespace internal -{ - -VTK_M_OLD_TYPE_LIST_DEFINITION(VecUncommon); - -// Special definition of TypeListTagCommon to give descriptive warning when -// VTKM_DEFAULT_TYPE_LIST_TAG is used. -/// @cond NONE -struct VTKM_ALWAYS_EXPORT -VTKM_DEPRECATED( - 1.6, - "VTKM_DEFAULT_TYPE_LIST_TAG replaced by VTKM_DEFAULT_TYPE_LIST. " - "Note that the new VTKM_DEFAULT_TYPE_LIST cannot be subclassed.") -TypeListTagDefault : vtkm::internal::ListAsListTag -{ -}; -/// @endcond - -} // namespace internal - -// Special implementation of ListContains for TypeListTagAll to always be -// true. Although TypeListTagAll is necessarily finite, the point is to -// be all inclusive. Besides, this should speed up the compilation when -// checking a list that should contain everything. -template -struct ListContains -{ - static constexpr bool value = true; -}; - -// Special implementation of ListHas for TypeListTagAll to always be -// true. Although TypeListTagAll is necessarily finite, the point is to -// be all inclusive. Besides, this should speed up the compilation when -// checking a list that should contain everything. -namespace detail -{ - -template -struct ListHasImpl -{ - using type = std::true_type; -}; - -} // namespace detail - -} // namespace vtkm - -VTKM_DEPRECATED_SUPPRESS_END -#undef VTK_M_OLD_TYPE_LIST_DEFINITION - -#endif //vtk_m_TypeListTag_h diff --git a/vtkm/cont/ArrayCopyDevice.h b/vtkm/cont/ArrayCopyDevice.h index fcd94a7ac..443e97c46 100644 --- a/vtkm/cont/ArrayCopyDevice.h +++ b/vtkm/cont/ArrayCopyDevice.h @@ -17,8 +17,6 @@ #include #include -#include - #include // TODO: When virtual arrays are available, compile the implementation in a .cxx/.cu file. Common @@ -32,62 +30,20 @@ namespace cont namespace detail { -// Element-wise copy. -template -void ArrayCopyWithAlgorithm(const InArrayType& source, OutArrayType& destination) +template +VTKM_CONT void ArrayCopyImpl(const vtkm::cont::ArrayHandle& source, + vtkm::cont::ArrayHandle& destination) { + VTKM_STATIC_ASSERT((!std::is_same::value || !std::is_same::value)); + // Current implementation of Algorithm::Copy will first try to copy on devices where the // data is already available. vtkm::cont::Algorithm::Copy(source, destination); } -// TODO: Remove last argument once ArryHandleNewStyle becomes ArrayHandle -template -void ArrayCopyOldImpl(const InArrayType& in, OutArrayType& out, std::false_type /* Copy storage */) -{ - ArrayCopyWithAlgorithm(in, out); -} - -// Copy storage for implicit arrays, must be of same type: -// TODO: This will go away once ArrayHandleNewStyle becomes ArrayHandle. -template -void ArrayCopyOldImpl(const ArrayType& in, ArrayType& out, std::true_type /* Copy storage */) -{ - // This is only called if in/out are the same type and the handle is not - // writable. This allows read-only implicit array handles to be copied. - auto newStorage = in.GetStorage(); - out = ArrayType(newStorage); -} - -// TODO: This will go away once ArrayHandleNewStyle becomes ArrayHandle. -template -VTKM_CONT void ArrayCopyImpl(const InArrayType& source, - OutArrayType& destination, - std::false_type /* New style */) -{ - using SameTypes = std::is_same; - using IsWritable = vtkm::cont::internal::IsWritableArrayHandle; - using JustCopyStorage = std::integral_constant; - ArrayCopyOldImpl(source, destination, JustCopyStorage{}); -} - -// TODO: ArrayHandleNewStyle will eventually become ArrayHandle, in which case this -// will become ArrayCopyWithAlgorithm -template -VTKM_CONT void ArrayCopyImpl(const vtkm::cont::ArrayHandle& source, - vtkm::cont::ArrayHandle& destination, - std::true_type /* New style */) -{ - VTKM_STATIC_ASSERT((!std::is_same::value || !std::is_same::value)); - ArrayCopyWithAlgorithm(source, destination); -} - -// TODO: ArrayHandleNewStyle will eventually become ArrayHandle, in which case this -// will become the only version with the same array types. template VTKM_CONT void ArrayCopyImpl(const vtkm::cont::ArrayHandle& source, - vtkm::cont::ArrayHandle& destination, - std::true_type /* New style */) + vtkm::cont::ArrayHandle& destination) { destination.DeepCopyFrom(source); } @@ -137,12 +93,8 @@ VTKM_CONT void ArrayCopyDevice(const vtkm::cont::ArrayHandle, - InArrayType>; - // Static dispatch cases 1 & 2 - detail::ArrayCopyImpl(source, destination, std::integral_constant{}); + detail::ArrayCopyImpl(source, destination); } /// @} diff --git a/vtkm/cont/ArrayHandle.cxx b/vtkm/cont/ArrayHandle.cxx index 3ecbc7776..2d5770ce8 100644 --- a/vtkm/cont/ArrayHandle.cxx +++ b/vtkm/cont/ArrayHandle.cxx @@ -43,45 +43,3 @@ VTKM_CONT bool ArrayHandleIsOnDevice(const std::vector& buffers) - { - if (this->FoundDevice == vtkm::cont::DeviceAdapterTagUndefined{}) - { - if (vtkm::cont::detail::ArrayHandleIsOnDevice(buffers, device)) - { - this->FoundDevice = device; - } - } - } -}; - -} // anonymous namespace - -namespace vtkm -{ -namespace cont -{ -namespace detail -{ - -VTKM_CONT vtkm::cont::DeviceAdapterId ArrayHandleGetDeviceAdapterId( - const std::vector& buffers) -{ - DeviceCheckFunctor functor; - - vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST{}, buffers); - - return functor.FoundDevice; -} -} -} -} // namespace vtkm::cont::detail diff --git a/vtkm/cont/ArrayHandle.h b/vtkm/cont/ArrayHandle.h index 4f26648c1..09a40f346 100644 --- a/vtkm/cont/ArrayHandle.h +++ b/vtkm/cont/ArrayHandle.h @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -260,9 +259,6 @@ VTKM_CONT_EXPORT VTKM_CONT bool ArrayHandleIsOnDevice( const std::vector& buffers, vtkm::cont::DeviceAdapterId device); -VTKM_CONT_EXPORT VTKM_CONT vtkm::cont::DeviceAdapterId ArrayHandleGetDeviceAdapterId( - const std::vector& buffers); - } // namespace detail /// \brief Manages an array-worth of data. @@ -298,19 +294,6 @@ public: using ReadPortalType = typename StorageType::ReadPortalType; using WritePortalType = typename StorageType::WritePortalType; - // TODO: Deprecate this - template - struct VTKM_DEPRECATED(1.6, "Use ReadPortalType and WritePortalType.") ExecutionTypes - { - using Portal = WritePortalType; - using PortalConst = ReadPortalType; - }; - - using PortalControl VTKM_DEPRECATED(1.6, "Use ArrayHandle::WritePortalType instead.") = - WritePortalType; - using PortalConstControl VTKM_DEPRECATED(1.6, "Use ArrayHandle::ReadPortalType instead.") = - ReadPortalType; - /// Constructs an empty ArrayHandle. /// VTKM_CONT ArrayHandle() @@ -413,45 +396,10 @@ public: return true; // different valuetype and/or storage } - VTKM_DEPRECATED(1.9, "Use the size of the std::vector returned from GetBuffers.") - VTKM_CONT constexpr vtkm::IdComponent GetNumberOfBuffers() - { - return static_cast(this->GetBuffers().size()); - } - /// Get the storage. /// VTKM_CONT StorageType GetStorage() const { return StorageType{}; } - /// Get the array portal of the control array. - /// Since worklet invocations are asynchronous and this routine is a synchronization point, - /// exceptions maybe thrown for errors from previously executed worklets. - /// - /// \deprecated Use `WritePortal` instead. - /// - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use ArrayHandle::WritePortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - - /// \cond NOPE - WritePortalType GetPortalControl() const { return this->WritePortal(); } - /// \endcond - - /// Get the array portal of the control array. - /// Since worklet invocations are asynchronous and this routine is a synchronization point, - /// exceptions maybe thrown for errors from previously executed worklets. - /// - /// \deprecated Use `ReadPortal` instead. - /// - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use ArrayHandle::ReadPortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - /// \cond NOPE - ReadPortalType GetPortalConstControl() const { return this->ReadPortal(); } - /// \endcond - ///@{ /// \brief Get an array portal that can be used in the control environment. /// @@ -572,12 +520,6 @@ public: } ///@} - VTKM_DEPRECATED(1.6, "Use Allocate(n, vtkm::CopyFlag::On) instead of Shrink(n).") - VTKM_CONT void Shrink(vtkm::Id numberOfValues) - { - this->Allocate(numberOfValues, vtkm::CopyFlag::On); - } - /// @{ /// \brief Fills the array with a given value. /// @@ -676,25 +618,6 @@ public: return StorageType::CreateWritePortal(this->GetBuffers(), device, token); } - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInput now requires a vtkm::cont::Token object.") - ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, token); - } - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForOutput now requires a vtkm::cont::Token object.") - WritePortalType PrepareForOutput(vtkm::Id numberOfValues, vtkm::cont::DeviceAdapterId device) - { - vtkm::cont::Token token; - return this->PrepareForOutput(numberOfValues, device, token); - } - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInPlace now requires a vtkm::cont::Token object.") - WritePortalType PrepareForInPlace(vtkm::cont::DeviceAdapterId device) const - { - vtkm::cont::Token token; - return this->PrepareForInPlace(device, token); - } - /// Returns true if the ArrayHandle's data is on the given device. If the data are on the given /// device, then preparing for that device should not require any data movement. /// @@ -711,19 +634,6 @@ public: return this->IsOnDevice(vtkm::cont::DeviceAdapterTagUndefined{}); } - /// Returns a DeviceAdapterId for a device currently allocated on. If there is no device - /// with an up-to-date copy of the data, VTKM_DEVICE_ADAPTER_UNDEFINED is - /// returned. - /// - /// Note that in a multithreaded environment the validity of this result can - /// change. - /// - VTKM_CONT - VTKM_DEPRECATED(1.7, "Use ArrayHandle::IsOnDevice.") DeviceAdapterId GetDeviceAdapterId() const - { - return detail::ArrayHandleGetDeviceAdapterId(this->Buffers); - } - /// Synchronizes the control array with the execution array. If either the /// user array or control array is already valid, this method does nothing /// (because the data is already available in the control environment). diff --git a/vtkm/cont/ArrayHandleBasic.h b/vtkm/cont/ArrayHandleBasic.h index 0570ce420..8486d05b9 100644 --- a/vtkm/cont/ArrayHandleBasic.h +++ b/vtkm/cont/ArrayHandleBasic.h @@ -232,13 +232,6 @@ VTKM_CONT vtkm::cont::ArrayHandleBasic make_ArrayHandle(const T* array, } } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -VTKM_CONT vtkm::cont::ArrayHandleBasic make_ArrayHandle(const T* array, vtkm::Id numberOfValues) -{ - return make_ArrayHandle(array, numberOfValues, vtkm::CopyFlag::Off); -} - /// A convenience function to move a user-allocated array into an `ArrayHandle`. /// The provided array pointer will be reset to `nullptr`. /// If the array was not allocated with the `new[]` operator, then deleter and reallocater @@ -273,13 +266,6 @@ VTKM_CONT vtkm::cont::ArrayHandleBasic make_ArrayHandle(const std::vector -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -VTKM_CONT vtkm::cont::ArrayHandleBasic make_ArrayHandle(const std::vector& array) -{ - return make_ArrayHandle(array, vtkm::CopyFlag::Off); -} - /// Move an std::vector into an ArrayHandle. /// template diff --git a/vtkm/cont/ArrayHandleCompositeVector.h b/vtkm/cont/ArrayHandleCompositeVector.h index 775021b91..57ba4d2ba 100644 --- a/vtkm/cont/ArrayHandleCompositeVector.h +++ b/vtkm/cont/ArrayHandleCompositeVector.h @@ -13,7 +13,6 @@ #include #include -#include #include #include #include diff --git a/vtkm/cont/ArrayHandleConcatenate.h b/vtkm/cont/ArrayHandleConcatenate.h index 292283123..a8a1cdc2f 100644 --- a/vtkm/cont/ArrayHandleConcatenate.h +++ b/vtkm/cont/ArrayHandleConcatenate.h @@ -10,7 +10,6 @@ #ifndef vtk_m_cont_ArrayHandleConcatenate_h #define vtk_m_cont_ArrayHandleConcatenate_h -#include #include #include @@ -117,57 +116,14 @@ class VTKM_ALWAYS_EXPORT StorageTagConcatenate namespace internal { -namespace detail -{ - -template -struct ConcatinateTypeArgImpl; - -template -struct ConcatinateTypeArgImpl -{ - using StorageTag = StorageTag_; - using Storage = vtkm::cont::internal::Storage; - using ArrayHandle = vtkm::cont::ArrayHandle; -}; - -template -struct ConcatinateTypeArgImpl -{ - VTKM_STATIC_ASSERT_MSG((std::is_same::value), - "Used array with wrong type in ArrayHandleConcatinate."); - using StorageTag VTKM_DEPRECATED( - 1.6, - "Use storage tags instead of array handles in StorageTagConcatenate.") = - typename Array::StorageTag; - using Storage VTKM_DEPRECATED( - 1.6, - "Use storage tags instead of array handles in StorageTagConcatenate.") = - vtkm::cont::internal::Storage; - using ArrayHandle VTKM_DEPRECATED( - 1.6, - "Use storage tags instead of array handles in StorageTagConcatenate.") = - vtkm::cont::ArrayHandle; -}; - -template -struct ConcatinateTypeArg - : ConcatinateTypeArgImpl::type::value> -{ -}; - -} // namespace detail - template class Storage> { - using SourceStorage1 = typename detail::ConcatinateTypeArg::Storage; - using SourceStorage2 = typename detail::ConcatinateTypeArg::Storage; + using SourceStorage1 = vtkm::cont::internal::Storage; + using SourceStorage2 = vtkm::cont::internal::Storage; - using ArrayHandleType1 = typename detail::ConcatinateTypeArg::ArrayHandle; - using ArrayHandleType2 = typename detail::ConcatinateTypeArg::ArrayHandle; + using ArrayHandleType1 = vtkm::cont::ArrayHandle; + using ArrayHandleType2 = vtkm::cont::ArrayHandle; struct Info { @@ -338,9 +294,8 @@ struct SerializableTypeString> template struct SerializableTypeString< vtkm::cont::ArrayHandle>> - : SerializableTypeString::ArrayHandle, - typename internal::detail::ConcatinateTypeArg::ArrayHandle>> + : SerializableTypeString, + vtkm::cont::ArrayHandle>> { }; } @@ -378,11 +333,11 @@ public: template struct Serialization>> - : Serialization::ArrayHandle, - typename vtkm::cont::internal::detail::ConcatinateTypeArg::ArrayHandle>> + : Serialization, + vtkm::cont::ArrayHandle>> { }; + } // diy /// @endcond SERIALIZATION diff --git a/vtkm/cont/ArrayHandleMultiplexer.h b/vtkm/cont/ArrayHandleMultiplexer.h index c46795eca..d05ab60c3 100644 --- a/vtkm/cont/ArrayHandleMultiplexer.h +++ b/vtkm/cont/ArrayHandleMultiplexer.h @@ -433,20 +433,6 @@ public: } }; -/// \brief Converts a \c vtkm::ListTag to an \c ArrayHandleMultiplexer -/// -/// The argument of this template must be a vtkm::ListTag and furthermore all the types in -/// the list tag must be some type of \c ArrayHandle. The templated type gets aliased to -/// an \c ArrayHandleMultiplexer that can store any of these ArrayHandle types. -/// -/// Deprecated. Use `ArrayHandleMultiplexerFromList` instead. -/// -template -using ArrayHandleMultiplexerFromListTag VTKM_DEPRECATED( - 1.6, - "vtkm::ListTag is no longer supported. Use vtkm::List instead.") = - vtkm::ListApply; - /// \brief Converts a`vtkm::List` to an `ArrayHandleMultiplexer` /// /// The argument of this template must be a `vtkm::List` and furthermore all the types in diff --git a/vtkm/cont/ArrayHandleReverse.h b/vtkm/cont/ArrayHandleReverse.h index 51918747d..4a41d2905 100644 --- a/vtkm/cont/ArrayHandleReverse.h +++ b/vtkm/cont/ArrayHandleReverse.h @@ -16,8 +16,6 @@ #include #include -#include - namespace vtkm { namespace cont @@ -81,50 +79,13 @@ class VTKM_ALWAYS_EXPORT StorageTagReverse namespace internal { -namespace detail -{ - -template -struct ReverseTypeArgImpl; - -template -struct ReverseTypeArgImpl -{ - using StorageTag = Storage; - using ArrayHandle = vtkm::cont::ArrayHandle; -}; - -template -struct ReverseTypeArgImpl -{ - VTKM_STATIC_ASSERT_MSG((std::is_same::value), - "Used array with wrong type in ArrayHandleReverse."); - using StorageTag VTKM_DEPRECATED( - 1.6, - "Use storage tag instead of array handle in StorageTagReverse.") = typename Array::StorageTag; - using ArrayHandle VTKM_DEPRECATED( - 1.6, - "Use storage tag instead of array handle in StorageTagReverse.") = - vtkm::cont::ArrayHandle; -}; - -template -struct ReverseTypeArg - : ReverseTypeArgImpl::type::value> -{ -}; - -} // namespace detail - template class Storage> { - using SourceStorage = Storage::StorageTag>; + using SourceStorage = Storage; public: - using ArrayHandleType = typename detail::ReverseTypeArg::ArrayHandle; + using ArrayHandleType = vtkm::cont::ArrayHandle; using ReadPortalType = ArrayPortalReverse; using WritePortalType = ArrayPortalReverse; diff --git a/vtkm/cont/ArrayHandleSOA.h b/vtkm/cont/ArrayHandleSOA.h index 1849e5404..552ab5d5a 100644 --- a/vtkm/cont/ArrayHandleSOA.h +++ b/vtkm/cont/ArrayHandleSOA.h @@ -328,24 +328,6 @@ public: VTKM_STATIC_ASSERT(sizeof...(RemainingVectors) + 1 == NUM_COMPONENTS); } - // This only works if all the templated arguments are of type std::vector. - template -#ifndef VTKM_MSVC - // For some reason, having VTKM_DEPRECATED here is causing a syntax error in some MSVC - // compilers. - VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -#endif - ArrayHandleSOA(const std::vector& vector0, - const RemainingVectors&... componentVectors) - : Superclass(std::vector{ - vtkm::cont::make_ArrayHandle(vector0, vtkm::CopyFlag::Off).GetBuffers()[0], - vtkm::cont::make_ArrayHandle(std::forward(componentVectors), - vtkm::CopyFlag::Off) - .GetBuffers()[0]... }) - { - VTKM_STATIC_ASSERT(sizeof...(RemainingVectors) + 1 == NUM_COMPONENTS); - } - ArrayHandleSOA(std::initializer_list componentArrays, vtkm::Id length, vtkm::CopyFlag copy) @@ -360,20 +342,6 @@ public: } } - VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") - ArrayHandleSOA(std::initializer_list componentArrays, vtkm::Id length) - { - VTKM_ASSERT(componentArrays.size() == NUM_COMPONENTS); - vtkm::IdComponent componentIndex = 0; - for (auto&& vectorIter = componentArrays.begin(); vectorIter != componentArrays.end(); - ++vectorIter) - { - this->SetArray(componentIndex, - vtkm::cont::make_ArrayHandle(*vectorIter, length, vtkm::CopyFlag::Off)); - ++componentIndex; - } - } - // This only works if all the templated arguments are of type std::vector. template ArrayHandleSOA(vtkm::Id length, @@ -387,24 +355,6 @@ public: VTKM_STATIC_ASSERT(sizeof...(RemainingArrays) + 1 == NUM_COMPONENTS); } - // This only works if all the templated arguments are of type std::vector. - template -#ifndef VTKM_MSVC - // For some reason, having VTKM_DEPRECATED here is causing a syntax error in some MSVC - // compilers. - VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -#endif - ArrayHandleSOA(vtkm::Id length, - const ComponentType* array0, - const RemainingArrays&... componentArrays) - : Superclass(std::vector{ - vtkm::cont::make_ArrayHandle(array0, length, vtkm::CopyFlag::Off).GetBuffers()[0], - vtkm::cont::make_ArrayHandle(componentArrays, length, vtkm::CopyFlag::Off) - .GetBuffers()[0]... }) - { - VTKM_STATIC_ASSERT(sizeof...(RemainingArrays) + 1 == NUM_COMPONENTS); - } - VTKM_CONT vtkm::cont::ArrayHandleBasic GetArray(vtkm::IdComponent index) const { return ComponentArrayType({ this->GetBuffers()[index] }); @@ -471,19 +421,6 @@ VTKM_CONT vtkm::cont::make_ArrayHandle(std::forward(componentVectors), copy)...); } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -VTKM_CONT ArrayHandleSOA< - vtkm::Vec> make_ArrayHandleSOA(const std::vector& vector0, - const RemainingVectors&... componentVectors) -{ - return ArrayHandleSOA< - vtkm::Vec>( - vector0, componentVectors...); -} - // This only works if all the templated arguments are rvalues of std::vector. template VTKM_CONT @@ -505,16 +442,6 @@ VTKM_CONT ArrayHandleSOA make_ArrayHandleSOA( return ArrayHandleSOA(std::move(componentVectors), length, copy); } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -VTKM_CONT ArrayHandleSOA make_ArrayHandleSOA( - std::initializer_list::ComponentType*>&& - componentVectors, - vtkm::Id length) -{ - return vtkm::cont::make_ArrayHandleSOA(std::move(componentVectors), length, vtkm::CopyFlag::Off); -} - // This only works if all the templated arguments are of type std::vector. template VTKM_CONT @@ -529,20 +456,6 @@ VTKM_CONT length, copy, array0, componentArrays...); } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_ArrayHandle.") -VTKM_CONT ArrayHandleSOA< - vtkm::Vec> make_ArrayHandleSOA(vtkm::Id length, - const ComponentType* array0, - const RemainingArrays*... componentArrays) -{ - return ArrayHandleSOA< - vtkm::Vec>( - length, array0, componentArrays...); -} - namespace internal { diff --git a/vtkm/cont/ArrayHandleView.h b/vtkm/cont/ArrayHandleView.h index 7bc8daa80..ff286439d 100644 --- a/vtkm/cont/ArrayHandleView.h +++ b/vtkm/cont/ArrayHandleView.h @@ -11,7 +11,6 @@ #define vtk_m_cont_ArrayHandleView_h #include -#include #include #include @@ -101,46 +100,10 @@ struct VTKM_ALWAYS_EXPORT StorageTagView namespace internal { -namespace detail -{ - -template -struct ViewTypeArgImpl; - -template -struct ViewTypeArgImpl -{ - using StorageTag = Storage; - using ArrayHandle = vtkm::cont::ArrayHandle; -}; - -template -struct ViewTypeArgImpl -{ - VTKM_STATIC_ASSERT_MSG((std::is_same::value), - "Used array with wrong type in ArrayHandleView."); - using StorageTag VTKM_DEPRECATED(1.6, - "Use storage tag instead of array handle in StorageTagView.") = - typename Array::StorageTag; - using ArrayHandle VTKM_DEPRECATED(1.6, - "Use storage tag instead of array handle in StorageTagView.") = - vtkm::cont::ArrayHandle; -}; - -template -struct ViewTypeArg - : ViewTypeArgImpl::type::value> -{ -}; - -} // namespace detail - template class Storage> { - using ArrayHandleType = typename detail::ViewTypeArg::ArrayHandle; + using ArrayHandleType = vtkm::cont::ArrayHandle; using SourceStorage = Storage; static std::vector SourceBuffers( diff --git a/vtkm/cont/ArrayRangeCompute.hxx b/vtkm/cont/ArrayRangeCompute.hxx deleted file mode 100644 index d382ce9f2..000000000 --- a/vtkm/cont/ArrayRangeCompute.hxx +++ /dev/null @@ -1,29 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_ArrayRangeCompute_hxx -#define vtk_m_cont_ArrayRangeCompute_hxx - -#include -#include - -namespace vtkm -{ - -VTKM_DEPRECATED(1.6, "Use ArrayRangeComputeTemplate.h instead of ArrayRangeCompute.hxx.") -inline void ArrayRangeCompute_hxx_deprecated() {} - -inline void ActivateArrayRangeCompute_hxx_deprecated_warning() -{ - ArrayRangeCompute_hxx_deprecated(); -} - -} // namespace vtkm - -#endif //vtk_m_cont_ArrayRangeCompute_hxx diff --git a/vtkm/cont/AtomicArray.h b/vtkm/cont/AtomicArray.h index 72ccc2815..eeeab6264 100644 --- a/vtkm/cont/AtomicArray.h +++ b/vtkm/cont/AtomicArray.h @@ -10,7 +10,6 @@ #ifndef vtk_m_cont_AtomicArray_h #define vtk_m_cont_AtomicArray_h -#include #include #include #include @@ -18,11 +17,6 @@ #include #include -// Support deprecated features -VTKM_DEPRECATED_SUPPRESS_BEGIN -#include -VTKM_DEPRECATED_SUPPRESS_END - namespace vtkm { namespace cont @@ -33,13 +27,6 @@ namespace cont /// @cond NONE using AtomicArrayTypeList = vtkm::List; - -struct VTKM_DEPRECATED(1.6, - "AtomicArrayTypeListTag replaced by AtomicArrayTypeList. Note that the " - "new AtomicArrayTypeList cannot be subclassed.") AtomicArrayTypeListTag - : vtkm::internal::ListAsListTag -{ -}; /// @endcond @@ -86,14 +73,6 @@ public: return vtkm::exec::AtomicArrayExecutionObject(this->Handle, device, token); } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForExecution now requires a vtkm::cont::Token object.") - vtkm::exec::AtomicArrayExecutionObject PrepareForExecution(Device device) const - { - vtkm::cont::Token token; - return this->PrepareForExecution(device, token); - } - private: /// @cond NONE vtkm::cont::ArrayHandle Handle; diff --git a/vtkm/cont/BitField.cxx b/vtkm/cont/BitField.cxx index cef32e6cd..82a0fa842 100644 --- a/vtkm/cont/BitField.cxx +++ b/vtkm/cont/BitField.cxx @@ -11,28 +11,6 @@ #include #include -namespace -{ - -struct DeviceCheckFunctor -{ - vtkm::cont::DeviceAdapterId FoundDevice = vtkm::cont::DeviceAdapterTagUndefined{}; - - VTKM_CONT void operator()(vtkm::cont::DeviceAdapterId device, - const vtkm::cont::internal::Buffer& buffer) - { - if (this->FoundDevice == vtkm::cont::DeviceAdapterTagUndefined{}) - { - if (buffer.IsAllocatedOnDevice(device)) - { - this->FoundDevice = device; - } - } - } -}; - -} // anonymous namespace - namespace vtkm { namespace cont @@ -100,13 +78,6 @@ bool BitField::IsOnDevice(vtkm::cont::DeviceAdapterId device) const return this->Buffer.IsAllocatedOnDevice(device); } -vtkm::cont::DeviceAdapterId BitField::GetDeviceAdapterId() const -{ - DeviceCheckFunctor functor; - vtkm::ListForEach(functor, VTKM_DEFAULT_DEVICE_ADAPTER_LIST{}, this->Buffer); - return functor.FoundDevice; -} - BitField::WritePortalType BitField::WritePortal() const { vtkm::cont::Token token; diff --git a/vtkm/cont/BitField.h b/vtkm/cont/BitField.h index 68243d442..aed7e0bab 100644 --- a/vtkm/cont/BitField.h +++ b/vtkm/cont/BitField.h @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -458,13 +457,6 @@ public: return true; } - VTKM_DEPRECATED(1.6, "Use CompareExchangeBitAtomic. (Note the changed interface.)") - VTKM_EXEC_CONT bool CompareAndSwapBitAtomic(vtkm::Id bitIdx, bool newBit, bool expectedBit) const - { - this->CompareExchangeBitAtomic(bitIdx, &expectedBit, newBit); - return expectedBit; - } - /// Perform an atomic compare-exchange operation on the word at @a wordIdx. /// If the word in memory is equal to @a oldWord, it is replaced with /// the value of @a newWord and true returned. If the word in memory is not @@ -484,15 +476,6 @@ public: return vtkm::AtomicCompareExchange(addr, oldWord, newWord); } - template - VTKM_DEPRECATED(1.6, "Use CompareExchangeWordAtomic. (Note the changed interface.)") - VTKM_EXEC_CONT WordType - CompareAndSwapWordAtomic(vtkm::Id wordIdx, WordType newWord, WordType expected) const - { - this->CompareExchangeWordAtomic(wordIdx, &expected, newWord); - return expected; - } - private: template VTKM_EXEC_CONT MaybeConstPointer GetWordAddress(vtkm::Id wordId) const noexcept @@ -509,21 +492,6 @@ using BitPortal = BitPortalBase; using BitPortalConst = BitPortalBase; -template -struct IsValidWordTypeDeprecated -{ - using type VTKM_DEPRECATED( - 1.6, - "BitField::IsValidWordTypeAtomic no longer takes a second Device parameter.") = - detail::BitFieldTraits::IsValidWordTypeAtomic; -}; - -template -struct IsValidWordTypeDeprecated -{ - using type = detail::BitFieldTraits::IsValidWordTypeAtomic; -}; - } // end namespace detail class VTKM_CONT_EXPORT BitField @@ -531,21 +499,12 @@ class VTKM_CONT_EXPORT BitField static constexpr vtkm::Id BlockSize = detail::BitFieldTraits::BlockSize; public: - /// The type array handle used to store the bit data internally: - using ArrayHandleType VTKM_DEPRECATED(1.6, "BitField now uses a Buffer to store data.") = - ArrayHandle; - /// The BitPortal used in the control environment. using WritePortalType = detail::BitPortal; /// A read-only BitPortal used in the control environment. using ReadPortalType = detail::BitPortalConst; - using PortalControl VTKM_DEPRECATED(1.6, - "Use BitField::WritePortalType instead.") = detail::BitPortal; - using PortalConstControl VTKM_DEPRECATED(1.6, "Use ArrayBitField::ReadPortalType instead.") = - detail::BitPortalConst; - using WordTypePreferred = vtkm::AtomicTypePreferred; template @@ -569,12 +528,6 @@ public: template using IsValidWordTypeAtomic = detail::BitFieldTraits::IsValidWordTypeAtomic; - /// Check whether a word type is valid for atomic operations from the control - /// environment. - template - using IsValidWordTypeAtomicControl VTKM_DEPRECATED(1.6, "Use IsValidWordTypeAtomic instead.") = - detail::BitFieldTraits::IsValidWordTypeAtomic; - VTKM_CONT BitField(); VTKM_CONT BitField(const BitField&) = default; VTKM_CONT BitField(BitField&&) noexcept = default; @@ -591,14 +544,6 @@ public: /// Return the internal `Buffer` used to store the `BitField`. VTKM_CONT vtkm::cont::internal::Buffer GetBuffer() const { return this->Buffer; } - /// Return the internal ArrayHandle used to store the BitField. - VTKM_CONT VTKM_DEPRECATED(1.6, "BitField now uses a Buffer to store data.") - ArrayHandle GetData() const - { - return vtkm::cont::ArrayHandle( - std::vector(1, this->Buffer)); - } - /// Return the number of bits stored by this BitField. VTKM_CONT vtkm::Id GetNumberOfBits() const; @@ -672,13 +617,6 @@ public: this->Fill(value, token); } - /// Shrink the bit field to the requested number of bits. - VTKM_CONT VTKM_DEPRECATED(1.6, - "Use Allocate with preserve = On.") void Shrink(vtkm::Id numberOfBits) - { - this->Allocate(numberOfBits, vtkm::CopyFlag::On); - } - /// Release all execution-side resources held by this BitField. VTKM_CONT void ReleaseResourcesExecution(); @@ -701,9 +639,6 @@ public: return this->IsOnDevice(vtkm::cont::DeviceAdapterTagUndefined{}); } - VTKM_CONT VTKM_DEPRECATED(1.6, "Data can be on multiple devices. Use IsOnDevice.") - vtkm::cont::DeviceAdapterId GetDeviceAdapterId() const; - /// \brief Get a portal to the data that is usable from the control environment. /// /// As long as this portal is in scope, no one else will be able to read or write the BitField. @@ -714,20 +649,6 @@ public: /// As long as this portal is in scope, no one else will be able to write in the BitField. VTKM_CONT ReadPortalType ReadPortal() const; - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use BitField::WritePortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - detail::BitPortal GetPortalControl() { return this->WritePortal(); } - - /// Get a read-only portal to the data that is usable from the control - /// environment. - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use BitField::ReadPortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - detail::BitPortalConst GetPortalConstControl() const { return this->ReadPortal(); } - /// Prepares this BitField to be used as an input to an operation in the /// execution environment. If necessary, copies data to the execution /// environment. Can throw an exception if this BitField does not yet contain @@ -736,15 +657,6 @@ public: VTKM_CONT ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) const; - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInput now requires a vtkm::cont::Token object.") - typename ExecutionTypes::PortalConst - PrepareForInput(DeviceAdapterTag device) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, token); - } - /// Prepares (allocates) this BitField to be used as an output from an /// operation in the execution environment. The internal state of this class /// is set to have valid data in the execution BitField with the assumption @@ -755,15 +667,6 @@ public: vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) const; - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForOutput now requires a vtkm::cont::Token object.") - typename ExecutionTypes::Portal - PrepareForOutput(vtkm::Id numBits, DeviceAdapterTag device) const - { - vtkm::cont::Token token; - return this->PrepareForOutput(numBits, device, token); - } - /// Prepares this BitField to be used in an in-place operation (both as input /// and output) in the execution environment. If necessary, copies data to /// the execution environment. Can throw an exception if this BitField does @@ -772,15 +675,6 @@ public: VTKM_CONT WritePortalType PrepareForInPlace(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) const; - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInPlace now requires a vtkm::cont::Token object.") - typename ExecutionTypes::Portal - PrepareForInPlace(DeviceAdapterTag device) const - { - vtkm::cont::Token token; - return this->PrepareForInPlace(device, token); - } - private: mutable vtkm::cont::internal::Buffer Buffer; }; diff --git a/vtkm/cont/CMakeLists.txt b/vtkm/cont/CMakeLists.txt index 9dc8e743e..57663196e 100644 --- a/vtkm/cont/CMakeLists.txt +++ b/vtkm/cont/CMakeLists.txt @@ -62,13 +62,11 @@ set(headers CellLocatorPartitioned.h CellLocatorRectilinearGrid.h CellLocatorTwoLevel.h - CellLocatorUniformBins.h CellLocatorUniformGrid.h CellSet.h CellSetExplicit.h CellSetExtrude.h CellSetList.h - CellSetListTag.h CellSetPermutation.h CellSetSingleType.h CellSetStructured.h @@ -82,13 +80,10 @@ set(headers DataSetBuilderExplicit.h DataSetBuilderRectilinear.h DataSetBuilderUniform.h - DataSetFieldAdd.h DeviceAdapter.h DeviceAdapterAlgorithm.h DeviceAdapterList.h - DeviceAdapterListTag.h DeviceAdapterTag.h - DynamicCellSet.h # Deprecated, replaced by Unknown/UncertainCellSet.h EnvironmentTracker.h Error.h ErrorBadAllocation.h @@ -109,15 +104,12 @@ set(headers MergePartitionedDataSet.h ParticleArrayCopy.h PartitionedDataSet.h - PointLocatorUniformGrid.h PointLocatorSparseGrid.h RuntimeDeviceInformation.h RuntimeDeviceTracker.h Serialization.h Storage.h - StorageImplicit.h # Deprecated, rolled into ArrayHandleImplicit.h StorageList.h - StorageListTag.h Timer.h Token.h TryExecute.h @@ -127,11 +119,9 @@ set(headers UnknownArrayHandle.h UnknownCellSet.h Variant.h - VariantArrayHandle.h # Deprecated, replaces with Unknown/UncertainArrayHandle.h ) set(template_sources - ArrayRangeCompute.hxx # Deprecated, replaced with ArrayRangeComputeTemplate.h CellSetExplicit.hxx ParticleArrayCopy.hxx ) @@ -182,18 +172,6 @@ set(sources UnknownCellSet.cxx ) -if(VTKm_ENABLE_TESTING_LIBRARY) - list(APPEND sources - # This file should really be part of the vtkm_cont_testing library (in the testing - # subdirectory) It supports external code using deprecated functionality. In particular, - # testing/MakeTestDataSet.h now needs symbols compiled in MakeTestDataSet.cxx, but the - # deprecated behavior expects to only need to include vtkm_cont. As a workaround, add the code - # to vtkm_cont for now. This should probably be changed back to be in vtkm_cont_testing for the - # 2.0 release. - testlib/MakeTestDataSet.cxx - ) -endif() - # This list of sources has code that uses devices and so might need to be # compiled with a device-specific compiler (like CUDA). set(device_sources diff --git a/vtkm/cont/CellLocatorUniformBins.h b/vtkm/cont/CellLocatorUniformBins.h deleted file mode 100644 index 4c3010b5c..000000000 --- a/vtkm/cont/CellLocatorUniformBins.h +++ /dev/null @@ -1,30 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_CellLocatorUniformBins_h -#define vtk_m_cont_CellLocatorUniformBins_h - -#include - -#include - -namespace vtkm -{ -namespace cont -{ - -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Replaced with CellLocatorTwoLevel.") - CellLocatorUniformBins : vtkm::cont::CellLocatorTwoLevel -{ -}; - -} -} // namespace vtkm::cont - -#endif //vtk_m_cont_CellLocatorUniformBins_h diff --git a/vtkm/cont/CellSetExplicit.h b/vtkm/cont/CellSetExplicit.h index 3a290e44b..69fb5db06 100644 --- a/vtkm/cont/CellSetExplicit.h +++ b/vtkm/cont/CellSetExplicit.h @@ -11,7 +11,6 @@ #define vtk_m_cont_CellSetExplicit_h #include -#include #include #include #include @@ -164,32 +163,6 @@ public: const vtkm::cont::ArrayHandle& connectivity, const vtkm::cont::ArrayHandle& offsets); - template - struct VTKM_DEPRECATED( - 1.6, - "Replace ExecutionTypes::ExecObjectType with ExecConnectivityType.") - ExecutionTypes - { - private: - VTKM_IS_DEVICE_ADAPTER_TAG(Device); - VTKM_IS_TOPOLOGY_ELEMENT_TAG(VisitTopology); - VTKM_IS_TOPOLOGY_ELEMENT_TAG(IncidentTopology); - - using Chooser = ConnectivityChooser; - - using ShapesAT = typename Chooser::ShapesArrayType; - using ConnAT = typename Chooser::ConnectivityArrayType; - using OffsetsAT = typename Chooser::OffsetsArrayType; - - public: - using ShapesPortalType = typename ShapesAT::ReadPortalType; - using ConnectivityPortalType = typename ConnAT::ReadPortalType; - using OffsetsPortalType = typename OffsetsAT::ReadPortalType; - - using ExecObjectType = - vtkm::exec::ConnectivityExplicit; - }; - template using ExecConnectivityType = typename ConnectivityChooser::ExecConnectivityType; @@ -201,17 +174,6 @@ public: IncidentTopology, vtkm::cont::Token&) const; - template - VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.") - VTKM_CONT ExecConnectivityType PrepareForInput( - vtkm::cont::DeviceAdapterId device, - VisitTopology visitTopology, - IncidentTopology incidentTopology) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, visitTopology, incidentTopology, token); - } - template VTKM_CONT const typename ConnectivityChooser::ShapesArrayType& GetShapesArray(VisitTopology, IncidentTopology) const; diff --git a/vtkm/cont/CellSetExplicit.hxx b/vtkm/cont/CellSetExplicit.hxx index e9c5e76cc..99ae1f4fe 100644 --- a/vtkm/cont/CellSetExplicit.hxx +++ b/vtkm/cont/CellSetExplicit.hxx @@ -14,6 +14,8 @@ #include #include +#include + // This file uses a lot of very verbose identifiers and the clang formatted // code quickly becomes unreadable. Stick with manual formatting for now. // diff --git a/vtkm/cont/CellSetExtrude.h b/vtkm/cont/CellSetExtrude.h index 671ea709b..be8285779 100644 --- a/vtkm/cont/CellSetExtrude.h +++ b/vtkm/cont/CellSetExtrude.h @@ -110,15 +110,6 @@ public: typename detail::CellSetExtrudeConnectivityChooser::ExecConnectivityType; - template - struct VTKM_DEPRECATED( - 1.6, - "Replace ExecutionTypes::ExecObjectType with ExecConnectivityType.") - ExecutionTypes - { - using ExecObjectType = ExecConnectivityType; - }; - vtkm::exec::ConnectivityExtrude PrepareForInput(vtkm::cont::DeviceAdapterId, vtkm::TopologyElementTagCell, vtkm::TopologyElementTagPoint, @@ -129,26 +120,6 @@ public: vtkm::TopologyElementTagCell, vtkm::cont::Token&) const; - VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.") - vtkm::exec::ConnectivityExtrude PrepareForInput( - vtkm::cont::DeviceAdapterId device, - vtkm::TopologyElementTagCell visitTopology, - vtkm::TopologyElementTagPoint incidentTopology) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, visitTopology, incidentTopology, token); - } - - VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.") - vtkm::exec::ReverseConnectivityExtrude PrepareForInput( - vtkm::cont::DeviceAdapterId device, - vtkm::TopologyElementTagPoint visitTopology, - vtkm::TopologyElementTagCell incidentTopology) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, visitTopology, incidentTopology, token); - } - private: void BuildReverseConnectivity(); diff --git a/vtkm/cont/CellSetListTag.h b/vtkm/cont/CellSetListTag.h deleted file mode 100644 index f0a5bc89e..000000000 --- a/vtkm/cont/CellSetListTag.h +++ /dev/null @@ -1,78 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_CellSetListTag_h -#define vtk_m_cont_CellSetListTag_h - -// Everything in this header file is deprecated and movded to CellSetList.h. - -#ifndef VTKM_DEFAULT_CELL_SET_LIST_TAG -#define VTKM_DEFAULT_CELL_SET_LIST_TAG ::vtkm::cont::detail::CellSetListTagDefault -#endif - -#include - -#include - -#define VTK_M_OLD_CELL_LIST_DEFINITION(name) \ - struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( \ - 1.6, \ - "CellSetListTag" #name " replaced by CellSetList" #name ". " \ - "Note that the new CellSetList" #name " cannot be subclassed.") CellSetListTag##name \ - : vtkm::internal::ListAsListTag \ - { \ - } - -namespace vtkm -{ -namespace cont -{ - -VTK_M_OLD_CELL_LIST_DEFINITION(Structured1D); -VTK_M_OLD_CELL_LIST_DEFINITION(Structured2D); -VTK_M_OLD_CELL_LIST_DEFINITION(Structured3D); -VTK_M_OLD_CELL_LIST_DEFINITION(ExplicitDefault); -VTK_M_OLD_CELL_LIST_DEFINITION(Common); -VTK_M_OLD_CELL_LIST_DEFINITION(Structured); -VTK_M_OLD_CELL_LIST_DEFINITION(Unstructured); - -/// @cond NONE -template -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.6, - "CellSetListTagExplicit replaced by CellSetListExplicit. " - "Note that the new CellSetListExplicit cannot be subclassed.") CellSetListTagExplicit - : vtkm::internal::ListAsListTag< - CellSetListExplicit> -{ -}; -/// @endcond - -namespace detail -{ - -/// @cond NONE -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.6, - "VTKM_DEFAULT_CELL_SET_LIST_TAG replaced by VTKM_DEFAULT_CELL_SET_LIST. " - "Note that the new VTKM_DEFAULT_CELL_SET_LIST cannot be subclassed.") CellSetListTagDefault - : vtkm::internal::ListAsListTag -{ -}; -/// @endcond - -} // namespace detail -} -} // namespace vtkm::cont - -#undef VTK_M_OLD_CELL_LIST_DEFINITION - -#endif //vtk_m_cont_CellSetListTag_h diff --git a/vtkm/cont/CellSetPermutation.h b/vtkm/cont/CellSetPermutation.h index a22165fb6..463f1605c 100644 --- a/vtkm/cont/CellSetPermutation.h +++ b/vtkm/cont/CellSetPermutation.h @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -451,15 +452,6 @@ public: OriginalCellSetType, PermutationArrayHandleType>::ExecConnectivityType; - template - struct VTKM_DEPRECATED( - 1.6, - "Replace ExecutionTypes::ExecObjectType with ExecConnectivityType.") - ExecutionTypes - { - using ExecObjectType = ExecConnectivityType; - }; - VTKM_CONT ExecConnectivityType PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::TopologyElementTagCell visitTopology, @@ -492,17 +484,6 @@ public: this->VisitPointsWithCells.Offsets.PrepareForInput(device, token)); } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.") - ExecConnectivityType PrepareForInput( - vtkm::cont::DeviceAdapterId device, - VisitTopology visitTopology, - IncidentTopology incidentTopology) - { - vtkm::cont::Token token; - return this->PrepareForInput(device, visitTopology, incidentTopology, token); - } - VTKM_CONT void PrintSummary(std::ostream& out) const override { diff --git a/vtkm/cont/CellSetStructured.h b/vtkm/cont/CellSetStructured.h index 6399c4ee4..96b3f5a7f 100644 --- a/vtkm/cont/CellSetStructured.h +++ b/vtkm/cont/CellSetStructured.h @@ -126,18 +126,6 @@ public: using ExecConnectivityType = vtkm::exec::ConnectivityStructured; - template - struct VTKM_DEPRECATED( - 1.6, - "Replace ExecutionTypes::ExecObjectType with ExecConnectivityType.") - ExecutionTypes - { - VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapter); - VTKM_IS_TOPOLOGY_ELEMENT_TAG(VisitTopology); - VTKM_IS_TOPOLOGY_ELEMENT_TAG(IncidentTopology); - using ExecObjectType = ExecConnectivityType; - }; - template ExecConnectivityType PrepareForInput(vtkm::cont::DeviceAdapterId, VisitTopology, @@ -147,17 +135,6 @@ public: return ExecConnectivityType(this->Structure); } - template - VTKM_DEPRECATED(1.6, "Provide a vtkm::cont::Token object when calling PrepareForInput.") - ExecConnectivityType PrepareForInput( - vtkm::cont::DeviceAdapterId device, - VisitTopology visitTopology, - IncidentTopology incidentTopology) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, visitTopology, incidentTopology, token); - } - void PrintSummary(std::ostream& out) const override { out << " StructuredCellSet:\n"; diff --git a/vtkm/cont/ColorTable.cxx b/vtkm/cont/ColorTable.cxx index 4095ba8a3..e0973a8ef 100644 --- a/vtkm/cont/ColorTable.cxx +++ b/vtkm/cont/ColorTable.cxx @@ -1271,12 +1271,6 @@ vtkm::exec::ColorTable ColorTable::PrepareForExecution(vtkm::cont::DeviceAdapter return execTable; } -vtkm::exec::ColorTable ColorTable::PrepareForExecution(vtkm::cont::DeviceAdapterId device) const -{ - vtkm::cont::Token token; - return this->PrepareForExecution(device, token); -} - //--------------------------------------------------------------------------- vtkm::Id ColorTable::GetModifiedCount() const { diff --git a/vtkm/cont/ColorTable.h b/vtkm/cont/ColorTable.h index eb194705f..5b069e655 100644 --- a/vtkm/cont/ColorTable.h +++ b/vtkm/cont/ColorTable.h @@ -33,15 +33,6 @@ namespace detail struct ColorTableInternals; } -struct VTKM_DEPRECATED(1.6, "Use vtkm::ColorSpace.") ColorSpace -{ - static constexpr vtkm::ColorSpace RGB = vtkm::ColorSpace::RGB; - static constexpr vtkm::ColorSpace HSV = vtkm::ColorSpace::HSV; - static constexpr vtkm::ColorSpace HSV_WRAP = vtkm::ColorSpace::HSVWrap; - static constexpr vtkm::ColorSpace LAB = vtkm::ColorSpace::Lab; - static constexpr vtkm::ColorSpace DIVERGING = vtkm::ColorSpace::Diverging; -}; - /// \brief Color Table for coloring arbitrary fields /// /// @@ -120,25 +111,6 @@ public: RainbowUniform, Jet, RainbowDesaturated, - - DEFAULT VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Default."), - COOL_TO_WARM VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::CoolToWarm."), - COOL_TO_WARM_EXTENDED VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::CoolToWarmExtended."), - VIRIDIS VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Viridis."), - INFERNO VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Inferno."), - PLASMA VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Plasma."), - BLACK_BODY_RADIATION VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::BlackBodyRadiation."), - X_RAY VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::XRay."), - GREEN VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Green."), - BLACK_BLUE_WHITE VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::BlackBlueWhite."), - BLUE_TO_ORANGE VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::BlueToOrange."), - GRAY_TO_RED VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::GrayToRed."), - COLD_AND_HOT VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::ColdAndHot."), - BLUE_GREEN_ORANGE VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::BlueGreenOrange."), - YELLOW_GRAY_BLUE VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::YellowGrayBlue."), - RAINBOW_UNIFORM VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::RainbowUniform."), - JET VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::Jet."), - RAINBOW_DESATURATED VTKM_DEPRECATED(1.6, "Use vtkm::ColorTable::Preset::RainbowDesaturated.") }; /// \brief Construct a color table from a preset @@ -599,9 +571,6 @@ public: vtkm::exec::ColorTable PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId, vtkm::cont::Token& token) const; - VTKM_DEPRECATED(1.6, "PrepareForExecution now requires a vtkm::cont::Token object") - inline vtkm::exec::ColorTable PrepareForExecution(vtkm::cont::DeviceAdapterId deviceId) const; - /// \brief Returns the modified count for changes of the color table /// /// The `ModifiedCount` of the color table starts at 1 and gets incremented diff --git a/vtkm/cont/ColorTablePresets.cxx b/vtkm/cont/ColorTablePresets.cxx index db650d800..e9a6f8f84 100644 --- a/vtkm/cont/ColorTablePresets.cxx +++ b/vtkm/cont/ColorTablePresets.cxx @@ -1371,51 +1371,9 @@ bool LoadColorTablePreset(vtkm::cont::ColorTable::Preset preset, vtkm::cont::Col } } - VTKM_DEPRECATED_SUPPRESS_BEGIN - // Handle deprecated names - switch (preset) - { - case vtkm::cont::ColorTable::Preset::DEFAULT: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Default, table); - case vtkm::cont::ColorTable::Preset::COOL_TO_WARM: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::CoolToWarm, table); - case vtkm::cont::ColorTable::Preset::COOL_TO_WARM_EXTENDED: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::CoolToWarmExtended, table); - case vtkm::cont::ColorTable::Preset::VIRIDIS: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Viridis, table); - case vtkm::cont::ColorTable::Preset::INFERNO: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Inferno, table); - case vtkm::cont::ColorTable::Preset::PLASMA: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Plasma, table); - case vtkm::cont::ColorTable::Preset::BLACK_BODY_RADIATION: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::BlackBodyRadiation, table); - case vtkm::cont::ColorTable::Preset::X_RAY: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::XRay, table); - case vtkm::cont::ColorTable::Preset::GREEN: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Green, table); - case vtkm::cont::ColorTable::Preset::BLACK_BLUE_WHITE: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::BlackBlueWhite, table); - case vtkm::cont::ColorTable::Preset::BLUE_TO_ORANGE: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::BlueToOrange, table); - case vtkm::cont::ColorTable::Preset::GRAY_TO_RED: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::GrayToRed, table); - case vtkm::cont::ColorTable::Preset::COLD_AND_HOT: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::ColdAndHot, table); - case vtkm::cont::ColorTable::Preset::BLUE_GREEN_ORANGE: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::BlueGreenOrange, table); - case vtkm::cont::ColorTable::Preset::YELLOW_GRAY_BLUE: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::YellowGrayBlue, table); - case vtkm::cont::ColorTable::Preset::RAINBOW_UNIFORM: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::RainbowUniform, table); - case vtkm::cont::ColorTable::Preset::JET: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::Jet, table); - case vtkm::cont::ColorTable::Preset::RAINBOW_DESATURATED: - return LoadColorTablePreset(vtkm::cont::ColorTable::Preset::RainbowDesaturated, table); - default: - // Should not get here. - return false; - } - VTKM_DEPRECATED_SUPPRESS_END + // Should not get here. + VTKM_LOG_S(vtkm::cont::LogLevel::Warn, "Missing ColorTable preset."); + return false; } VTKM_CONT_EXPORT std::set GetPresetNames() diff --git a/vtkm/cont/CoordinateSystem.h b/vtkm/cont/CoordinateSystem.h index 34b8008d1..72f454d7a 100644 --- a/vtkm/cont/CoordinateSystem.h +++ b/vtkm/cont/CoordinateSystem.h @@ -11,7 +11,6 @@ #define vtk_m_cont_CoordinateSystem_h #include -#include #include #include diff --git a/vtkm/cont/DataSetBuilderExplicit.h b/vtkm/cont/DataSetBuilderExplicit.h index fa68f257c..a45c9eb46 100644 --- a/vtkm/cont/DataSetBuilderExplicit.h +++ b/vtkm/cont/DataSetBuilderExplicit.h @@ -68,32 +68,6 @@ public: const std::vector& connectivity, const std::string& coordsNm = "coords"); - template - VTKM_DEPRECATED(1.6, - "Combine point coordinate arrays using most appropriate array (e.g. " - "ArrayHandleCompositeVector, ArrayHandleSOA, ArrayHandleCartesianProduct") - VTKM_CONT static vtkm::cont::DataSet - Create(const vtkm::cont::ArrayHandle& xVals, - const vtkm::cont::ArrayHandle& yVals, - const vtkm::cont::ArrayHandle& zVals, - const vtkm::cont::ArrayHandle& shapes, - const vtkm::cont::ArrayHandle& numIndices, - const vtkm::cont::ArrayHandle& connectivity, - const std::string& coordsNm = "coords") - { - VTKM_ASSERT(xVals.GetNumberOfValues() == yVals.GetNumberOfValues()); - VTKM_ASSERT(xVals.GetNumberOfValues() == zVals.GetNumberOfValues()); - - auto offsets = vtkm::cont::ConvertNumComponentsToOffsets(numIndices); - - return DataSetBuilderExplicit::BuildDataSet( - vtkm::cont::make_ArrayHandleCompositeVector(xVals, yVals, zVals), - shapes, - offsets, - connectivity, - coordsNm); - } - template VTKM_CONT static vtkm::cont::DataSet Create(const std::vector>& coords, const std::vector& shapes, diff --git a/vtkm/cont/DataSetFieldAdd.h b/vtkm/cont/DataSetFieldAdd.h deleted file mode 100644 index bbcdf90b6..000000000 --- a/vtkm/cont/DataSetFieldAdd.h +++ /dev/null @@ -1,105 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_DataSetFieldAdd_h -#define vtk_m_cont_DataSetFieldAdd_h - -#include -#include -#include - -namespace vtkm -{ -namespace cont -{ - -class VTKM_DEPRECATED(1.6, - "The AddPointField and AddCellField methods should now be called " - "directly on the vtkm::cont::DataSet object") DataSetFieldAdd -{ -public: - VTKM_CONT - DataSetFieldAdd() {} - - //Point centered fields. - VTKM_CONT - static void AddPointField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const vtkm::cont::UnknownArrayHandle& field) - { - dataSet.AddField(make_FieldPoint(fieldName, field)); - } - - template - VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const vtkm::cont::ArrayHandle& field) - { - dataSet.AddField(make_FieldPoint(fieldName, field)); - } - - template - VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const std::vector& field) - { - dataSet.AddField( - make_Field(fieldName, vtkm::cont::Field::Association::Points, field, vtkm::CopyFlag::On)); - } - - template - VTKM_CONT static void AddPointField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const T* field, - const vtkm::Id& n) - { - dataSet.AddField( - make_Field(fieldName, vtkm::cont::Field::Association::Points, field, n, vtkm::CopyFlag::On)); - } - - //Cell centered field - VTKM_CONT - static void AddCellField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const vtkm::cont::UnknownArrayHandle& field) - { - dataSet.AddField(make_FieldCell(fieldName, field)); - } - - template - VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const vtkm::cont::ArrayHandle& field) - { - dataSet.AddField(make_FieldCell(fieldName, field)); - } - - template - VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const std::vector& field) - { - dataSet.AddField( - make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, vtkm::CopyFlag::On)); - } - - template - VTKM_CONT static void AddCellField(vtkm::cont::DataSet& dataSet, - const std::string& fieldName, - const T* field, - const vtkm::Id& n) - { - dataSet.AddField( - make_Field(fieldName, vtkm::cont::Field::Association::Cells, field, n, vtkm::CopyFlag::On)); - } -}; -} -} //namespace vtkm::cont - -#endif //vtk_m_cont_DataSetFieldAdd_h diff --git a/vtkm/cont/DeviceAdapterListTag.h b/vtkm/cont/DeviceAdapterListTag.h deleted file mode 100644 index d79b2019b..000000000 --- a/vtkm/cont/DeviceAdapterListTag.h +++ /dev/null @@ -1,54 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_DeviceAdapterListTag_h -#define vtk_m_cont_DeviceAdapterListTag_h - -// Everything in this header file is deprecated and movded to DeviceAdapterList.h. - -#ifndef VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG -#define VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG ::vtkm::cont::detail::DeviceAdapterListTagDefault -#endif - -#include - -#include - -namespace vtkm -{ -namespace cont -{ - -/// @cond NONE -struct VTKM_DEPRECATED(1.6, - "DeviceAdapterListTagCommon replaced by DeviceAdapterListCommon. " - "Note that the new DeviceAdapterListCommon cannot be subclassed.") - DeviceAdapterListTagCommon : vtkm::internal::ListAsListTag -{ -}; -/// @endcond - -namespace detail -{ - -/// @cond NONE -struct VTKM_DEPRECATED( - 1.6, - "VTKM_DEFAULT_DEVICE_ADAPTER_LIST_TAG replaced by VTKM_DEFAULT_DEVICE_ADAPTER_LIST. " - "Note that the new VTKM_DEFAULT_DEVICE_ADAPTER_LIST cannot be subclassed.") - DeviceAdapterListTagDefault : vtkm::internal::ListAsListTag -{ -}; -/// @endcond - -} // namespace detail -} -} // namespace vtkm::cont - -#endif //vtk_m_cont_DeviceAdapterListTag_h diff --git a/vtkm/cont/DynamicCellSet.h b/vtkm/cont/DynamicCellSet.h deleted file mode 100644 index 01a57307b..000000000 --- a/vtkm/cont/DynamicCellSet.h +++ /dev/null @@ -1,27 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_DynamicCellSet_h -#define vtk_m_cont_DynamicCellSet_h - -#include - -struct VTKM_DEPRECATED(1.8, "Use UnknownCellSet.h or UncertainCellSet.h.") - DynamicCellSet_h_header_is_deprecated -{ - int x; -}; - -inline void EmitDynamicCellSetHDeprecationWarning() -{ - static DynamicCellSet_h_header_is_deprecated x; - ++x.x; -} - -#endif //vtk_m_cont_DynamicCellSet_h diff --git a/vtkm/cont/ExecutionAndControlObjectBase.h b/vtkm/cont/ExecutionAndControlObjectBase.h index a8b473a52..8337f9188 100644 --- a/vtkm/cont/ExecutionAndControlObjectBase.h +++ b/vtkm/cont/ExecutionAndControlObjectBase.h @@ -61,8 +61,7 @@ struct HasPrepareForControl #define VTKM_IS_EXECUTION_AND_CONTROL_OBJECT(execObject) \ static_assert(::vtkm::cont::internal::IsExecutionAndControlObjectBase::value, \ "Provided type is not a subclass of vtkm::cont::ExecutionAndControlObjectBase."); \ - static_assert(::vtkm::cont::internal::HasPrepareForExecution::value || \ - ::vtkm::cont::internal::HasPrepareForExecutionDeprecated::value, \ + static_assert(::vtkm::cont::internal::HasPrepareForExecution::value, \ "Provided type does not have requisite PrepareForExecution method."); \ static_assert(::vtkm::cont::internal::HasPrepareForControl::value, \ "Provided type does not have requisite PrepareForControl method.") diff --git a/vtkm/cont/ExecutionObjectBase.h b/vtkm/cont/ExecutionObjectBase.h index 52d248bc4..ddc7acb9b 100644 --- a/vtkm/cont/ExecutionObjectBase.h +++ b/vtkm/cont/ExecutionObjectBase.h @@ -10,7 +10,6 @@ #ifndef vtk_m_cont_ExecutionObjectBase_h #define vtk_m_cont_ExecutionObjectBase_h -#include #include #include @@ -50,18 +49,6 @@ struct CheckPrepareForExecution static auto check(...) -> std::false_type; }; -struct CheckPrepareForExecutionDeprecated -{ - VTKM_DEPRECATED_SUPPRESS_BEGIN - template - static auto check(T* p) - -> decltype(p->PrepareForExecution(vtkm::cont::DeviceAdapterTagSerial{}), std::true_type()); - VTKM_DEPRECATED_SUPPRESS_END - - template - static auto check(...) -> std::false_type; -}; - } // namespace detail template @@ -74,20 +61,12 @@ struct HasPrepareForExecution { }; -template -struct HasPrepareForExecutionDeprecated - : decltype( - detail::CheckPrepareForExecutionDeprecated::check::type>(nullptr)) -{ -}; - /// Checks that the argument is a proper execution object. /// -#define VTKM_IS_EXECUTION_OBJECT(execObject) \ - static_assert(::vtkm::cont::internal::IsExecutionObjectBase::value, \ - "Provided type is not a subclass of vtkm::cont::ExecutionObjectBase."); \ - static_assert(::vtkm::cont::internal::HasPrepareForExecution::value || \ - ::vtkm::cont::internal::HasPrepareForExecutionDeprecated::value, \ +#define VTKM_IS_EXECUTION_OBJECT(execObject) \ + static_assert(::vtkm::cont::internal::IsExecutionObjectBase::value, \ + "Provided type is not a subclass of vtkm::cont::ExecutionObjectBase."); \ + static_assert(::vtkm::cont::internal::HasPrepareForExecution::value, \ "Provided type does not have requisite PrepareForExecution method.") ///@{ @@ -120,30 +99,6 @@ VTKM_CONT auto CallPrepareForExecution(T&& execObject, } ///@} -// If you get a deprecation warning at this function, it means that an ExecutionObject is using the -// old style PrepareForExecution. Update its PrepareForExecution method to accept both a device and -// a token. -// -// Developer note: the third template argument, TokenType, is expected to be a vtkm::cont::Token -// (which is ignored). The reason why it is a template argument instead of just the type expected -// is so that ExecObjects that implement both versions of PrepareForExecution (for backward -// compatibility) will match the non-deprecated version instead of being ambiguous. -template -VTKM_CONT VTKM_DEPRECATED( - 1.6, - "ExecutionObjects now require a PrepareForExecution that takes a vtkm::cont::Token object. " - "PrepareForExecution(Device) is deprecated. Implement PrepareForExecution(Device, " - "Token).") auto CallPrepareForExecution(T&& execObject, Device device, TokenType&) - -> decltype(execObject.PrepareForExecution(device)) -{ - VTKM_IS_EXECUTION_OBJECT(T); - VTKM_IS_DEVICE_ADAPTER_TAG(Device); - VTKM_STATIC_ASSERT( - (std::is_same::type>::value)); - - return execObject.PrepareForExecution(device); -} - /// \brief Gets the type of the execution-side object for an ExecutionObject. /// /// An execution object (that is, an object inheriting from `vtkm::cont::ExecutionObjectBase`) is diff --git a/vtkm/cont/Field.h b/vtkm/cont/Field.h index c9a99dbf3..8ec7e1a25 100644 --- a/vtkm/cont/Field.h +++ b/vtkm/cont/Field.h @@ -39,13 +39,6 @@ public: Cells, Partitions, Global, - ANY VTKM_DEPRECATED(1.8, "Use vtkm::cont::Field::Association::Any.") = Any, - WHOLE_MESH VTKM_DEPRECATED(1.8, "Use vtkm::cont::Field::Association::WholeDataSet.") = - WholeDataSet, - POINTS VTKM_DEPRECATED(1.8, "Use vtkm::cont::Field::Association::Points.") = Points, - CELL_SET VTKM_DEPRECATED(1.8, "Use vtkm::cont::Field::Association::Cells.") = Cells, - WholeMesh VTKM_DEPRECATED(1.9, "Use vtkm::cont::Field::Association::WholeDataSet.") = - WholeDataSet }; VTKM_CONT @@ -82,16 +75,6 @@ public: } VTKM_CONT bool IsGlobalField() const { return this->FieldAssociation == Association::Global; } - VTKM_DEPRECATED(1.9, "Use IsCellField.") - VTKM_CONT bool IsFieldCell() const { return this->IsCellField(); } - VTKM_DEPRECATED(1.9, "Use IsPointField.") - VTKM_CONT bool IsFieldPoint() const { return this->IsPointField(); } - VTKM_DEPRECATED(1.9, "Use IsWholeDataSetField. Note that meaning of `Global` has changed!") - VTKM_CONT bool IsFieldGlobal() const - { - return this->FieldAssociation == Association::WholeDataSet; - } - /// Returns true if the array of the field has a value type that matches something in /// `VTKM_FIELD_TYPE_LIST` and a storage that matches something in `VTKM_FIELD_STORAGE_LIST`. VTKM_CONT bool IsSupportedType() const; @@ -157,20 +140,6 @@ public: /// VTKM_CONT void ConvertToExpected(); - template - VTKM_DEPRECATED(1.6, "TypeList no longer supported in Field::GetRange.") - VTKM_CONT void GetRange(vtkm::Range* range, TypeList) const - { - this->GetRange(range); - } - - template - VTKM_DEPRECATED(1.6, "TypeList no longer supported in Field::GetRange.") - VTKM_CONT const vtkm::cont::ArrayHandle& GetRange(TypeList) const - { - return this->GetRange(); - } - VTKM_CONT void SetData(const vtkm::cont::UnknownArrayHandle& newdata); template @@ -217,14 +186,6 @@ vtkm::cont::Field make_Field(std::string name, return vtkm::cont::Field(name, association, vtkm::cont::make_ArrayHandle(data, size, copy)); } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_Field.") -vtkm::cont::Field - make_Field(std::string name, Field::Association association, const T* data, vtkm::Id size) -{ - return make_Field(name, association, data, size, vtkm::CopyFlag::Off); -} - template vtkm::cont::Field make_Field(std::string name, Field::Association association, @@ -234,20 +195,12 @@ vtkm::cont::Field make_Field(std::string name, return vtkm::cont::Field(name, association, vtkm::cont::make_ArrayHandle(data, copy)); } -template -VTKM_DEPRECATED(1.6, "Specify a vtkm::CopyFlag or use a move version of make_Field.") -vtkm::cont::Field - make_Field(std::string name, Field::Association association, const std::vector& data) -{ - return make_Field(name, association, data, vtkm::CopyFlag::Off); -} - template vtkm::cont::Field make_FieldMove(std::string name, Field::Association association, std::vector&& data) { - return vtkm::cont::Field(name, association, vtkm::cont::make_ArrayHandleMove(data)); + return vtkm::cont::Field(name, association, vtkm::cont::make_ArrayHandleMove(std::move(data))); } template @@ -320,24 +273,6 @@ struct DynamicTransformTraits //============================================================================= // Specializations of serialization related classes /// @cond SERIALIZATION -namespace vtkm -{ -namespace cont -{ -template -struct VTKM_DEPRECATED(1.6, "You can now directly serialize Field.") SerializableField -{ - SerializableField() = default; - - explicit SerializableField(const vtkm::cont::Field& field) - : Field(field) - { - } - - vtkm::cont::Field Field; -}; -} // namespace cont -} // namespace vtkm namespace mangled_diy_namespace { @@ -349,27 +284,6 @@ struct VTKM_CONT_EXPORT Serialization static VTKM_CONT void load(BinaryBuffer& bb, vtkm::cont::Field& field); }; -// Implement deprecated code -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -struct Serialization> -{ -private: - using Type = vtkm::cont::SerializableField; - -public: - static VTKM_CONT void save(BinaryBuffer& bb, const Type& serializable) - { - Serialization::save(bb, serializable.Field); - } - - static VTKM_CONT void load(BinaryBuffer& bb, Type& serializable) - { - Serialization::load(bb, serializable.Field); - } -}; -VTKM_DEPRECATED_SUPPRESS_END - } // diy /// @endcond SERIALIZATION diff --git a/vtkm/cont/FieldRangeCompute.h b/vtkm/cont/FieldRangeCompute.h index ff8223882..ba11dfb34 100644 --- a/vtkm/cont/FieldRangeCompute.h +++ b/vtkm/cont/FieldRangeCompute.h @@ -37,32 +37,6 @@ vtkm::cont::ArrayHandle FieldRangeCompute( const vtkm::cont::DataSet& dataset, const std::string& name, vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any); - -template -VTKM_DEPRECATED(1.6, "FieldRangeCompute no longer supports TypeList.") -VTKM_CONT vtkm::cont::ArrayHandle FieldRangeCompute( - const vtkm::cont::DataSet& dataset, - const std::string& name, - vtkm::cont::Field::Association assoc, - TypeList) -{ - VTKM_IS_LIST(TypeList); - vtkm::cont::Field field; - try - { - field = dataset.GetField(name, assoc); - } - catch (vtkm::cont::ErrorBadValue&) - { - // field missing, return empty range. - return vtkm::cont::ArrayHandle(); - } - - VTKM_DEPRECATED_SUPPRESS_BEGIN - return field.GetRange(TypeList()); - VTKM_DEPRECATED_SUPPRESS_END -} - //@} //{@ @@ -80,48 +54,8 @@ vtkm::cont::ArrayHandle FieldRangeCompute( const vtkm::cont::PartitionedDataSet& pds, const std::string& name, vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any); - -template -VTKM_DEPRECATED(1.6, "FieldRangeCompute no longer supports TypeList.") -VTKM_CONT vtkm::cont::ArrayHandle FieldRangeCompute( - const vtkm::cont::PartitionedDataSet& pds, - const std::string& name, - vtkm::cont::Field::Association assoc, - TypeList) -{ - VTKM_IS_LIST(TypeList); - VTKM_STATIC_ASSERT_MSG((!std::is_same::value), - "Cannot use vtkm::ListUniversal with FieldRangeCompute."); - std::vector result_vector = std::accumulate( - pds.begin(), - pds.end(), - std::vector(), - [&](const std::vector& accumulated_value, const vtkm::cont::DataSet& dataset) { - VTKM_DEPRECATED_SUPPRESS_BEGIN - vtkm::cont::ArrayHandle partition_range = - vtkm::cont::FieldRangeCompute(dataset, name, assoc, TypeList()); - VTKM_DEPRECATED_SUPPRESS_END - - std::vector result = accumulated_value; - - // if the current partition has more components than we have seen so far, - // resize the result to fit all components. - result.resize( - std::max(result.size(), static_cast(partition_range.GetNumberOfValues()))); - - auto portal = partition_range.ReadPortal(); - std::transform(vtkm::cont::ArrayPortalToIteratorBegin(portal), - vtkm::cont::ArrayPortalToIteratorEnd(portal), - result.begin(), - result.begin(), - std::plus()); - return result; - }); - - return vtkm::cont::make_ArrayHandleMove(std::move(result_vector)); -} - //@} + } } // namespace vtkm::cont diff --git a/vtkm/cont/FieldRangeGlobalCompute.h b/vtkm/cont/FieldRangeGlobalCompute.h index b527e42f3..26d755ce8 100644 --- a/vtkm/cont/FieldRangeGlobalCompute.h +++ b/vtkm/cont/FieldRangeGlobalCompute.h @@ -42,22 +42,6 @@ vtkm::cont::ArrayHandle FieldRangeGlobalCompute( const vtkm::cont::DataSet& dataset, const std::string& name, vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any); - -template -VTKM_DEPRECATED(1.6, "FieldRangeGlobalCompute no longer supports TypeList.") -VTKM_CONT vtkm::cont::ArrayHandle FieldRangeGlobalCompute( - const vtkm::cont::DataSet& dataset, - const std::string& name, - vtkm::cont::Field::Association assoc, - TypeList) -{ - VTKM_IS_LIST(TypeList); - VTKM_DEPRECATED_SUPPRESS_BEGIN - auto lrange = vtkm::cont::FieldRangeCompute(dataset, name, assoc, TypeList()); - VTKM_DEPRECATED_SUPPRESS_END - return vtkm::cont::detail::MergeRangesGlobal(lrange); -} - //@} //{@ @@ -74,22 +58,8 @@ vtkm::cont::ArrayHandle FieldRangeGlobalCompute( const vtkm::cont::PartitionedDataSet& pds, const std::string& name, vtkm::cont::Field::Association assoc = vtkm::cont::Field::Association::Any); - -template -VTKM_DEPRECATED(1.6, "FieldRangeGlobalCompute no longer supports TypeList.") -VTKM_CONT vtkm::cont::ArrayHandle FieldRangeGlobalCompute( - const vtkm::cont::PartitionedDataSet& pds, - const std::string& name, - vtkm::cont::Field::Association assoc, - TypeList) -{ - VTKM_IS_LIST(TypeList); - VTKM_DEPRECATED_SUPPRESS_BEGIN - auto lrange = vtkm::cont::FieldRangeCompute(pds, name, assoc, TypeList()); - VTKM_DEPRECATED_SUPPRESS_END - return vtkm::cont::detail::MergeRangesGlobal(lrange); -} //@} + } } // namespace vtkm::cont diff --git a/vtkm/cont/Initialize.cxx b/vtkm/cont/Initialize.cxx index 8fbf43641..bee25c5ec 100644 --- a/vtkm/cont/Initialize.cxx +++ b/vtkm/cont/Initialize.cxx @@ -177,21 +177,6 @@ InitializeResult Initialize(int& argc, char* argv[], InitializeOptions opts) opt::VtkmArg::Required, loggingHelp.c_str() }); - // TODO: remove deprecated options on next vtk-m release - usage.push_back({ opt::OptionIndex::DEPRECATED_DEVICE, - 0, - "d", - "device", - VtkmDeviceArg::IsDevice, - " --device, -d \tDEPRECATED: use --vtkm-device to set the device" }); - usage.push_back({ opt::OptionIndex::DEPRECATED_LOGLEVEL, - 0, - "v", - "", - opt::VtkmArg::Required, - " -v <#|INFO|WARNING|ERROR|FATAL|OFF> \tDEPRECATED: use --vtkm-log-level to " - "set the log level" }); - // Bring in extra args used by the runtime device configuration options vtkm::cont::internal::RuntimeDeviceConfigurationOptions runtimeDeviceOptions(usage); @@ -240,32 +225,9 @@ InitializeResult Initialize(int& argc, char* argv[], InitializeOptions opts) vtkm::cont::DeviceAdapterTagAny{}, runtimeDeviceOptions, argc, argv); } - if (options[opt::OptionIndex::DEPRECATED_LOGLEVEL]) + if (options[opt::OptionIndex::DEVICE]) { - VTKM_LOG_S(vtkm::cont::LogLevel::Error, - "Supplied Deprecated log level flag: " - << std::string{ options[opt::OptionIndex::DEPRECATED_LOGLEVEL].name } << ", use " - << loggingFlag << " instead."); -#ifdef VTKM_ENABLE_LOGGING - vtkm::cont::SetStderrLogLevel(options[opt::OptionIndex::DEPRECATED_LOGLEVEL].arg); -#endif // VTKM_ENABLE_LOGGING - } - - if (options[opt::OptionIndex::DEVICE] || options[opt::OptionIndex::DEPRECATED_DEVICE]) - { - const char* arg = nullptr; - if (options[opt::OptionIndex::DEPRECATED_DEVICE]) - { - VTKM_LOG_S(vtkm::cont::LogLevel::Error, - "Supplied Deprecated device flag " - << std::string{ options[opt::OptionIndex::DEPRECATED_DEVICE].name } - << ", use --vtkm-device instead"); - arg = options[opt::OptionIndex::DEPRECATED_DEVICE].arg; - } - if (options[opt::OptionIndex::DEVICE]) - { - arg = options[opt::OptionIndex::DEVICE].arg; - } + const char* arg = options[opt::OptionIndex::DEVICE].arg; auto id = vtkm::cont::make_DeviceAdapterId(arg); if (id != vtkm::cont::DeviceAdapterTagAny{}) { diff --git a/vtkm/cont/Logging.cxx b/vtkm/cont/Logging.cxx index 02ada4e90..e4d8510ab 100644 --- a/vtkm/cont/Logging.cxx +++ b/vtkm/cont/Logging.cxx @@ -374,16 +374,6 @@ LogScope::~LogScope() = default; } // namespace detail -VTKM_CONT -void LogScope(LogLevel level, const char* file, unsigned line, const char* format...) -{ - // This does not scope right, but neither did the deprecated method this is replacing. - va_list args; - va_start(args, format); - detail::LogScope scopedVar{ level, file, line, format, args }; - va_end(args); -} - VTKM_CONT void LogCond(LogLevel level, bool cond, const char* file, unsigned line, const char* format...) { diff --git a/vtkm/cont/Logging.h b/vtkm/cont/Logging.h index 7ca807494..2f1f22746 100644 --- a/vtkm/cont/Logging.h +++ b/vtkm/cont/Logging.h @@ -13,7 +13,6 @@ #include #include -#include #include #include @@ -215,9 +214,6 @@ #define VTKM_LOG_SCOPE_FUNCTION(level) VTKM_LOG_SCOPE(level, __func__) #define VTKM_LOG_ALWAYS_S(level, ...) VTKM_LOG_S(level, __VA_ARGS__) -// VTKM_LOG_ERROR_CONTEXT is disabled as it is deprecated -#define VTKM_LOG_ERROR_CONTEXT(desc, data) - // Convenience macros: @@ -536,11 +532,6 @@ public: } // namespace detail -VTKM_DEPRECATED(1.9, "Use VTKM_LOG_SCOPE macro.") -VTKM_CONT_EXPORT -VTKM_CONT -void LogScope(LogLevel level, const char* file, unsigned line, const char* format...); - /** * \brief Conditionally logs a message with a stream-like interface. * diff --git a/vtkm/cont/PartitionedDataSet.h b/vtkm/cont/PartitionedDataSet.h index 145b4749d..4a5917933 100644 --- a/vtkm/cont/PartitionedDataSet.h +++ b/vtkm/cont/PartitionedDataSet.h @@ -47,12 +47,6 @@ public: VTKM_CONT PartitionedDataSet() = default; - VTKM_DEPRECATED(1.9, "Renamed to GetFieldFromPartition.") - VTKM_CONT vtkm::cont::Field GetField(const std::string& field_name, int partition_index) const - { - return this->GetFieldFromPartition(field_name, partition_index); - } - /// Get the field @a field_name from partition @a partition_index. VTKM_CONT vtkm::cont::Field GetFieldFromPartition(const std::string& field_name, int partition_index) const; diff --git a/vtkm/cont/PointLocatorUniformGrid.h b/vtkm/cont/PointLocatorUniformGrid.h deleted file mode 100644 index 4e8fe8dcf..000000000 --- a/vtkm/cont/PointLocatorUniformGrid.h +++ /dev/null @@ -1,30 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_PointLocatorUniformGrid_h -#define vtk_m_cont_PointLocatorUniformGrid_h - -#include - -#include - -namespace vtkm -{ -namespace cont -{ - -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Replaced with PointLocatorSparseGrid.") - PointLocatorUniformGrid : vtkm::cont::PointLocatorSparseGrid -{ -}; - -} -} - -#endif //vtk_m_cont_PointLocatorUniformGrid_h diff --git a/vtkm/cont/StorageImplicit.h b/vtkm/cont/StorageImplicit.h deleted file mode 100644 index cd5f4e5be..000000000 --- a/vtkm/cont/StorageImplicit.h +++ /dev/null @@ -1,29 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_StorageImplicit_h -#define vtk_m_cont_StorageImplicit_h - -#include -#include - -namespace vtkm -{ - -VTKM_DEPRECATED(1.6, "Use ArrayHandleImplicit.h instead of StorageImplicit.h.") -inline void StorageImplicit_h_deprecated() {} - -inline void ActivateStorageImplicit_h_deprecated_warning() -{ - StorageImplicit_h_deprecated(); -} - -} // namespace vtkm - -#endif //vtk_m_cont_StorageImplicit_h diff --git a/vtkm/cont/StorageListTag.h b/vtkm/cont/StorageListTag.h deleted file mode 100644 index c13cf912a..000000000 --- a/vtkm/cont/StorageListTag.h +++ /dev/null @@ -1,80 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_StorageListTag_h -#define vtk_m_cont_StorageListTag_h - -// Everything in this header file is deprecated and moved to StorageList.h. -#include - -struct VTKM_DEPRECATED( - 1.6, - "TypeListTag.h is deprecated. Include TypeList.h and use vtkm::TypeList* instead.") - VTKmTypeListTagHeaderDeprecationWarning -{ -}; - -inline VTKmTypeListTagHeaderDeprecationWarning IssueVTKmTypeListTagHeaderDeprecationWarning() -{ - return {}; -} - -#ifndef VTKM_DEFAULT_STORAGE_LIST_TAG -#define VTKM_DEFAULT_STORAGE_LIST_TAG ::vtkm::cont::detail::StorageListTagDefault -#endif - -VTKM_DEPRECATED_SUPPRESS_BEGIN -#include -VTKM_DEPRECATED_SUPPRESS_END - -#include - -namespace vtkm -{ -namespace cont -{ - -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.6, - "StorageListTagBasic replaced by StorageListBasic. " - "Note that the new StorageListBasic cannot be subclassed.") StorageListTagBasic - : vtkm::internal::ListAsListTag -{ - /// @cond NONE -}; -/// @endcond - -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.6, - "StorageListTagSupported replaced by StorageListBasic. " - "Note that the new StorageListSupported cannot be subclassed.") StorageListTagSupported - : vtkm::internal::ListAsListTag -{ - /// @cond NONE -}; -/// @endcond - -namespace detail -{ - -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.6, - "VTKM_DEFAULT_STORAGE_LIST_TAG replaced by VTKM_DEFAULT_STORAGE_LIST. " - "Note that the new VTKM_DEFAULT_STORAGE_LIST cannot be subclassed.") StorageListTagDefault - : vtkm::internal::ListAsListTag -{ - /// @cond NONE -}; -/// @endcond - -} // namespace detail -} -} // namespace vtkm::cont - -#endif //vtk_m_cont_StorageListTag_h diff --git a/vtkm/cont/UncertainCellSet.h b/vtkm/cont/UncertainCellSet.h index 3709e52fc..329e94863 100644 --- a/vtkm/cont/UncertainCellSet.h +++ b/vtkm/cont/UncertainCellSet.h @@ -201,142 +201,4 @@ public: /// @endcond SERIALIZATION -// Implement the deprecated functionality of DynamicCellSetBase, which was replaced -// by UnknownCellSet/UncertainCellSet. Everything below this line (up to the #endif -// for the include guard) can be deleted once the deprecated functionality is removed. - -namespace vtkm -{ -namespace cont -{ - -// This is a deprecated class. Don't warn about deprecation while implementing -// deprecated functionality. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -template -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.8, - "Use vtkm::cont::UncertainCellSet.") DynamicCellSetBase - : public vtkm::cont::UncertainCellSet -{ - using Superclass = vtkm::cont::UncertainCellSet; - -public: - using Superclass::Superclass; - - VTKM_CONT DynamicCellSetBase NewInstance() const - { - return DynamicCellSetBase(this->Superclass::NewInstance()); - } - - template - VTKM_CONT vtkm::cont::DynamicCellSetBase ResetCellSetList(NewCellSetList) const - { - return vtkm::cont::DynamicCellSetBase(*this); - } - template - VTKM_CONT vtkm::cont::DynamicCellSetBase ResetCellSetList() const - { - return vtkm::cont::DynamicCellSetBase(*this); - } -}; - -inline DynamicCellSet::operator vtkm::cont::DynamicCellSetBase() const -{ - return vtkm::cont::DynamicCellSetBase{ *this }; -} - -namespace internal -{ - -template -struct DynamicTransformTraits> -{ - using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall; -}; - -} // namespace internal - -} -} // namespace vtkm::cont - -//============================================================================= -// Specializations of serialization related classes -/// @cond SERIALIZATION -namespace mangled_diy_namespace -{ - -namespace internal -{ - -struct DynamicCellSetSerializeFunctor -{ - template - void operator()(const CellSetType& cs, BinaryBuffer& bb) const - { - vtkmdiy::save(bb, vtkm::cont::SerializableTypeString::Get()); - vtkmdiy::save(bb, cs); - } -}; - -template -struct DynamicCellSetDeserializeFunctor -{ - template - void operator()(CellSetType, - vtkm::cont::DynamicCellSetBase& dh, - const std::string& typeString, - bool& success, - BinaryBuffer& bb) const - { - if (!success && (typeString == vtkm::cont::SerializableTypeString::Get())) - { - CellSetType cs; - vtkmdiy::load(bb, cs); - dh = vtkm::cont::DynamicCellSetBase(cs); - success = true; - } - } -}; - -} // internal - -template -struct Serialization> -{ -private: - using Type = vtkm::cont::DynamicCellSetBase; - -public: - static VTKM_CONT void save(BinaryBuffer& bb, const Type& obj) - { - obj.CastAndCall(internal::DynamicCellSetSerializeFunctor{}, bb); - } - - static VTKM_CONT void load(BinaryBuffer& bb, Type& obj) - { - std::string typeString; - vtkmdiy::load(bb, typeString); - - bool success = false; - vtkm::ListForEach(internal::DynamicCellSetDeserializeFunctor{}, - CellSetTypes{}, - obj, - typeString, - success, - bb); - - if (!success) - { - throw vtkm::cont::ErrorBadType("Error deserializing DynamicCellSet. Message TypeString: " + - typeString); - } - } -}; - -} // diy -/// @endcond SERIALIZATION - -VTKM_DEPRECATED_SUPPRESS_END - #endif //vtk_m_cont_UncertainCellSet_h diff --git a/vtkm/cont/UnknownArrayHandle.h b/vtkm/cont/UnknownArrayHandle.h index 14197442f..3adf055e6 100644 --- a/vtkm/cont/UnknownArrayHandle.h +++ b/vtkm/cont/UnknownArrayHandle.h @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -550,15 +551,6 @@ public: NewValueTypeList = NewValueTypeList{}, NewStorageTypeList = NewStorageTypeList{}) const; - template - VTKM_DEPRECATED(1.6, "Specify both value types and storage types.") - VTKM_CONT - vtkm::cont::UncertainArrayHandle ResetTypes( - NewValueTypeList = NewValueTypeList{}) const - { - return this->ResetTypes(); - } - /// \brief Returns the number of values in the array. /// VTKM_CONT vtkm::Id GetNumberOfValues() const; @@ -659,32 +651,6 @@ public: VTKM_DEPRECATED_SUPPRESS_END #endif - // For code still expecting a VariantArrayHandle - template - VTKM_DEPRECATED(1.6, "Use AsArrayHandle.") - VTKM_CONT ArrayHandleType Cast() const - { - return this->AsArrayHandle(); - } - template - VTKM_DEPRECATED(1.6, "Use AsArrayHandle.") - VTKM_CONT void CopyTo(ArrayHandleType& array) const - { - this->AsArrayHandle(array); - } - template - VTKM_DEPRECATED(1.6, "Use AsArrayHandle.") - VTKM_CONT MultiplexerType AsMultiplexer() const - { - return this->AsArrayHandle(); - } - template - VTKM_DEPRECATED(1.6, "Use AsArrayHandle.") - VTKM_CONT void AsMultiplexer(MultiplexerType& result) const - { - result = this->AsArrayHandle(); - } - /// \brief Deep copies data from another `UnknownArrayHandle`. /// /// This method takes an `UnknownArrayHandle` and deep copies data from it. @@ -884,16 +850,6 @@ public: template VTKM_CONT void CastAndCallWithExtractedArray(Functor&& functor, Args&&... args) const; - template - VTKM_CONT VTKM_DEPRECATED(1.6, "Use CastAndCallForTypes.") void CastAndCall( - FunctorOrStorageList&& functorOrStorageList, - Args&&... args) const - { - this->CastAndCallImpl(vtkm::internal::IsList{}, - std::forward(functorOrStorageList), - std::forward(args)...); - } - /// Releases any resources being used in the execution environment (that are /// not being shared by the control environment). /// @@ -904,20 +860,6 @@ public: VTKM_CONT void ReleaseResources() const; VTKM_CONT void PrintSummary(std::ostream& out, bool full = false) const; - -private: - // Remove this when deprecated CastAndCall is removed. - template - VTKM_CONT void CastAndCallImpl(std::false_type, Args&&... args) const - { - this->CastAndCallForTypes( - std::forward(args)...); - } - template - VTKM_CONT void CastAndCallImpl(std::true_type, StorageList, Args&&... args) const - { - this->CastAndCallForTypes(std::forward(args)...); - } }; //============================================================================= diff --git a/vtkm/cont/UnknownCellSet.h b/vtkm/cont/UnknownCellSet.h index 1a15e7749..b3f486dd6 100644 --- a/vtkm/cont/UnknownCellSet.h +++ b/vtkm/cont/UnknownCellSet.h @@ -14,8 +14,6 @@ #include #include -#include - #include #include @@ -223,47 +221,6 @@ public: /// template VTKM_CONT void CastAndCallForTypes(Functor&& functor, Args&&... args) const; - - // Support for deprecated DynamicCellSet features - - template - VTKM_DEPRECATED(1.8, "Use CanConvert() (or IsType).") - VTKM_CONT bool IsSameType(const CellSetType&) const - { - return this->IsType(); - } - - template - VTKM_DEPRECATED(1.8, "Use AsCellSet().") - VTKM_CONT CellSetType& Cast() const - { - VTKM_IS_CELL_SET(CellSetType); - CellSetType* cellSetPointer = dynamic_cast(this->Container.get()); - if (cellSetPointer == nullptr) - { - VTKM_LOG_CAST_FAIL(*this, CellSetType); - throwFailedDynamicCast(this->GetCellSetName(), vtkm::cont::TypeToString()); - } - VTKM_LOG_CAST_SUCC(*this, *cellSetPointer); - return *cellSetPointer; - } - - template - VTKM_DEPRECATED(1.8, "Use AsCellSet(cellSet).") - VTKM_CONT void CopyTo(CellSetType& cellSet) const - { - return this->AsCellSet(cellSet); - } - - template - VTKM_DEPRECATED(1.8, - "Use the vtkm::cont::CastAndCall free function4 or use CastAndCallForTypes or " - "use ResetCellList and then CastAndCall.") - VTKM_CONT void CastAndCall(Functor&& f, Args&&... args) const - { - this->CastAndCallForTypes(std::forward(f), - std::forward(args)...); - } }; //============================================================================= @@ -285,7 +242,7 @@ VTKM_CONT inline bool IsType(const vtkm::cont::UnknownCellSet& unknownCellSet) template VTKM_CONT inline CellSetType Cast(const vtkm::cont::UnknownCellSet& unknownCellSet) { - return unknownCellSet.Cast(); + return unknownCellSet.AsCellSet(); } namespace internal @@ -394,121 +351,6 @@ public: /// @endcond SERIALIZATION -// Implement the deprecated functionality of DynamicCellSet, which was replaced -// by UnknownCellSet/UncertainCellSet. Everything below this line (up to the #endif -// for the include guard) can be deleted once the deprecated functionality is removed. - -// Headers originally included from DynamicCellSet.h but not UnknownCellSet.h -#include -#include -#include - -namespace vtkm -{ -namespace cont -{ - -// This is a deprecated class. Don't warn about deprecation while implementing -// deprecated functionality. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -// Forward declaration -template -class DynamicCellSetBase; - -/// \brief Holds a cell set without having to specify concrete type. -/// -/// \c DynamicCellSet holds a \c CellSet object using runtime polymorphism to -/// manage different subclass types and template parameters of the subclasses -/// rather than compile-time templates. This adds a programming convenience -/// that helps avoid a proliferation of templates. It also provides the -/// management necessary to interface VTK-m with data sources where types will -/// not be known until runtime. -/// -/// To interface between the runtime polymorphism and the templated algorithms -/// in VTK-m, \c DynamicCellSet contains a method named \c CastAndCall that -/// will determine the correct type from some known list of cell set types. -/// This mechanism is used internally by VTK-m's worklet invocation mechanism -/// to determine the type when running algorithms. -/// -/// By default, \c DynamicCellSet will assume that the value type in the array -/// matches one of the types specified by \c VTKM_DEFAULT_CELL_SET_LIST. -/// This list can be changed by using the \c ResetCellSetList method. It is -/// worthwhile to match these lists closely to the possible types that might be -/// used. If a type is missing you will get a runtime error. If there are more -/// types than necessary, then the template mechanism will create a lot of -/// object code that is never used, and keep in mind that the number of -/// combinations grows exponentially when using multiple \c Dynamic* objects. -/// -/// The actual implementation of \c DynamicCellSet is in a templated class -/// named \c DynamicCellSetBase, which is templated on the list of cell set -/// types. \c DynamicCellSet is really just a typedef of \c DynamicCellSetBase -/// with the default cell set list. -/// -struct VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.8, "Use vtkm::cont::UnknownCellSet.") DynamicCellSet - : public vtkm::cont::UnknownCellSet -{ - using UnknownCellSet::UnknownCellSet; - - DynamicCellSet() = default; - - DynamicCellSet(const vtkm::cont::UnknownCellSet& src) - : UnknownCellSet(src) - { - } - - operator vtkm::cont::DynamicCellSetBase() const; - - VTKM_CONT vtkm::cont::DynamicCellSet NewInstance() const - { - return vtkm::cont::DynamicCellSet(this->UnknownCellSet::NewInstance()); - } - - template - VTKM_CONT vtkm::cont::DynamicCellSetBase ResetCellSetList(NewCellSetList) const - { - return vtkm::cont::DynamicCellSetBase(*this); - } - template - VTKM_CONT vtkm::cont::DynamicCellSetBase ResetCellSetList() const - { - return vtkm::cont::DynamicCellSetBase(*this); - } -}; - -namespace internal -{ - -template <> -struct DynamicTransformTraits -{ - using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall; -}; - -/// Checks to see if the given object is a dynamic cell set. It contains a -/// typedef named \c type that is either std::true_type or std::false_type. -/// Both of these have a typedef named value with the respective boolean value. -/// -template -struct DynamicCellSetCheck -{ - using type = vtkm::cont::internal::UnknownCellSetCheck; -}; - -#define VTKM_IS_DYNAMIC_CELL_SET(T) \ - VTKM_STATIC_ASSERT(::vtkm::cont::internal::DynamicCellSetCheck::type::value) - -#define VTKM_IS_DYNAMIC_OR_STATIC_CELL_SET(T) \ - VTKM_STATIC_ASSERT(::vtkm::cont::internal::CellSetCheck::type::value || \ - ::vtkm::cont::internal::DynamicCellSetCheck::type::value) - -} // namespace internal - -} -} // namespace vtkm::cont - -VTKM_DEPRECATED_SUPPRESS_END - // Include the implementation of UncertainCellSet. This should be included because there // are methods in UnknownCellSet that produce objects of this type. It has to be included // at the end to resolve the circular dependency. diff --git a/vtkm/cont/VariantArrayHandle.h b/vtkm/cont/VariantArrayHandle.h deleted file mode 100644 index 001a76720..000000000 --- a/vtkm/cont/VariantArrayHandle.h +++ /dev/null @@ -1,382 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_VariantArrayHandle_h -#define vtk_m_cont_VariantArrayHandle_h - -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace vtkm -{ -namespace cont -{ - -struct VTKM_DEPRECATED(1.8, "Use UnknownCellSet.h or UncertainCellSet.h.") - VariantArrayHandle_h_header_is_deprecated -{ - int x; -}; - -inline void EmitVariantArrayHandleHDeprecationWarning() -{ - static VariantArrayHandle_h_header_is_deprecated x; - ++x.x; -} - -// This is a deprecated class. Don't warn about deprecation while implementing -// deprecated functionality. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -/// \brief VariantArrayHandle superclass holding common operations. -/// -/// `VariantArrayHandleCommon` is a superclass to all `VariantArrayHandleBase` -/// and `VariantArrayHandle` classes. It contains all operations that are -/// independent of the type lists defined for these templated class or has -/// versions of methods that allow you to specify type lists. -/// -/// See the documentation of `VariantArrayHandleBase` for more information. -/// -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.7, - "VariantArrayHandle classes replaced with UnknownArrayHandle and UncertainArrayHandle.") - VariantArrayHandleCommon : public vtkm::cont::UnknownArrayHandle -{ - using Superclass = vtkm::cont::UnknownArrayHandle; - -public: - using Superclass::Superclass; - - VTKM_CONT VariantArrayHandleCommon() = default; - - VTKM_CONT VariantArrayHandleCommon(const vtkm::cont::UnknownArrayHandle& array) - : Superclass(array) - { - } - - /// Returns this array cast to the given \c ArrayHandle type. Throws \c - /// ErrorBadType if the cast does not work. Use \c IsType - /// to check if the cast can happen. - /// - template - VTKM_CONT ArrayHandleType Cast() const - { - return this->AsArrayHandle(); - } - - /// \brief Call a functor using the underlying array type. - /// - /// `CastAndCall` attempts to cast the held array to a specific value type, - /// and then calls the given functor with the cast array. You must specify - /// the `TypeList` and `StorageList` as template arguments. (Note that this - /// calling differs from that of the `CastAndCall` methods of subclasses.) - /// - template - VTKM_CONT void CastAndCall(Functor&& functor, Args&&... args) const - { - this->CastAndCallForTypes(std::forward(functor), - std::forward(args)...); - } - - /// Returns this array cast to a `ArrayHandleMultiplexer` of the given type. - /// This will attempt to cast the internal array to each supported type of - /// the multiplexer. If none are supported, an invalid ArrayHandleMultiplexer - /// is returned. - /// - /// As a special case, if one of the arrays in the `ArrayHandleMultiplexer`'s - /// type list is an `ArrayHandleCast`, then the multiplexer will look for type - /// type of array being cast rather than an actual cast array. - /// - ///@{ - template - VTKM_CONT void AsMultiplexer(vtkm::cont::ArrayHandleMultiplexer& result) const - { - this->AsArrayHandle(result); - } - - template - VTKM_CONT ArrayHandleMultiplexerType AsMultiplexer() const - { - ArrayHandleMultiplexerType result; - this->AsMultiplexer(result); - return result; - } - ///@} - - /// Given a references to an ArrayHandle object, casts this array to the - /// ArrayHandle's type and sets the given ArrayHandle to this array. Throws - /// `ErrorBadType` if the cast does not work. Use `IsType` to check - /// if the cast can happen. - /// - /// Note that this is a shallow copy. The data are not copied and a change - /// in the data in one array will be reflected in the other. - /// - template - VTKM_CONT void CopyTo(ArrayHandleType& array) const - { - VTKM_IS_ARRAY_HANDLE(ArrayHandleType); - array = this->Cast(); - } - - /// \brief Create a new array of the same type as this array. - /// - /// This method creates a new array that is the same type as this one and - /// returns a new variant array handle for it. This method is convenient when - /// creating output arrays that should be the same type as some input array. - /// - VTKM_CONT VariantArrayHandleCommon NewInstance() const - { - return VariantArrayHandleCommon(this->Superclass::NewInstance()); - } -}; - -/// \brief Holds an array handle without having to specify template parameters. -/// -/// `VariantArrayHandle` holds an `ArrayHandle` -/// object using runtime polymorphism to manage different value types and -/// storage rather than compile-time templates. This adds a programming -/// convenience that helps avoid a proliferation of templates. It also provides -/// the management necessary to interface VTK-m with data sources where types -/// will not be known until runtime. -/// -/// To interface between the runtime polymorphism and the templated algorithms -/// in VTK-m, `VariantArrayHandle` contains a method named `CastAndCall` that -/// will determine the correct type from some known list of types. -/// This mechanism is used internally by VTK-m's worklet invocation -/// mechanism to determine the type when running algorithms. -/// -/// By default, `VariantArrayHandle` will assume that the value type in the -/// array matches one of the types specified by `VTKM_DEFAULT_TYPE_LIST` -/// This list can be changed by using the `ResetTypes`. It is -/// worthwhile to match these lists closely to the possible types that might be -/// used. If a type is missing you will get a runtime error. If there are more -/// types than necessary, then the template mechanism will create a lot of -/// object code that is never used, and keep in mind that the number of -/// combinations grows exponentially when using multiple `VariantArrayHandle` -/// objects. -/// -/// The actual implementation of `VariantArrayHandle` is in a templated class -/// named `VariantArrayHandleBase`, which is templated on the list of -/// component types. -/// -template -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED( - 1.7, - "VariantArrayHandle classes replaced with UnknownArrayHandle and UncertainArrayHandle.") - VariantArrayHandleBase : public VariantArrayHandleCommon -{ - VTKM_STATIC_ASSERT_MSG((!std::is_same::value), - "Cannot use vtkm::ListUniversal with VariantArrayHandle."); - - using Superclass = VariantArrayHandleCommon; - -public: - VTKM_CONT - VariantArrayHandleBase() = default; - - template - VTKM_CONT VariantArrayHandleBase(const vtkm::cont::ArrayHandle& array) - : Superclass(array) - { - } - - VTKM_CONT explicit VariantArrayHandleBase(const VariantArrayHandleCommon& src) - : Superclass(src) - { - } - - VTKM_CONT VariantArrayHandleBase(const vtkm::cont::UnknownArrayHandle& src) - : Superclass(src) - { - } - - VTKM_CONT VariantArrayHandleBase(const VariantArrayHandleBase&) = default; - VTKM_CONT VariantArrayHandleBase(VariantArrayHandleBase&&) noexcept = default; - - VTKM_CONT - ~VariantArrayHandleBase() {} - - VTKM_CONT - VariantArrayHandleBase& operator=(const VariantArrayHandleBase&) = default; - - VTKM_CONT - VariantArrayHandleBase& operator=(VariantArrayHandleBase&&) noexcept = - default; - - VTKM_CONT operator vtkm::cont::UncertainArrayHandle() const - { - return vtkm::cont::UncertainArrayHandle(*this); - } - - - /// Changes the types to try casting to when resolving this variant array, - /// which is specified with a list tag like those in TypeList.h. Since C++ - /// does not allow you to actually change the template arguments, this method - /// returns a new variant array object. This method is particularly useful to - /// narrow down (or expand) the types when using an array of particular - /// constraints. - /// - template - VTKM_CONT VariantArrayHandleBase ResetTypes(NewTypeList = NewTypeList()) const - { - VTKM_IS_LIST(NewTypeList); - return VariantArrayHandleBase(*this); - } - - ///@{ - /// \brief Call a functor using the underlying array type. - /// - /// `CastAndCall` attempts to cast the held array to a specific value type, - /// then call the given functor with the cast array. The types - /// tried in the cast are those in the lists defined by the TypeList. - /// By default `VariantArrayHandle` set this to `VTKM_DEFAULT_TYPE_LIST`. - /// - /// In addition to the value type, an `ArrayHandle` also requires a storage tag. - /// By default, `CastAndCall` attempts to cast the array using the storage tags - /// listed in `VTKM_DEFAULT_STORAGE_LIST`. You can optionally give a custom - /// list of storage tags as the second argument. - /// - /// As previous stated, if a storage tag list is provided, it is given in the - /// first argument. The functor to call with the cast array is given as the next - /// argument (or the first argument if a storage tag list is not provided). - /// The remaning arguments, if any, are passed to the functor. - /// - /// The functor will be called with the cast array as its first argument. Any - /// remaining arguments are passed from the arguments to `CastAndCall`. - /// - template - VTKM_CONT void CastAndCall(FunctorOrStorageList&& functorOrStorageList, Args&&... args) const - { - this->CastAndCallImpl(vtkm::internal::IsList(), - std::forward(functorOrStorageList), - std::forward(args)...); - } - - template - VTKM_CONT void CastAndCall(Functor&& f) const - { - this->CastAndCallImpl(std::false_type(), std::forward(f)); - } - ///@} - - /// \brief Create a new array of the same type as this array. - /// - /// This method creates a new array that is the same type as this one and - /// returns a new variant array handle for it. This method is convenient when - /// creating output arrays that should be the same type as some input array. - /// - VTKM_CONT VariantArrayHandleBase NewInstance() const - { - return VariantArrayHandleBase(this->Superclass::NewInstance()); - } - -private: - template - VTKM_CONT void CastAndCallImpl(std::false_type, Functor&& f, Args&&... args) const - { - this->Superclass::CastAndCall(std::forward(f), - std::forward(args)...); - } - - template - VTKM_CONT void CastAndCallImpl(std::true_type, StorageList, Functor&& f, Args&&... args) const - { - this->Superclass::CastAndCall(std::forward(f), - std::forward(args)...); - } -}; - -using VariantArrayHandle VTKM_DEPRECATED( - 1.7, - "VariantArrayHandle classes replaced with UnknownArrayHandle and UncertainArrayHandle.") = - vtkm::cont::VariantArrayHandleBase; - - -//============================================================================= -// Free function casting helpers - -/// Returns true if \c variant matches the type of ArrayHandleType. -/// -template -VTKM_CONT inline bool IsType(const vtkm::cont::VariantArrayHandleBase& variant) -{ - return variant.template IsType(); -} - -/// Returns \c variant cast to the given \c ArrayHandle type. Throws \c -/// ErrorBadType if the cast does not work. Use \c IsType -/// to check if the cast can happen. -/// -template -VTKM_CONT inline ArrayHandleType Cast(const vtkm::cont::VariantArrayHandleBase& variant) -{ - return variant.template Cast(); -} - -namespace internal -{ - -template -struct DynamicTransformTraits> -{ - using DynamicTag = vtkm::cont::internal::DynamicTransformTagCastAndCall; -}; - -} // namespace internal -} // namespace cont -} // namespace vtkm - -//============================================================================= -// Specializations of serialization related classes -/// @cond SERIALIZATION -namespace mangled_diy_namespace -{ - -template -struct Serialization> -{ -private: - using Type = vtkm::cont::VariantArrayHandleBase; - using ImplObject = vtkm::cont::UncertainArrayHandle; - -public: - static VTKM_CONT void save(BinaryBuffer& bb, const Type& obj) - { - vtkmdiy::save(bb, ImplObject(obj)); - } - - static VTKM_CONT void load(BinaryBuffer& bb, Type& obj) - { - ImplObject implObj; - vtkmdiy::load(bb, implObj); - obj = implObj; - } -}; - -} // diy -/// @endcond SERIALIZATION - -VTKM_DEPRECATED_SUPPRESS_END - - -#endif //vtk_m_virts_VariantArrayHandle_h diff --git a/vtkm/cont/arg/TransportTagArrayIn.h b/vtkm/cont/arg/TransportTagArrayIn.h index f3d6e3c40..bebeb9e02 100644 --- a/vtkm/cont/arg/TransportTagArrayIn.h +++ b/vtkm/cont/arg/TransportTagArrayIn.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagArrayIn_h #define vtk_m_cont_arg_TransportTagArrayIn_h +#include #include #include diff --git a/vtkm/cont/arg/TransportTagArrayInOut.h b/vtkm/cont/arg/TransportTagArrayInOut.h index 86c53a61b..d34d194ba 100644 --- a/vtkm/cont/arg/TransportTagArrayInOut.h +++ b/vtkm/cont/arg/TransportTagArrayInOut.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagArrayInOut_h #define vtk_m_cont_arg_TransportTagArrayInOut_h +#include #include #include diff --git a/vtkm/cont/arg/TransportTagArrayOut.h b/vtkm/cont/arg/TransportTagArrayOut.h index d23426cd9..b3eb63116 100644 --- a/vtkm/cont/arg/TransportTagArrayOut.h +++ b/vtkm/cont/arg/TransportTagArrayOut.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagArrayOut_h #define vtk_m_cont_arg_TransportTagArrayOut_h +#include #include #include diff --git a/vtkm/cont/arg/TransportTagWholeArrayIn.h b/vtkm/cont/arg/TransportTagWholeArrayIn.h index 1a9e75333..0d44d89fa 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayIn.h +++ b/vtkm/cont/arg/TransportTagWholeArrayIn.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagWholeArrayIn_h #define vtk_m_cont_arg_TransportTagWholeArrayIn_h +#include #include #include diff --git a/vtkm/cont/arg/TransportTagWholeArrayInOut.h b/vtkm/cont/arg/TransportTagWholeArrayInOut.h index 5115a4265..764b08590 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayInOut.h +++ b/vtkm/cont/arg/TransportTagWholeArrayInOut.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagWholeArrayInOut_h #define vtk_m_cont_arg_TransportTagWholeArrayInOut_h +#include #include #include diff --git a/vtkm/cont/arg/TransportTagWholeArrayOut.h b/vtkm/cont/arg/TransportTagWholeArrayOut.h index 349c31058..e2e6c288e 100644 --- a/vtkm/cont/arg/TransportTagWholeArrayOut.h +++ b/vtkm/cont/arg/TransportTagWholeArrayOut.h @@ -10,6 +10,7 @@ #ifndef vtk_m_cont_arg_TransportTagWholeArrayOut_h #define vtk_m_cont_arg_TransportTagWholeArrayOut_h +#include #include #include diff --git a/vtkm/cont/cuda/ChooseCudaDevice.h b/vtkm/cont/cuda/ChooseCudaDevice.h index 2928fe7a9..738bbcb03 100644 --- a/vtkm/cont/cuda/ChooseCudaDevice.h +++ b/vtkm/cont/cuda/ChooseCudaDevice.h @@ -126,22 +126,6 @@ static void SetFastestDeviceId() .SetDeviceInstance(deviceId); } -//choose a cuda compute device. This can't be used if you are setting -//up open gl interop -VTKM_DEPRECATED(1.7, - "Use " - "RuntimeInformation{}.GetRuntimeConfiguration(vtkm::cont::DeviceAdapterTagCuda)." - "SetDeviceInstance(id) instead") -static void SetCudaDevice(int id) -{ - cudaError_t cError = cudaSetDevice(id); - if (cError != cudaSuccess) - { - std::string cuda_error_msg("Unable to bind to the given cuda device. Error: "); - cuda_error_msg.append(cudaGetErrorString(cError)); - throw vtkm::cont::ErrorExecution(cuda_error_msg); - } -} } } } //namespace diff --git a/vtkm/cont/cuda/testing/UnitTestCudaMathEdgeCases.cu b/vtkm/cont/cuda/testing/UnitTestCudaMathEdgeCases.cu index a78e28c95..114778e52 100644 --- a/vtkm/cont/cuda/testing/UnitTestCudaMathEdgeCases.cu +++ b/vtkm/cont/cuda/testing/UnitTestCudaMathEdgeCases.cu @@ -139,8 +139,8 @@ void RunEdgeCases() sanevalues.push_back(range(rng)); } - auto bad = vtkm::cont::make_ArrayHandle(badvalues); - auto sane = vtkm::cont::make_ArrayHandle(sanevalues); + auto bad = vtkm::cont::make_ArrayHandle(badvalues, vtkm::CopyFlag::On); + auto sane = vtkm::cont::make_ArrayHandle(sanevalues, vtkm::CopyFlag::On); decltype(sane) result; vtkm::worklet::DispatcherMapField dispatcher; dispatcher.SetDevice(Device()); diff --git a/vtkm/cont/internal/ArrayHandleDeprecated.h b/vtkm/cont/internal/ArrayHandleDeprecated.h deleted file mode 100644 index b321addfa..000000000 --- a/vtkm/cont/internal/ArrayHandleDeprecated.h +++ /dev/null @@ -1,1438 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_internal_ArrayHandleDeprecated_h -#define vtk_m_cont_internal_ArrayHandleDeprecated_h - -#include - -#include -#include - -namespace vtkm -{ -namespace cont -{ -namespace internal -{ - -/// The `ArrayHandle` implementation was recently significantly changed. -/// Implementations still using the old style should use this version. -/// These implementations should be deprecated. -/// -template -class VTKM_ALWAYS_EXPORT ArrayHandleDeprecated : public internal::ArrayHandleBase -{ -private: - // Basic storage is specialized; this template should not be instantiated - // for it. Specialization is in ArrayHandleBasicImpl.h - static_assert(!std::is_same::value, - "StorageTagBasic should not use this implementation."); - - using ExecutionManagerType = - vtkm::cont::internal::ArrayHandleExecutionManagerBase; - - using MutexType = std::mutex; - using LockType = std::unique_lock; - - mutable vtkm::cont::internal::Buffer BufferAsStorageWrapper; - - struct PrepareForInputFunctor; - struct PrepareForOutputFunctor; - struct PrepareForInPlaceFunctor; - -public: - using StorageType = vtkm::cont::internal::Storage; - using ValueType = T; - using StorageTag = StorageTag_; - using WritePortalType = typename StorageType::PortalType; - using ReadPortalType = typename StorageType::PortalConstType; - template - struct ExecutionTypes - { - using Portal = typename ExecutionManagerType::template ExecutionTypes::Portal; - using PortalConst = - typename ExecutionManagerType::template ExecutionTypes::PortalConst; - }; - - using PortalControl VTKM_DEPRECATED(1.6, "Use ArrayHandle::WritePortalType instead.") = - typename StorageType::PortalType; - using PortalConstControl VTKM_DEPRECATED(1.6, "Use ArrayHandle::ReadPortalType instead.") = - typename StorageType::PortalConstType; - - // Handle the fact that the ArrayHandle design has changed. - VTKM_STATIC_ASSERT_MSG((std::is_same::value), - "ArrayHandle design has changed. To support old-style arrays, have the " - "Storage implementation declare VTKM_STORAGE_OLD_STYLE at the bottom " - "of its implementation."); - VTKM_CONT static constexpr vtkm::IdComponent GetNumberOfBuffers() { return 1; } - VTKM_CONT std::vector GetBuffers() const - { - this->BufferAsStorageWrapper.SetMetaData(*this); - return std::vector(1, this->BufferAsStorageWrapper); - } - - VTKM_CONT ArrayHandleDeprecated(const vtkm::cont::internal::Buffer* buffers) - { - VTKM_ASSERT(buffers[0].MetaDataIsType()); - *this = buffers[0].GetMetaData(); - } - - /// Constructs an empty ArrayHandleDeprecated. Typically used for output or - /// intermediate arrays that will be filled by a VTKm algorithm. - /// - VTKM_CONT ArrayHandleDeprecated(); - - /// Copy constructor. - /// - /// Implemented so that it is defined exclusively in the control environment. - /// If there is a separate device for the execution environment (for example, - /// with CUDA), then the automatically generated copy constructor could be - /// created for all devices, and it would not be valid for all devices. - /// - ArrayHandleDeprecated(const ArrayHandleDeprecated& src); - - /// Move constructor. - /// - /// Implemented so that it is defined exclusively in the control environment. - /// If there is a separate device for the execution environment (for example, - /// with CUDA), then the automatically generated move constructor could be - /// created for all devices, and it would not be valid for all devices. - /// - ArrayHandleDeprecated(ArrayHandleDeprecated&& src) noexcept; - - /// Special constructor for subclass specializations that need to set the - /// initial state of the control array. When this constructor is used, it - /// is assumed that the control array is valid. - /// - ArrayHandleDeprecated(const StorageType& storage); - - - /// Special constructor for subclass specializations that need to set the - /// initial state of the control array. When this constructor is used, it - /// is assumed that the control array is valid. - /// - ArrayHandleDeprecated(StorageType&& storage) noexcept; - - /// Destructs an empty ArrayHandleDeprecated. - /// - /// Implemented so that it is defined exclusively in the control environment. - /// If there is a separate device for the execution environment (for example, - /// with CUDA), then the automatically generated destructor could be - /// created for all devices, and it would not be valid for all devices. - /// - ~ArrayHandleDeprecated(); - - /// \brief Copies an ArrayHandleDeprecated - /// - VTKM_CONT - ArrayHandleDeprecated& operator=( - const ArrayHandleDeprecated& src); - - /// \brief Move and Assignment of an ArrayHandleDeprecated - /// - VTKM_CONT - ArrayHandleDeprecated& operator=( - ArrayHandleDeprecated&& src) noexcept; - - /// Like a pointer, two \c ArrayHandles are considered equal if they point - /// to the same location in memory. - /// - VTKM_CONT - bool operator==(const ArrayHandleDeprecated& rhs) const - { - return (this->Internals == rhs.Internals); - } - - VTKM_CONT - bool operator!=(const ArrayHandleDeprecated& rhs) const - { - return (this->Internals != rhs.Internals); - } - - VTKM_CONT bool operator==(const vtkm::cont::ArrayHandle& rhs) const - { - return *this == static_cast>(rhs); - } - - VTKM_CONT bool operator!=(const vtkm::cont::ArrayHandle& rhs) const - { - return *this != static_cast>(rhs); - } - - template - VTKM_CONT bool operator==(const ArrayHandleDeprecated&) const - { - return false; // different valuetype and/or storage - } - - template - VTKM_CONT bool operator!=(const ArrayHandleDeprecated&) const - { - return true; // different valuetype and/or storage - } - - template - VTKM_CONT bool operator==(const vtkm::cont::ArrayHandle&) const - { - return false; // different storage - } - - template - VTKM_CONT bool operator!=(const vtkm::cont::ArrayHandle&) const - { - return false; // different storage - } - - /// Get the storage. - /// - VTKM_CONT StorageType& GetStorage(); - - /// Get the storage. - /// - VTKM_CONT const StorageType& GetStorage() const; - - /// Get the array portal of the control array. - /// Since worklet invocations are asynchronous and this routine is a synchronization point, - /// exceptions maybe thrown for errors from previously executed worklets. - /// - /// \deprecated Use `WritePortal` instead. Note that the portal returned from `WritePortal` - /// will disallow any other reads or writes to the array while it is in scope. - /// - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use ArrayHandle::WritePortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - - /// \cond NOPE - typename StorageType::PortalType GetPortalControl(); - /// \endcond - - /// Get the array portal of the control array. - /// Since worklet invocations are asynchronous and this routine is a synchronization point, - /// exceptions maybe thrown for errors from previously executed worklets. - /// - /// \deprecated Use `ReadPortal` instead. Note that the portal returned from `ReadPortal` - /// will disallow any writes to the array while it is in scope. - /// - VTKM_CONT - VTKM_DEPRECATED(1.6, - "Use ArrayHandle::ReadPortal() instead. " - "Note that the returned portal will lock the array while it is in scope.") - /// \cond NOPE - typename StorageType::PortalConstType GetPortalConstControl() const; - /// \endcond - - /// \@{ - /// \brief Get an array portal that can be used in the control environment. - /// - /// The returned array can be used in the control environment to read values from the array. (It - /// is not possible to write to the returned portal. That is `Get` will work on the portal, but - /// `Set` will not.) - /// - /// **Note:** The returned portal cannot be used in the execution environment. This is because - /// the portal will not work on some devices like GPUs. To get a portal that will work in the - /// execution environment, use `PrepareForInput`. - /// - VTKM_CONT ReadPortalType ReadPortal() const; - /// \@} - - /// \@{ - /// \brief Get an array portal that can be used in the control environment. - /// - /// The returned array can be used in the control environment to reand and write values to the - /// array. - /// - /// - /// **Note:** The returned portal cannot be used in the execution environment. This is because - /// the portal will not work on some devices like GPUs. To get a portal that will work in the - /// execution environment, use `PrepareForInput`. - /// - VTKM_CONT WritePortalType WritePortal() const; - /// \@} - - /// Returns the number of entries in the array. - /// - VTKM_CONT vtkm::Id GetNumberOfValues() const - { - LockType lock = this->GetLock(); - - return this->GetNumberOfValues(lock); - } - - /// \brief Allocates an array large enough to hold the given number of values. - /// - /// The allocation may be done on an already existing array, but can wipe out - /// any data already in the array. This method can throw - /// ErrorBadAllocation if the array cannot be allocated or - /// ErrorBadValue if the allocation is not feasible (for example, the - /// array storage is read-only). - /// - VTKM_CONT - void Allocate(vtkm::Id numberOfValues) - { - vtkm::cont::Token token; - this->Allocate(numberOfValues, token); - } - VTKM_CONT void Allocate(vtkm::Id numberOfValues, vtkm::cont::Token& token) - { - LockType lock = this->GetLock(); - this->WaitToWrite(lock, token); - this->ReleaseResourcesExecutionInternal(lock, token); - this->Internals->GetControlArray(lock)->Allocate(numberOfValues); - // Set to false and then to true to ensure anything pointing to an array before the allocate - // is invalidated. - this->Internals->SetControlArrayValid(lock, false); - this->Internals->SetControlArrayValid(lock, true); - } - - /// \brief Reduces the size of the array without changing its values. - /// - /// This method allows you to resize the array without reallocating it. The - /// number of entries in the array is changed to \c numberOfValues. The data - /// in the array (from indices 0 to \c numberOfValues - 1) are the same, but - /// \c numberOfValues must be equal or less than the preexisting size - /// (returned from GetNumberOfValues). That is, this method can only be used - /// to shorten the array, not lengthen. - VTKM_CONT void Shrink(vtkm::Id numberOfValues) - { - vtkm::cont::Token token; - this->Shrink(numberOfValues, token); - } - VTKM_CONT void Shrink(vtkm::Id numberOfValues, vtkm::cont::Token& token); - - /// Releases any resources being used in the execution environment (that are - /// not being shared by the control environment). - /// - VTKM_CONT void ReleaseResourcesExecution() - { - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - this->WaitToWrite(lock, token); - - // Save any data in the execution environment by making sure it is synced - // with the control environment. - this->SyncControlArray(lock, token); - - this->ReleaseResourcesExecutionInternal(lock, token); - } - } - - /// Releases all resources in both the control and execution environments. - /// - VTKM_CONT void ReleaseResources() - { - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - - this->ReleaseResourcesExecutionInternal(lock, token); - - if (this->Internals->IsControlArrayValid(lock)) - { - this->Internals->GetControlArray(lock)->ReleaseResources(); - this->Internals->SetControlArrayValid(lock, false); - } - } - } - - /// Prepares this array to be used as an input to an operation in the - /// execution environment. If necessary, copies data to the execution - /// environment. Can throw an exception if this array does not yet contain - /// any data. Returns a portal that can be used in code running in the - /// execution environment. - /// - /// The `Token` object provided will be attached to this `ArrayHandle`. - /// The returned portal is guaranteed to be valid while the `Token` is - /// still attached and in scope. Other operations on this `ArrayHandle` - /// that would invalidate the returned portal will block until the `Token` - /// is released. Likewise, this method will block if another `Token` is - /// already attached. This can potentially lead to deadlocks. - /// - template - VTKM_CONT ReadPortalType PrepareForInput(DeviceAdapterTag, vtkm::cont::Token& token) const; - VTKM_CONT ReadPortalType PrepareForInput(vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) const; - - /// Prepares (allocates) this array to be used as an output from an operation - /// in the execution environment. The internal state of this class is set to - /// have valid data in the execution array with the assumption that the array - /// will be filled soon (i.e. before any other methods of this object are - /// called). Returns a portal that can be used in code running in the - /// execution environment. - /// - /// The `Token` object provided will be attached to this `ArrayHandle`. - /// The returned portal is guaranteed to be valid while the `Token` is - /// still attached and in scope. Other operations on this `ArrayHandle` - /// that would invalidate the returned portal will block until the `Token` - /// is released. Likewise, this method will block if another `Token` is - /// already attached. This can potentially lead to deadlocks. - /// - template - VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues, - DeviceAdapterTag, - vtkm::cont::Token& token); - VTKM_CONT WritePortalType PrepareForOutput(vtkm::Id numberOfValues, - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token); - - /// Prepares this array to be used in an in-place operation (both as input - /// and output) in the execution environment. If necessary, copies data to - /// the execution environment. Can throw an exception if this array does not - /// yet contain any data. Returns a portal that can be used in code running - /// in the execution environment. - /// - /// The `Token` object provided will be attached to this `ArrayHandle`. - /// The returned portal is guaranteed to be valid while the `Token` is - /// still attached and in scope. Other operations on this `ArrayHandle` - /// that would invalidate the returned portal will block until the `Token` - /// is released. Likewise, this method will block if another `Token` is - /// already attached. This can potentially lead to deadlocks. - /// - template - VTKM_CONT WritePortalType PrepareForInPlace(DeviceAdapterTag, vtkm::cont::Token& token); - VTKM_CONT WritePortalType PrepareForInPlace(vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token); - - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInput now requires a vtkm::cont::Token object.") - typename ExecutionTypes::PortalConst PrepareForInput(DeviceAdapterTag) const - { - vtkm::cont::Token token; - return this->PrepareForInput(DeviceAdapterTag{}, token); - } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForOutput now requires a vtkm::cont::Token object.") - typename ExecutionTypes::Portal - PrepareForOutput(vtkm::Id numberOfValues, DeviceAdapterTag) - { - vtkm::cont::Token token; - return this->PrepareForOutput(numberOfValues, DeviceAdapterTag{}, token); - } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForInPlace now requires a vtkm::cont::Token object.") - typename ExecutionTypes::Portal PrepareForInPlace(DeviceAdapterTag) - { - vtkm::cont::Token token; - return this->PrepareForInPlace(DeviceAdapterTag{}, token); - } - - /// Returns the DeviceAdapterId for the current device. If there is no device - /// with an up-to-date copy of the data, VTKM_DEVICE_ADAPTER_UNDEFINED is - /// returned. - /// - /// Note that in a multithreaded environment the validity of this result can - /// change. - VTKM_CONT - DeviceAdapterId GetDeviceAdapterId() const - { - LockType lock = this->GetLock(); - return this->Internals->IsExecutionArrayValid(lock) - ? this->Internals->GetExecutionArray(lock)->GetDeviceAdapterId() - : DeviceAdapterTagUndefined{}; - } - - /// Synchronizes the control array with the execution array. If either the - /// user array or control array is already valid, this method does nothing - /// (because the data is already available in the control environment). - /// Although the internal state of this class can change, the method is - /// declared const because logically the data does not. - /// - VTKM_CONT void SyncControlArray() const - { - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - this->SyncControlArray(lock, token); - } - } - - /// \brief Enqueue a token for access to this ArrayHandle. - /// - /// This method places the given `Token` into the queue of `Token`s waiting for - /// access to this `ArrayHandle` and then returns immediately. When this token - /// is later used to get data from this `ArrayHandle` (for example, in a call to - /// `PrepareForInput`), it will use this place in the queue while waiting for - /// access. - /// - /// This method is to be used to ensure that a set of accesses to an `ArrayHandle` - /// that happen on multiple threads occur in a specified order. For example, if - /// you spawn of a job to modify data in an `ArrayHandle` and then spawn off a job - /// that reads that same data, you need to make sure that the first job gets - /// access to the `ArrayHandle` before the second. If they both just attempt to call - /// their respective `Prepare` methods, there is no guarantee which order they - /// will occur. Having the spawning thread first call this method will ensure the order. - /// - /// \warning After calling this method it is required to subsequently - /// call a method like one of the `Prepare` methods that attaches the token - /// to this `ArrayHandle`. Otherwise, the enqueued token will block any subsequent - /// access to the `ArrayHandle`, even if the `Token` is destroyed. - /// - VTKM_CONT void Enqueue(const vtkm::cont::Token& token) const; - -private: - /// Acquires a lock on the internals of this `ArrayHandle`. The calling - /// function should keep the returned lock and let it go out of scope - /// when the lock is no longer needed. - /// - LockType GetLock() const { return LockType(this->Internals->Mutex); } - - /// Returns true if read operations can currently be performed. - /// - VTKM_CONT bool CanRead(const LockType& lock, const vtkm::cont::Token& token) const; - - //// Returns true if write operations can currently be performed. - /// - VTKM_CONT bool CanWrite(const LockType& lock, const vtkm::cont::Token& token) const; - - //// Will block the current thread until a read can be performed. - /// - VTKM_CONT void WaitToRead(LockType& lock, vtkm::cont::Token& token) const; - - //// Will block the current thread until a write can be performed. - /// - VTKM_CONT void WaitToWrite(LockType& lock, vtkm::cont::Token& token, bool fakeRead = false) const; - - /// Gets this array handle ready to interact with the given device. If the - /// array handle has already interacted with this device, then this method - /// does nothing. Although the internal state of this class can change, the - /// method is declared const because logically the data does not. - /// - template - VTKM_CONT void PrepareForDevice(LockType& lock, vtkm::cont::Token& token, DeviceAdapterTag) const; - - /// Synchronizes the control array with the execution array. If either the - /// user array or control array is already valid, this method does nothing - /// (because the data is already available in the control environment). - /// Although the internal state of this class can change, the method is - /// declared const because logically the data does not. - /// - VTKM_CONT void SyncControlArray(LockType& lock, vtkm::cont::Token& token) const; - - vtkm::Id GetNumberOfValues(LockType& lock) const; - - VTKM_CONT - void ReleaseResourcesExecutionInternal(LockType& lock, vtkm::cont::Token& token) const - { - if (this->Internals->IsExecutionArrayValid(lock)) - { - this->WaitToWrite(lock, token); - // Note that it is possible that while waiting someone else deleted the execution array. - // That is why we check again. - } - if (this->Internals->IsExecutionArrayValid(lock)) - { - this->Internals->GetExecutionArray(lock)->ReleaseResources(); - this->Internals->SetExecutionArrayValid(lock, false); - } - } - - VTKM_CONT void Enqueue(const LockType& lock, const vtkm::cont::Token& token) const; - - class VTKM_ALWAYS_EXPORT InternalStruct - { - mutable StorageType ControlArray; - mutable std::shared_ptr ControlArrayValid; - - mutable std::unique_ptr ExecutionArray; - mutable bool ExecutionArrayValid = false; - - mutable vtkm::cont::Token::ReferenceCount ReadCount = 0; - mutable vtkm::cont::Token::ReferenceCount WriteCount = 0; - - mutable std::deque Queue; - - VTKM_CONT void CheckLock(const LockType& lock) const - { - VTKM_ASSERT((lock.mutex() == &this->Mutex) && (lock.owns_lock())); - } - - public: - MutexType Mutex; - std::condition_variable ConditionVariable; - - InternalStruct() = default; - InternalStruct(const StorageType& storage); - InternalStruct(StorageType&& storage); - - ~InternalStruct() - { - // It should not be possible to destroy this array if any tokens are still attached to it. - LockType lock(this->Mutex); - VTKM_ASSERT((*this->GetReadCount(lock) == 0) && (*this->GetWriteCount(lock) == 0)); - this->SetControlArrayValid(lock, false); - } - - // To access any feature in InternalStruct, you must have locked the mutex. You have - // to prove it by passing in a reference to a std::unique_lock. - VTKM_CONT bool IsControlArrayValid(const LockType& lock) const - { - this->CheckLock(lock); - if (!this->ControlArrayValid) - { - return false; - } - else - { - return *this->ControlArrayValid; - } - } - VTKM_CONT void SetControlArrayValid(const LockType& lock, bool value) - { - this->CheckLock(lock); - if (IsControlArrayValid(lock) == value) - { - return; - } - if (value) // ControlArrayValid == false or nullptr - { - // If we are changing the valid flag from false to true, then refresh the pointer. - // There may be array portals that already have a reference to the flag. Those portals - // will stay in an invalid state whereas new portals will go to a valid state. To - // handle both conditions, drop the old reference and create a new one. - this->ControlArrayValid.reset(new bool(true)); - } - else // value == false and ControlArrayValid == true - { - *this->ControlArrayValid = false; - } - } - VTKM_CONT std::shared_ptr GetControlArrayValidPointer(const LockType& lock) const - { - this->CheckLock(lock); - return this->ControlArrayValid; - } - VTKM_CONT StorageType* GetControlArray(const LockType& lock) const - { - this->CheckLock(lock); - return &this->ControlArray; - } - - VTKM_CONT bool IsExecutionArrayValid(const LockType& lock) const - { - this->CheckLock(lock); - return this->ExecutionArrayValid; - } - VTKM_CONT void SetExecutionArrayValid(const LockType& lock, bool value) - { - this->CheckLock(lock); - this->ExecutionArrayValid = value; - } - VTKM_CONT ExecutionManagerType* GetExecutionArray(const LockType& lock) const - { - this->CheckLock(lock); - return this->ExecutionArray.get(); - } - VTKM_CONT void DeleteExecutionArray(const LockType& lock) - { - this->CheckLock(lock); - this->ExecutionArray.reset(); - this->ExecutionArrayValid = false; - } - template - VTKM_CONT void NewExecutionArray(const LockType& lock, DeviceAdapterTag) - { - VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - this->CheckLock(lock); - VTKM_ASSERT(this->ExecutionArray == nullptr); - VTKM_ASSERT(!this->ExecutionArrayValid); - this->ExecutionArray.reset( - new vtkm::cont::internal::ArrayHandleExecutionManager( - &this->ControlArray)); - } - VTKM_CONT vtkm::cont::Token::ReferenceCount* GetReadCount(const LockType& lock) const - { - this->CheckLock(lock); - return &this->ReadCount; - } - VTKM_CONT vtkm::cont::Token::ReferenceCount* GetWriteCount(const LockType& lock) const - { - this->CheckLock(lock); - return &this->WriteCount; - } - VTKM_CONT std::deque& GetQueue(const LockType& lock) const - { - this->CheckLock(lock); - return this->Queue; - } - }; - - VTKM_CONT - ArrayHandleDeprecated(const std::shared_ptr& i) - : Internals(i) - { - } - - std::shared_ptr Internals; -}; - -template -ArrayHandleDeprecated::InternalStruct::InternalStruct( - const typename ArrayHandleDeprecated::StorageType& storage) - : ControlArray(storage) - , ControlArrayValid(new bool(true)) - , ExecutionArrayValid(false) -{ -} - -template -ArrayHandleDeprecated::InternalStruct::InternalStruct( - typename ArrayHandleDeprecated::StorageType&& storage) - : ControlArray(std::move(storage)) - , ControlArrayValid(new bool(true)) - , ExecutionArrayValid(false) -{ -} - -template -ArrayHandleDeprecated::ArrayHandleDeprecated() - : Internals(std::make_shared()) -{ -} - -template -ArrayHandleDeprecated::ArrayHandleDeprecated(const ArrayHandleDeprecated& src) - : Internals(src.Internals) -{ -} - -template -ArrayHandleDeprecated::ArrayHandleDeprecated(ArrayHandleDeprecated&& src) noexcept - : Internals(std::move(src.Internals)) -{ -} - -template -ArrayHandleDeprecated::ArrayHandleDeprecated( - const typename ArrayHandleDeprecated::StorageType& storage) - : Internals(std::make_shared(storage)) -{ -} - -template -ArrayHandleDeprecated::ArrayHandleDeprecated( - typename ArrayHandleDeprecated::StorageType&& storage) noexcept - : Internals(std::make_shared(std::move(storage))) -{ -} - -template -ArrayHandleDeprecated::~ArrayHandleDeprecated() -{ -} - -template -ArrayHandleDeprecated& ArrayHandleDeprecated::operator=( - const ArrayHandleDeprecated& src) -{ - this->Internals = src.Internals; - return *this; -} - -template -ArrayHandleDeprecated& ArrayHandleDeprecated::operator=( - ArrayHandleDeprecated&& src) noexcept -{ - this->Internals = std::move(src.Internals); - return *this; -} - -template -typename ArrayHandleDeprecated::StorageType& ArrayHandleDeprecated::GetStorage() -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - return *this->Internals->GetControlArray(lock); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -const typename ArrayHandleDeprecated::StorageType& ArrayHandleDeprecated::GetStorage() - const -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - return *this->Internals->GetControlArray(lock); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -typename ArrayHandleDeprecated::StorageType::PortalType -ArrayHandleDeprecated::GetPortalControl() -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - // If the user writes into the iterator we return, then the execution - // array will become invalid. Play it safe and release the execution - // resources. (Use the const version to preserve the execution array.) - this->ReleaseResourcesExecutionInternal(lock, token); - return this->Internals->GetControlArray(lock)->GetPortal(); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -typename ArrayHandleDeprecated::StorageType::PortalConstType -ArrayHandleDeprecated::GetPortalConstControl() const -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - return this->Internals->GetControlArray(lock)->GetPortalConst(); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -typename ArrayHandleDeprecated::ReadPortalType ArrayHandleDeprecated::ReadPortal() const -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - this->WaitToRead(lock, token); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - return ReadPortalType(this->Internals->GetControlArray(lock)->GetPortalConst()); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -typename ArrayHandleDeprecated::WritePortalType ArrayHandleDeprecated::WritePortal() - const -{ - // A Token should not be declared within the scope of a lock. when the token goes out of scope - // it will attempt to aquire the lock, which is undefined behavior of the thread already has - // the lock. - vtkm::cont::Token token; - { - LockType lock = this->GetLock(); - this->WaitToWrite(lock, token); - - this->SyncControlArray(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - // If the user writes into the iterator we return, then the execution - // array will become invalid. Play it safe and release the execution - // resources. (Use the const version to preserve the execution array.) - this->ReleaseResourcesExecutionInternal(lock, token); - return WritePortalType(this->Internals->GetControlArray(lock)->GetPortal()); - } - else - { - throw vtkm::cont::ErrorInternal( - "ArrayHandle::SyncControlArray did not make control array valid."); - } - } -} - -template -vtkm::Id ArrayHandleDeprecated::GetNumberOfValues(LockType& lock) const -{ - if (this->Internals->IsControlArrayValid(lock)) - { - return this->Internals->GetControlArray(lock)->GetNumberOfValues(); - } - else if (this->Internals->IsExecutionArrayValid(lock)) - { - return this->Internals->GetExecutionArray(lock)->GetNumberOfValues(); - } - else - { - return 0; - } -} - -template -void ArrayHandleDeprecated::Shrink(vtkm::Id numberOfValues, vtkm::cont::Token& token) -{ - VTKM_ASSERT(numberOfValues >= 0); - - if (numberOfValues > 0) - { - LockType lock = this->GetLock(); - - vtkm::Id originalNumberOfValues = this->GetNumberOfValues(lock); - - if (numberOfValues < originalNumberOfValues) - { - this->WaitToWrite(lock, token); - if (this->Internals->IsControlArrayValid(lock)) - { - this->Internals->GetControlArray(lock)->Shrink(numberOfValues); - } - if (this->Internals->IsExecutionArrayValid(lock)) - { - this->Internals->GetExecutionArray(lock)->Shrink(numberOfValues); - } - } - else if (numberOfValues == originalNumberOfValues) - { - // Nothing to do. - } - else // numberOfValues > originalNumberOfValues - { - throw vtkm::cont::ErrorBadValue("ArrayHandle::Shrink cannot be used to grow array."); - } - - VTKM_ASSERT(this->GetNumberOfValues(lock) == numberOfValues); - } - else // numberOfValues == 0 - { - // If we are shrinking to 0, there is nothing to save and we might as well - // free up memory. Plus, some storage classes expect that data will be - // deallocated when the size goes to zero. - this->Allocate(0, token); - } -} - -template -template -typename ArrayHandleDeprecated::ReadPortalType ArrayHandleDeprecated::PrepareForInput( - DeviceAdapterTag device, - vtkm::cont::Token& token) const -{ - VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - - LockType lock = this->GetLock(); - this->WaitToRead(lock, token); - - if (!this->Internals->IsControlArrayValid(lock) && !this->Internals->IsExecutionArrayValid(lock)) - { - // Want to use an empty array. - // Set up ArrayHandle state so this actually works. - this->Internals->GetControlArray(lock)->Allocate(0); - this->Internals->SetControlArrayValid(lock, true); - } - - this->PrepareForDevice(lock, token, device); - auto portal = this->Internals->GetExecutionArray(lock)->PrepareForInput( - !this->Internals->IsExecutionArrayValid(lock), device, token); - - this->Internals->SetExecutionArrayValid(lock, true); - - return portal; -} - -template -struct ArrayHandleDeprecated::PrepareForInputFunctor -{ - template - bool operator()(Device device, - const ArrayHandleDeprecated& self, - vtkm::cont::Token& token, - ReadPortalType& portal) const - { - portal = self.PrepareForInput(device, token); - return true; - } -}; - -template -typename ArrayHandleDeprecated::ReadPortalType ArrayHandleDeprecated::PrepareForInput( - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) const -{ - ReadPortalType portal; - vtkm::cont::TryExecuteOnDevice(device, PrepareForInputFunctor{}, *this, token, portal); - return portal; -} - -template -template -typename ArrayHandleDeprecated::WritePortalType ArrayHandleDeprecated::PrepareForOutput( - vtkm::Id numberOfValues, - DeviceAdapterTag device, - vtkm::cont::Token& token) -{ - VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - - LockType lock = this->GetLock(); - this->WaitToWrite(lock, token); - - // Invalidate any control arrays. - // Should the control array resource be released? Probably not a good - // idea when shared with execution. - this->Internals->SetControlArrayValid(lock, false); - - this->PrepareForDevice(lock, token, device); - auto portal = - this->Internals->GetExecutionArray(lock)->PrepareForOutput(numberOfValues, device, token); - - // We are assuming that the calling code will fill the array using the - // iterators we are returning, so go ahead and mark the execution array as - // having valid data. (A previous version of this class had a separate call - // to mark the array as filled, but that was onerous to call at the the - // right time and rather pointless since it is basically always the case - // that the array is going to be filled before anything else. In this - // implementation the only access to the array is through the iterators - // returned from this method, so you would have to work to invalidate this - // assumption anyway.) - this->Internals->SetExecutionArrayValid(lock, true); - - return portal; -} - -template -struct ArrayHandleDeprecated::PrepareForOutputFunctor -{ - template - bool operator()(Device device, - ArrayHandleDeprecated& self, - vtkm::Id numberOfValues, - vtkm::cont::Token& token, - WritePortalType& portal) const - { - portal = self.PrepareForOutput(numberOfValues, device, token); - return true; - } -}; - -template -typename ArrayHandleDeprecated::WritePortalType ArrayHandleDeprecated::PrepareForOutput( - vtkm::Id numberOfValues, - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) -{ - WritePortalType portal; - vtkm::cont::TryExecuteOnDevice( - device, PrepareForOutputFunctor{}, *this, numberOfValues, token, portal); - return portal; -} - -template -template -typename ArrayHandleDeprecated::WritePortalType -ArrayHandleDeprecated::PrepareForInPlace(DeviceAdapterTag device, vtkm::cont::Token& token) -{ - VTKM_IS_DEVICE_ADAPTER_TAG(DeviceAdapterTag); - - LockType lock = this->GetLock(); - this->WaitToWrite(lock, token); - - if (!this->Internals->IsControlArrayValid(lock) && !this->Internals->IsExecutionArrayValid(lock)) - { - // Want to use an empty array. - // Set up ArrayHandle state so this actually works. - this->Internals->GetControlArray(lock)->Allocate(0); - this->Internals->SetControlArrayValid(lock, true); - } - - this->PrepareForDevice(lock, token, device); - auto portal = this->Internals->GetExecutionArray(lock)->PrepareForInPlace( - !this->Internals->IsExecutionArrayValid(lock), device, token); - - this->Internals->SetExecutionArrayValid(lock, true); - - // Invalidate any control arrays since their data will become invalid when - // the execution data is overwritten. Don't actually release the control - // array. It may be shared as the execution array. - this->Internals->SetControlArrayValid(lock, false); - - return portal; -} - -template -struct ArrayHandleDeprecated::PrepareForInPlaceFunctor -{ - template - bool operator()(Device device, - ArrayHandleDeprecated& self, - vtkm::cont::Token& token, - ReadPortalType& portal) const - { - portal = self.PrepareForInPlace(device, token); - return true; - } -}; - -template -typename ArrayHandleDeprecated::WritePortalType -ArrayHandleDeprecated::PrepareForInPlace(vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) -{ - WritePortalType portal; - vtkm::cont::TryExecuteOnDevice(device, PrepareForInPlaceFunctor{}, *this, token, portal); - return portal; -} - -template -template -void ArrayHandleDeprecated::PrepareForDevice(LockType& lock, - vtkm::cont::Token& token, - DeviceAdapterTag device) const -{ - if (this->Internals->GetExecutionArray(lock) != nullptr) - { - if (this->Internals->GetExecutionArray(lock)->IsDeviceAdapter(DeviceAdapterTag())) - { - // Already have manager for correct device adapter. Nothing to do. - return; - } - else - { - // Have the wrong manager. Delete the old one and create a new one - // of the right type. (TODO: it would be possible for the array handle - // to hold references to execution arrays on multiple devices. When data - // are written on one devices, all the other devices should get cleared.) - - // BUG: There is a non-zero chance that while waiting for the write lock, another thread - // could change the ExecutionInterface, which would cause problems. In the future we should - // support multiple devices, in which case we would not have to delete one execution array - // to load another. - // BUG: The current implementation does not allow the ArrayHandle to be on two devices - // at the same time. Thus, it is not possible for two simultaneously read from the same - // ArrayHandle on two different devices. This might cause unexpected deadlocks. - this->WaitToWrite(lock, token, true); // Make sure no one is reading device array - this->SyncControlArray(lock, token); - // Need to change some state that does not change the logical state from - // an external point of view. - this->Internals->DeleteExecutionArray(lock); - } - } - - // Need to change some state that does not change the logical state from - // an external point of view. - this->Internals->NewExecutionArray(lock, device); -} - -template -void ArrayHandleDeprecated::SyncControlArray(LockType& lock, vtkm::cont::Token& token) const -{ - if (!this->Internals->IsControlArrayValid(lock)) - { - // It may be the case that `SyncControlArray` is called from a method that has a `Token`. - // However, if we are here, that `Token` should not already be attached to this array. - // If it were, then there should be no reason to move data arround (unless the `Token` - // was used when preparing for multiple devices, which it should not be used like that). - this->WaitToRead(lock, token); - - // Need to change some state that does not change the logical state from - // an external point of view. - if (this->Internals->IsExecutionArrayValid(lock)) - { - this->Internals->GetExecutionArray(lock)->RetrieveOutputData( - this->Internals->GetControlArray(lock)); - this->Internals->SetControlArrayValid(lock, true); - } - else - { - // This array is in the null state (there is nothing allocated), but - // the calling function wants to do something with the array. Put this - // class into a valid state by allocating an array of size 0. - this->Internals->GetControlArray(lock)->Allocate(0); - this->Internals->SetControlArrayValid(lock, true); - } - } -} - -template -bool ArrayHandleDeprecated::CanRead(const LockType& lock, - const vtkm::cont::Token& token) const -{ - // If the token is already attached to this array, then we allow reading. - if (token.IsAttached(this->Internals->GetWriteCount(lock)) || - token.IsAttached(this->Internals->GetReadCount(lock))) - { - return true; - } - - // If there is anyone else waiting at the top of the queue, we cannot access this array. - auto& queue = this->Internals->GetQueue(lock); - if (!queue.empty() && (queue.front() != token)) - { - return false; - } - - // No one else is waiting, so we can read the array as long as no one else is writing. - return (*this->Internals->GetWriteCount(lock) < 1); -} - -template -bool ArrayHandleDeprecated::CanWrite(const LockType& lock, - const vtkm::cont::Token& token) const -{ - // If the token is already attached to this array, then we allow writing. - if (token.IsAttached(this->Internals->GetWriteCount(lock)) || - token.IsAttached(this->Internals->GetReadCount(lock))) - { - return true; - } - - // If there is anyone else waiting at the top of the queue, we cannot access this array. - auto& queue = this->Internals->GetQueue(lock); - if (!queue.empty() && (queue.front() != token)) - { - return false; - } - - // No one else is waiting, so we can write the array as long as no one else is reading or writing. - return ((*this->Internals->GetWriteCount(lock) < 1) && - (*this->Internals->GetReadCount(lock) < 1)); -} - -template -void ArrayHandleDeprecated::WaitToRead(LockType& lock, vtkm::cont::Token& token) const -{ - this->Enqueue(lock, token); - - // Note that if you deadlocked here, that means that you are trying to do a read operation on an - // array where an object is writing to it. - this->Internals->ConditionVariable.wait( - lock, [&lock, &token, this] { return this->CanRead(lock, token); }); - - token.Attach(this->Internals, - this->Internals->GetReadCount(lock), - lock, - &this->Internals->ConditionVariable); - - // We successfully attached the token. Pop it off the queue. - auto& queue = this->Internals->GetQueue(lock); - if (!queue.empty() && queue.front() == token) - { - queue.pop_front(); - } -} - -template -void ArrayHandleDeprecated::WaitToWrite(LockType& lock, - vtkm::cont::Token& token, - bool fakeRead) const -{ - this->Enqueue(lock, token); - - // Note that if you deadlocked here, that means that you are trying to do a write operation on an - // array where an object is reading or writing to it. - this->Internals->ConditionVariable.wait( - lock, [&lock, &token, this] { return this->CanWrite(lock, token); }); - - if (!fakeRead) - { - token.Attach(this->Internals, - this->Internals->GetWriteCount(lock), - lock, - &this->Internals->ConditionVariable); - } - else - { - // A current feature limitation of ArrayHandle is that it can only exist on one device at - // a time. Thus, if a read request comes in for a different device, the prepare has to - // get satisfy a write lock to boot the array off the existing device. However, we don't - // want to attach the Token as a write lock because the resulting state is for reading only - // and others might also want to read. So, we have to pretend that this is a read lock even - // though we have to make a change to the array. - // - // The main point is, this condition is a hack that should go away once ArrayHandle supports - // multiple devices at once. - token.Attach(this->Internals, - this->Internals->GetReadCount(lock), - lock, - &this->Internals->ConditionVariable); - } - - // We successfully attached the token. Pop it off the queue. - auto& queue = this->Internals->GetQueue(lock); - if (!queue.empty() && queue.front() == token) - { - queue.pop_front(); - } -} - -template -void ArrayHandleDeprecated::Enqueue(const vtkm::cont::Token& token) const -{ - LockType lock = this->GetLock(); - this->Enqueue(lock, token); -} - -template -void ArrayHandleDeprecated::Enqueue(const LockType& lock, - const vtkm::cont::Token& token) const -{ - if (token.IsAttached(this->Internals->GetWriteCount(lock)) || - token.IsAttached(this->Internals->GetReadCount(lock))) - { - // Do not need to enqueue if we are already attached. - return; - } - - auto& queue = this->Internals->GetQueue(lock); - if (std::find(queue.begin(), queue.end(), token.GetReference()) != queue.end()) - { - // This token is already in the queue. - return; - } - - this->Internals->GetQueue(lock).push_back(token.GetReference()); -} - -// This macro is used to declare an ArrayHandle that uses the old, deprecated style of Storage -// that leverages ArrayTransfer. This macro will go away once all deprecated ArrayHandles -// that use it are replaced with the new style. To use this macro, first have a declaration -// of the template and then put the macro like this: -// -// template -// VTKM_ARRAY_HANDLE_DEPRECATED(T, vtkm::cont::StorageTagFoo); -// -// Don't forget to use VTKM_PASS_COMMAS if one of the macro arguments contains -// a template with multiple parameters. -#define VTKM_ARRAY_HANDLE_DEPRECATED(ValueType_, StorageTag_) \ - class VTKM_ALWAYS_EXPORT ArrayHandle \ - : public internal::ArrayHandleDeprecated \ - { \ - using Superclass = internal::ArrayHandleDeprecated; \ - \ - public: \ - VTKM_CONT \ - ArrayHandle() \ - : Superclass() \ - { \ - } \ - \ - VTKM_CONT \ - ArrayHandle(const ArrayHandle& src) \ - : Superclass(src) \ - { \ - } \ - \ - VTKM_CONT \ - ArrayHandle(ArrayHandle&& src) noexcept \ - : Superclass(std::move(src)) \ - { \ - } \ - \ - VTKM_CONT \ - ArrayHandle(const internal::ArrayHandleDeprecated& src) \ - : Superclass(src) \ - { \ - } \ - \ - VTKM_CONT \ - ArrayHandle(internal::ArrayHandleDeprecated&& src) noexcept \ - : Superclass(std::move(src)) \ - { \ - } \ - \ - VTKM_CONT ArrayHandle(const internal::Storage& storage) \ - : Superclass(storage) \ - { \ - } \ - \ - VTKM_CONT ArrayHandle(internal::Storage&& storage) \ - : Superclass(std::move(storage)) \ - { \ - } \ - \ - VTKM_CONT ArrayHandle(const vtkm::cont::internal::Buffer* buffers) \ - : Superclass(buffers) \ - { \ - } \ - \ - VTKM_CONT ArrayHandle(const std::vector& buffers) \ - : Superclass(buffers.data()) \ - { \ - } \ - \ - VTKM_CONT \ - ArrayHandle& operator=( \ - const ArrayHandle& src) \ - { \ - this->Superclass::operator=(src); \ - return *this; \ - } \ - \ - VTKM_CONT \ - ArrayHandle& operator=( \ - ArrayHandle&& src) noexcept \ - { \ - this->Superclass::operator=(std::move(src)); \ - return *this; \ - } \ - \ - VTKM_CONT ~ArrayHandle() {} \ - } - -} -} -} // namespace vtkm::cont::internal - -#endif //vtk_m_cont_internal_ArrayHandleDeprecated_h diff --git a/vtkm/cont/internal/AtomicInterfaceControl.h b/vtkm/cont/internal/AtomicInterfaceControl.h deleted file mode 100644 index 42c2b4368..000000000 --- a/vtkm/cont/internal/AtomicInterfaceControl.h +++ /dev/null @@ -1,81 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_internal_AtomicInterfaceControl_h -#define vtk_m_cont_internal_AtomicInterfaceControl_h - -#include -#include - -namespace vtkm -{ -namespace cont -{ -namespace internal -{ - -struct VTKM_DEPRECATED(1.6, "Use the functions in vtkm/Atomic.h.") AtomicInterfaceControl -{ - using WordTypes = vtkm::AtomicTypesSupported; - using WordTypePreferred = vtkm::AtomicTypePreferred; - - template - VTKM_EXEC_CONT static T Load(const T* addr) - { - return vtkm::AtomicLoad(addr); - } - - template - VTKM_EXEC_CONT static void Store(T* addr, T value) - { - vtkm::AtomicStore(addr, value); - } - - template - VTKM_EXEC_CONT static T Add(T* addr, T arg) - { - return vtkm::AtomicAdd(addr, arg); - } - - template - VTKM_EXEC_CONT static T Not(T* addr) - { - return vtkm::AtomicNot(addr); - } - - template - VTKM_EXEC_CONT static T And(T* addr, T mask) - { - return vtkm::AtomicAnd(addr, mask); - } - - template - VTKM_EXEC_CONT static T Or(T* addr, T mask) - { - return vtkm::AtomicOr(addr, mask); - } - - template - VTKM_EXEC_CONT static T Xor(T* addr, T mask) - { - return vtkm::AtomicXor(addr, mask); - } - - template - VTKM_EXEC_CONT static T CompareAndSwap(T* addr, T newWord, T expected) - { - vtkm::AtomicCompareExchange(addr, &expected, newWord); - return expected; - } -}; -} -} -} // end namespace vtkm::cont::internal - -#endif // vtk_m_cont_internal_AtomicInterfaceControl_h diff --git a/vtkm/cont/internal/AtomicInterfaceExecution.h b/vtkm/cont/internal/AtomicInterfaceExecution.h deleted file mode 100644 index c179522a2..000000000 --- a/vtkm/cont/internal/AtomicInterfaceExecution.h +++ /dev/null @@ -1,82 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_internal_AtomicInterfaceExecution_h -#define vtk_m_cont_internal_AtomicInterfaceExecution_h - -#include -#include - -namespace vtkm -{ -namespace cont -{ -namespace internal -{ - -template -struct VTKM_DEPRECATED(1.6, "Use the functions in vtkm/Atomic.h.") AtomicInterfaceExecution -{ - using WordTypes = vtkm::AtomicTypesSupported; - using WordTypePreferred = vtkm::AtomicTypePreferred; - - template - VTKM_EXEC_CONT static T Load(const T* addr) - { - return vtkm::AtomicLoad(addr); - } - - template - VTKM_EXEC_CONT static void Store(T* addr, T value) - { - vtkm::AtomicStore(addr, value); - } - - template - VTKM_EXEC_CONT static T Add(T* addr, T arg) - { - return vtkm::AtomicAdd(addr, arg); - } - - template - VTKM_EXEC_CONT static T Not(T* addr) - { - return vtkm::AtomicNot(addr); - } - - template - VTKM_EXEC_CONT static T And(T* addr, T mask) - { - return vtkm::AtomicAnd(addr, mask); - } - - template - VTKM_EXEC_CONT static T Or(T* addr, T mask) - { - return vtkm::AtomicOr(addr, mask); - } - - template - VTKM_EXEC_CONT static T Xor(T* addr, T mask) - { - return vtkm::AtomicXor(addr, mask); - } - - template - VTKM_EXEC_CONT static T CompareAndSwap(T* addr, T newWord, T expected) - { - vtkm::AtomicCompareExchange(addr, &expected, newWord); - return expected; - } -}; -} -} -} // end namespace vtkm::cont::internal - -#endif // vtk_m_cont_internal_AtomicInterfaceExecution_h diff --git a/vtkm/cont/internal/CMakeLists.txt b/vtkm/cont/internal/CMakeLists.txt index 0b4cf6f55..55a05b82a 100644 --- a/vtkm/cont/internal/CMakeLists.txt +++ b/vtkm/cont/internal/CMakeLists.txt @@ -10,12 +10,9 @@ set(headers ArrayCopyUnknown.h - ArrayHandleDeprecated.h ArrayHandleExecutionManager.h ArrayPortalFromIterators.h ArrayTransfer.h - AtomicInterfaceControl.h - AtomicInterfaceExecution.h Buffer.h CastInvalidValue.h CellLocatorBase.h @@ -39,7 +36,6 @@ set(headers RuntimeDeviceConfiguration.h RuntimeDeviceConfigurationOptions.h RuntimeDeviceOption.h - StorageDeprecated.h StorageError.h ) diff --git a/vtkm/cont/internal/CellLocatorBase.h b/vtkm/cont/internal/CellLocatorBase.h index 4c19df29d..8b9a72545 100644 --- a/vtkm/cont/internal/CellLocatorBase.h +++ b/vtkm/cont/internal/CellLocatorBase.h @@ -63,15 +63,6 @@ public: } } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForExecution now requires a vtkm::cont::Token object.") - vtkm::cont::internal::ExecutionObjectType PrepareForExecution( - Device device) const - { - vtkm::cont::Token token; - return this->PrepareForExecution(device, token); - } - protected: void SetModified() { this->Modified = true; } bool GetModified() const { return this->Modified; } diff --git a/vtkm/cont/internal/OptionParserArguments.h b/vtkm/cont/internal/OptionParserArguments.h index 582264ffe..81212b8f6 100644 --- a/vtkm/cont/internal/OptionParserArguments.h +++ b/vtkm/cont/internal/OptionParserArguments.h @@ -33,10 +33,6 @@ enum OptionIndex DEVICE, LOGLEVEL, // not parsed by this parser, but by loguru - // TODO: remove deprecated arguments on next vtk-m release - DEPRECATED_DEVICE, - DEPRECATED_LOGLEVEL, - // All RuntimeDeviceConfiguration specific options NUM_THREADS, NUMA_REGIONS, diff --git a/vtkm/cont/internal/PointLocatorBase.h b/vtkm/cont/internal/PointLocatorBase.h index 5df672708..3d5376011 100644 --- a/vtkm/cont/internal/PointLocatorBase.h +++ b/vtkm/cont/internal/PointLocatorBase.h @@ -49,15 +49,6 @@ public: } } - template - VTKM_CONT VTKM_DEPRECATED(1.6, "PrepareForExecution now requires a vtkm::cont::Token object") - const vtkm::cont::internal::ExecutionObjectType PrepareForExecution( - Device device) const - { - vtkm::cont::Token token; - return this->PrepareForExecution(device, token); - } - protected: void SetModified() { this->Modified = true; } bool GetModified() const { return this->Modified; } diff --git a/vtkm/cont/internal/StorageDeprecated.h b/vtkm/cont/internal/StorageDeprecated.h deleted file mode 100644 index 96bf16a8a..000000000 --- a/vtkm/cont/internal/StorageDeprecated.h +++ /dev/null @@ -1,226 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_cont_internal_StorageDeprecated_h -#define vtk_m_cont_internal_StorageDeprecated_h - -#include -#include -#include -#include -#include - -#include - -#include - -namespace vtkm -{ -namespace cont -{ - -namespace internal -{ - -template -class ArrayHandleDeprecated; - -namespace detail -{ - -struct TryPrepareInput -{ - template - VTKM_CONT bool operator()(Device device, - ArrayType&& array, - vtkm::cont::Token& token, - typename ArrayType::ReadPortalType& portal, - bool& created) const - { - if (!created) - { - portal = array.PrepareForInput(device, token); - created = true; - } - return true; - } -}; - -struct TryPrepareInPlace -{ - template - VTKM_CONT bool operator()(Device device, - ArrayType&& array, - vtkm::cont::Token& token, - typename ArrayType::WritePortalType& portal, - bool& created) const - { - if (!created) - { - portal = array.PrepareForInPlace(device, token); - created = true; - } - return true; - } -}; - -template -struct StorageTemplateParams; - -template -struct StorageTemplateParams> -{ - using ValueType = T; - using StorageTag = S; -}; - -} // namespace detail - -/// \brief `Storage` handler for `ArrayHandle` types still using old `ArrayHandle` style. -/// -/// A recent change to `ArrayHandle` moved from using the `ArrayTransfer` method for -/// moving data from control to execution environments to using `Buffer` objects. One -/// feature of the `Buffer` objects is that if you have a new style `ArrayHandle` that -/// deprecates other `ArrayHandle`s, they both have to use `Buffer`. -/// -/// All old-style `ArrayHandle`s that still use `ArrayTransfer` should have a -/// `VTKM_STORAGE_OLD_STYLE;` declaration at the bottom of the `Storage` class. -/// -template -class StorageDeprecated -{ - using T = typename detail::StorageTemplateParams::ValueType; - using StorageTag = typename detail::StorageTemplateParams::StorageTag; - - using ArrayType = vtkm::cont::internal::ArrayHandleDeprecated; - - VTKM_CONT static ArrayType GetArray(const std::vector& buffers) - { - return buffers[0].GetMetaData(); - } - -public: - VTKM_CONT static vtkm::Id GetNumberOfValues( - const std::vector& buffers) - { - return GetArray(buffers).GetNumberOfValues(); - } - - VTKM_CONT static void ResizeBuffers(vtkm::Id numValues, - const std::vector& buffers, - vtkm::CopyFlag preserve, - vtkm::cont::Token& token) - { - switch (preserve) - { - case vtkm::CopyFlag::Off: - GetArray(buffers).Allocate(numValues, token); - break; - case vtkm::CopyFlag::On: - GetArray(buffers).Shrink(numValues, token); - break; - } - } - - VTKM_CONT static ReadPortalType CreateReadPortal( - const std::vector& buffers, - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) - { - if (device == vtkm::cont::DeviceAdapterTagUndefined{}) - { - return GetArray(buffers).ReadPortal(); - } - else - { - ReadPortalType portal; - bool created = false; - vtkm::cont::TryExecuteOnDevice( - device, detail::TryPrepareInput{}, GetArray(buffers), token, portal, created); - if (!created) - { - throw vtkm::cont::ErrorBadDevice("Failed to create input portal for device " + - device.GetName()); - } - return portal; - } - } - -private: - VTKM_CONT static WritePortalType CreateWritePortalImpl( - const std::vector& buffers, - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token, - std::true_type) - { - if (device == vtkm::cont::DeviceAdapterTagUndefined{}) - { - return GetArray(buffers).WritePortal(); - } - else - { - WritePortalType portal; - bool created = false; - vtkm::cont::TryExecuteOnDevice( - device, detail::TryPrepareInPlace{}, GetArray(buffers), token, portal, created); - if (!created) - { - throw vtkm::cont::ErrorBadDevice("Failed to create in place portal for device " + - device.GetName()); - } - return portal; - } - } - - VTKM_CONT static WritePortalType CreateWritePortalImpl( - const std::vector&, - vtkm::cont::DeviceAdapterId, - vtkm::cont::Token&, - std::false_type) - { - throw vtkm::cont::ErrorBadType("Attempted to get a writable portal to a read-only array."); - } - - using SupportsWrite = vtkm::internal::PortalSupportsSets; - -public: - VTKM_CONT static WritePortalType CreateWritePortal( - const std::vector& buffers, - vtkm::cont::DeviceAdapterId device, - vtkm::cont::Token& token) - { - return CreateWritePortalImpl(buffers, device, token, SupportsWrite{}); - } -}; - -#define VTKM_STORAGE_OLD_STYLE \ -public: \ - using HasOldBridge = std::true_type; \ - using ReadPortalType = PortalConstType; \ - using WritePortalType = PortalType; \ - \ -private: \ - using StorageDeprecated = \ - vtkm::cont::internal::StorageDeprecated; \ - \ -public: \ - VTKM_CONT static vtkm::Id GetNumberOfValues( \ - const std::vector& buffers) \ - { \ - return StorageDeprecated::GetNumberOfValues(buffers); \ - } \ - static constexpr auto& ResizeBuffers = StorageDeprecated::ResizeBuffers; \ - static constexpr auto& CreateReadPortal = StorageDeprecated::CreateReadPortal; \ - static constexpr auto& CreateWritePortal = StorageDeprecated::CreateWritePortal - -} -} -} // namespace vtkm::cont::internal - -#endif //vtk_m_cont_internal_StorageDeprecated_h diff --git a/vtkm/cont/testing/CMakeLists.txt b/vtkm/cont/testing/CMakeLists.txt index 0b15d5b46..5efe7e4fb 100644 --- a/vtkm/cont/testing/CMakeLists.txt +++ b/vtkm/cont/testing/CMakeLists.txt @@ -43,7 +43,6 @@ set(unit_tests UnitTestDataSetUniform.cxx UnitTestDeviceAdapterAlgorithmGeneral.cxx UnitTestDeviceSelectOnThreads.cxx - UnitTestDynamicCellSet.cxx UnitTestError.cxx UnitTestFieldRangeCompute.cxx UnitTestInitialize.cxx @@ -58,7 +57,6 @@ set(unit_tests UnitTestRuntimeDeviceNames.cxx UnitTestScopedRuntimeDeviceTracker.cxx UnitTestStorageList.cxx - UnitTestStorageListTag.cxx UnitTestTimer.cxx UnitTestToken.cxx UnitTestTryExecute.cxx @@ -68,7 +66,6 @@ set(unit_tests UnitTestTypeCheckKeys.cxx UnitTestUnknownArrayHandle.cxx UnitTestUnknownCellSet.cxx - UnitTestVariantArrayHandle.cxx ) set(unit_tests_device diff --git a/vtkm/cont/testing/MakeTestDataSet.h b/vtkm/cont/testing/MakeTestDataSet.h index 9f5952ea5..0cc41d1ad 100644 --- a/vtkm/cont/testing/MakeTestDataSet.h +++ b/vtkm/cont/testing/MakeTestDataSet.h @@ -14,7 +14,7 @@ #include #include -#include +#include #include @@ -25,7 +25,7 @@ namespace cont namespace testing { -class VTKM_CONT_EXPORT MakeTestDataSet +class VTKM_CONT_TESTING_EXPORT MakeTestDataSet { public: // 1D uniform datasets. diff --git a/vtkm/cont/testing/UnitTestCellSet.cxx b/vtkm/cont/testing/UnitTestCellSet.cxx index cfe3fdb32..d203f81e7 100644 --- a/vtkm/cont/testing/UnitTestCellSet.cxx +++ b/vtkm/cont/testing/UnitTestCellSet.cxx @@ -20,84 +20,6 @@ #include #include -// Make sure deprecated types still work (while applicable) -VTKM_DEPRECATED_SUPPRESS_BEGIN -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetStructured<3>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell>::ExecObjectType>::value)); -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetStructured<3>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint>::ExecObjectType>::value)); - -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetExplicit<>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell>::ExecObjectType>::value)); -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetExplicit<>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint>::ExecObjectType>::value)); - -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetSingleType<>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell>::ExecObjectType>::value)); -VTKM_STATIC_ASSERT( - (std::is_same:: - ExecConnectivityType, - typename vtkm::cont::CellSetSingleType<>::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint>::ExecObjectType>::value)); - -VTKM_STATIC_ASSERT( - (std::is_same>:: - ExecConnectivityType, - typename vtkm::cont::CellSetPermutation>:: - ExecutionTypes::ExecObjectType>::value)); -VTKM_STATIC_ASSERT( - (std::is_same>:: - ExecConnectivityType, - typename vtkm::cont::CellSetPermutation>:: - ExecutionTypes::ExecObjectType>::value)); - -VTKM_STATIC_ASSERT( - (std::is_same, - typename vtkm::cont::CellSetExtrude::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagPoint, - vtkm::TopologyElementTagCell>::ExecObjectType>::value)); -VTKM_STATIC_ASSERT( - (std::is_same, - typename vtkm::cont::CellSetExtrude::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial, - vtkm::TopologyElementTagCell, - vtkm::TopologyElementTagPoint>::ExecObjectType>::value)); -VTKM_DEPRECATED_SUPPRESS_END - namespace { diff --git a/vtkm/cont/testing/UnitTestDynamicCellSet.cxx b/vtkm/cont/testing/UnitTestDynamicCellSet.cxx deleted file mode 100644 index e0c82f481..000000000 --- a/vtkm/cont/testing/UnitTestDynamicCellSet.cxx +++ /dev/null @@ -1,179 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include - -// This is testing a deprecated functionality. Remove this test once VariantArrayHandle -// is completely removed from VTK-m. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -#include - -#include - -#include - -namespace -{ - -using NonDefaultCellSetList = - vtkm::List, - vtkm::cont::CellSetExplicit::StorageTag>>; - -template -struct CheckFunctor -{ - void operator()(const ExpectedCellType&, bool& called) const { called = true; } - - template - void operator()(const UnexpectedType&, bool& called) const - { - VTKM_TEST_FAIL("CastAndCall functor called with wrong type."); - called = false; - } -}; - -class DummyCellSet : public vtkm::cont::CellSet -{ -}; - -void CheckEmptyDynamicCellSet() -{ - vtkm::cont::DynamicCellSet empty; - - VTKM_TEST_ASSERT(empty.GetNumberOfCells() == 0, "DynamicCellSet should have no cells"); - VTKM_TEST_ASSERT(empty.GetNumberOfFaces() == 0, "DynamicCellSet should have no faces"); - VTKM_TEST_ASSERT(empty.GetNumberOfEdges() == 0, "DynamicCellSet should have no edges"); - VTKM_TEST_ASSERT(empty.GetNumberOfPoints() == 0, "DynamicCellSet should have no points"); - - empty.PrintSummary(std::cout); - - using CellSet2D = vtkm::cont::CellSetStructured<2>; - using CellSet3D = vtkm::cont::CellSetStructured<3>; - VTKM_TEST_ASSERT(!empty.template IsType(), "DynamicCellSet reports wrong type."); - VTKM_TEST_ASSERT(!empty.template IsType(), "DynamicCellSet reports wrong type."); - VTKM_TEST_ASSERT(!empty.template IsType(), "DynamicCellSet reports wrong type."); - - CellSet2D instance; - VTKM_TEST_ASSERT(!empty.IsSameType(instance), "DynamicCellSet reports wrong type."); - - bool gotException = false; - try - { - instance = empty.Cast(); - } - catch (vtkm::cont::ErrorBadType&) - { - gotException = true; - } - VTKM_TEST_ASSERT(gotException, "Empty DynamicCellSet should have thrown on casting"); - - auto empty2 = empty.NewInstance(); - VTKM_TEST_ASSERT(empty.GetCellSetBase() == nullptr, "DynamicCellSet should contain a nullptr"); - VTKM_TEST_ASSERT(empty2.GetCellSetBase() == nullptr, "DynamicCellSet should contain a nullptr"); -} - -template -void CheckDynamicCellSet(const CellSetType& cellSet, - vtkm::cont::DynamicCellSetBase dynamicCellSet) -{ - VTKM_TEST_ASSERT(dynamicCellSet.template IsType(), - "DynamicCellSet reports wrong type."); - VTKM_TEST_ASSERT(dynamicCellSet.IsSameType(cellSet), "DynamicCellSet reports wrong type."); - VTKM_TEST_ASSERT(!dynamicCellSet.template IsType(), - "DynamicCellSet reports wrong type."); - - dynamicCellSet.template Cast(); - - bool called = false; - dynamicCellSet.CastAndCall(CheckFunctor(), called); - - VTKM_TEST_ASSERT( - called, "The functor was never called (and apparently a bad value exception not thrown)."); - - called = false; - CastAndCall(dynamicCellSet, CheckFunctor(), called); - - VTKM_TEST_ASSERT( - called, "The functor was never called (and apparently a bad value exception not thrown)."); -} - -template -void TryNewInstance(CellSetType, vtkm::cont::DynamicCellSetBase originalCellSet) -{ - vtkm::cont::DynamicCellSetBase newCellSet = originalCellSet.NewInstance(); - - VTKM_TEST_ASSERT(newCellSet.template IsType(), "New cell set wrong type."); - - VTKM_TEST_ASSERT(originalCellSet.GetCellSetBase() != newCellSet.GetCellSetBase(), - "NewInstance did not make a copy."); -} - -template -void TryCellSet(CellSetType cellSet, vtkm::cont::DynamicCellSetBase dynamicCellSet) -{ - CheckDynamicCellSet(cellSet, dynamicCellSet); - - CheckDynamicCellSet(cellSet, dynamicCellSet.ResetCellSetList(vtkm::List())); - - TryNewInstance(cellSet, dynamicCellSet); -} - -template -void TryCellSet(CellSetType cellSet, vtkm::cont::DynamicCellSet dynamicCellSet) -{ - TryCellSet(cellSet, dynamicCellSet.ResetCellSetList()); -} - -template -void TryDefaultCellSet(CellSetType cellSet) -{ - vtkm::cont::DynamicCellSet dynamicCellSet(cellSet); - - TryCellSet(cellSet, dynamicCellSet); -} - -template -void TryNonDefaultCellSet(CellSetType cellSet) -{ - vtkm::cont::DynamicCellSetBase dynamicCellSet(cellSet); - - TryCellSet(cellSet, dynamicCellSet); -} - -void TestDynamicCellSet() -{ - std::cout << "Try default types with default type lists." << std::endl; - std::cout << "*** 2D Structured Grid ******************" << std::endl; - TryDefaultCellSet(vtkm::cont::CellSetStructured<2>()); - std::cout << "*** 3D Structured Grid ******************" << std::endl; - TryDefaultCellSet(vtkm::cont::CellSetStructured<3>()); - std::cout << "*** Explicit Grid ***********************" << std::endl; - TryDefaultCellSet(vtkm::cont::CellSetExplicit<>()); - - std::cout << std::endl << "Try non-default types." << std::endl; - std::cout << "*** 1D Structured Grid ******************" << std::endl; - TryNonDefaultCellSet(vtkm::cont::CellSetStructured<1>()); - std::cout << "*** Explicit Grid Constant Shape ********" << std::endl; - TryNonDefaultCellSet( - vtkm::cont::CellSetExplicit::StorageTag>()); - - std::cout << std::endl << "Try empty DynamicCellSet." << std::endl; - CheckEmptyDynamicCellSet(); -} - -} // anonymous namespace - -int UnitTestDynamicCellSet(int argc, char* argv[]) -{ - return vtkm::cont::testing::Testing::Run(TestDynamicCellSet, argc, argv); -} - -VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/cont/testing/UnitTestInitialize.cxx b/vtkm/cont/testing/UnitTestInitialize.cxx index 77a055d30..06f3ef0a4 100644 --- a/vtkm/cont/testing/UnitTestInitialize.cxx +++ b/vtkm/cont/testing/UnitTestInitialize.cxx @@ -142,45 +142,13 @@ void InitializeCustomOptionsWithArgs() CheckArgs(argc, argv, "--foo", "bar", "--baz"); } -void InitializeDeprecatedOptionsWithArgs() -{ - std::cout << "Calling program has option --foo that takes arg bar." << std::endl; - - int argc; - char** argv; - vtkm::cont::testing::Testing::MakeArgsAddProgramName( - argc, argv, "--device", "Any", "--foo=bar", "--baz"); - vtkm::cont::Initialize(argc, argv); - CheckArgs(argc, argv, "--foo=bar", "--baz"); - - vtkm::cont::testing::Testing::MakeArgsAddProgramName( - argc, argv, "--foo=bar", "--baz", "--device", "Any"); - vtkm::cont::Initialize(argc, argv); - CheckArgs(argc, argv, "--foo=bar", "--baz"); - - vtkm::cont::testing::Testing::MakeArgsAddProgramName( - argc, argv, "-d", "Any", "--foo", "bar", "--baz"); - vtkm::cont::Initialize(argc, argv); - CheckArgs(argc, argv, "--foo", "bar", "--baz"); - - vtkm::cont::testing::Testing::MakeArgsAddProgramName( - argc, argv, "--foo", "bar", "--baz", "-d", "Any"); - vtkm::cont::Initialize(argc, argv); - CheckArgs(argc, argv, "--foo", "bar", "--baz"); - - vtkm::cont::testing::Testing::MakeArgsAddProgramName( - argc, argv, "--foo", "-v", "OFF", "--", "--device", "Any", "--bar", "baz"); - vtkm::cont::Initialize(argc, argv); - CheckArgs(argc, argv, "--foo", "--", "--device", "Any", "--bar", "baz"); -} - void InitializeRuntimeDeviceConfigurationWithArgs() { int argc; char** argv; vtkm::cont::testing::Testing::MakeArgsAddProgramName(argc, argv, - "--device", + "--vtkm-device", "Any", "--vtkm-num-threads", "100", @@ -217,7 +185,6 @@ void DoInitializeTests() InitializeCustomOptions(); InitializeMixedOptions(); InitializeCustomOptionsWithArgs(); - InitializeDeprecatedOptionsWithArgs(); InitializeRuntimeDeviceConfigurationWithArgs(); // This should be the last function called as it should exit with a zero status. diff --git a/vtkm/cont/testing/UnitTestLogging.cxx b/vtkm/cont/testing/UnitTestLogging.cxx index a7ec07147..ab42b996c 100644 --- a/vtkm/cont/testing/UnitTestLogging.cxx +++ b/vtkm/cont/testing/UnitTestLogging.cxx @@ -45,22 +45,6 @@ void Scopes(int level = 0) } } -// VTKM_LOG_ERROR_CONTEXT is no longer implemented as it is -// deprecated -void ErrorContext() -{ - // These variables are only logged if a crash occurs. - // Only supports POD by default, but can be extended (see loguru docs) - VTKM_LOG_ERROR_CONTEXT("Some Int", 3); - VTKM_LOG_ERROR_CONTEXT("A Double", 236.7521); - VTKM_LOG_ERROR_CONTEXT("A C-String", "Hiya!"); - - // The error-tracking should work automatically on linux (maybe mac?) but on - // windows it doesn't trigger automatically (see loguru #74). But we can - // manually dump the error context log like so: - std::cerr << vtkm::cont::GetLogErrorContext() << "\n"; -} - void UserDefined() { VTKM_DEFINE_USER_LOG_LEVEL(CustomLevel, 0); @@ -87,9 +71,6 @@ void RunTests() VTKM_LOG_S(vtkm::cont::LogLevel::Info, "Running Scopes test..."); Scopes(); - VTKM_LOG_S(vtkm::cont::LogLevel::Info, "Running ErrorContext test..."); - ErrorContext(); - VTKM_LOG_S(vtkm::cont::LogLevel::Info, "Running UserDefined test..."); UserDefined(); } diff --git a/vtkm/cont/testing/UnitTestStorageListTag.cxx b/vtkm/cont/testing/UnitTestStorageListTag.cxx deleted file mode 100644 index 4b9493289..000000000 --- a/vtkm/cont/testing/UnitTestStorageListTag.cxx +++ /dev/null @@ -1,78 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -// This tests deprecated code until it is deleted. -#include -VTKM_DEPRECATED_SUPPRESS_BEGIN - -#include - -#include - -#include - -namespace -{ - -enum TypeId -{ - BASIC -}; - -TypeId GetTypeId(vtkm::cont::StorageTagBasic) -{ - return BASIC; -} - -struct TestFunctor -{ - std::vector FoundTypes; - - template - VTKM_CONT void operator()(T) - { - this->FoundTypes.push_back(GetTypeId(T())); - } -}; - -template -void CheckSame(const vtkm::Vec& expected, const std::vector& found) -{ - VTKM_TEST_ASSERT(static_cast(found.size()) == N, "Got wrong number of items."); - - for (vtkm::IdComponent index = 0; index < N; index++) - { - vtkm::UInt32 i = static_cast(index); - VTKM_TEST_ASSERT(expected[index] == found[i], "Got wrong type."); - } -} - -template -void TryList(const vtkm::Vec& expected, ListTag) -{ - TestFunctor functor; - vtkm::ListForEach(functor, ListTag()); - CheckSame(expected, functor.FoundTypes); -} - -void TestLists() -{ - std::cout << "StorageListTagBasic" << std::endl; - TryList(vtkm::Vec(BASIC), vtkm::cont::StorageListTagBasic()); -} - -} // anonymous namespace - -int UnitTestStorageListTag(int argc, char* argv[]) -{ - return vtkm::cont::testing::Testing::Run(TestLists, argc, argv); -} - -VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/cont/testing/UnitTestVariantArrayHandle.cxx b/vtkm/cont/testing/UnitTestVariantArrayHandle.cxx deleted file mode 100644 index 4a38f2dc5..000000000 --- a/vtkm/cont/testing/UnitTestVariantArrayHandle.cxx +++ /dev/null @@ -1,455 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include - -// This is testing a deprecated functionality. Remove this test once VariantArrayHandle -// is completely removed from VTK-m. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include -#include - -namespace -{ - -// Make an "unusual" type to use in the test. This is simply a type that -// is sure not to be declared elsewhere. -struct UnusualType -{ - using T = vtkm::Id; - T X; - UnusualType() = default; - UnusualType(T x) - : X(x) - { - } - UnusualType& operator=(T x) - { - this->X = x; - return *this; - } - operator T() const { return this->X; } -}; - -} // anonymous namespace - -namespace vtkm -{ - -// VariantArrayHandle requires its value type to have a defined VecTraits -// class. One of the tests is to use an "unusual" array. -// Make an implementation here. Because I am lazy, this is only a partial -// implementation. -template <> -struct VecTraits : VecTraits -{ - using ComponentType = UnusualType; - using BaseComponentType = UnusualType; -}; - -} // namespace vtkm - -namespace -{ - -const vtkm::Id ARRAY_SIZE = 10; - -template -struct TestValueFunctor -{ - T operator()(vtkm::Id index) const { return TestValue(index, T()); } -}; - -struct CheckFunctor -{ - template - static void CheckArray(const vtkm::cont::ArrayHandle& array) - { - VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Unexpected array size."); - CheckPortal(array.ReadPortal()); - } - - template - static void CheckArray(const vtkm::cont::ArrayHandle& array) - { - VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, "Unexpected array size."); - auto portal = array.ReadPortal(); - for (vtkm::Id index = 0; index < array.GetNumberOfValues(); ++index) - { - VTKM_TEST_ASSERT(portal.Get(index) == TestValue(index, UnusualType::T{})); - } - } - - template - void operator()(const vtkm::cont::ArrayHandle& array, - bool& calledBasic, - bool& vtkmNotUsed(calledVirtual)) const - { - calledBasic = true; - std::cout << " Checking for basic array type: " << typeid(T).name() << std::endl; - - CheckArray(array); - } - - template - void operator()(const vtkm::cont::ArrayHandle&, bool&, bool&) const - { - VTKM_TEST_FAIL("Array resolved to unexpected type."); - } -}; - -template -void BasicArrayVariantChecks(const vtkm::cont::VariantArrayHandleBase& array, - vtkm::IdComponent numComponents) -{ - VTKM_TEST_ASSERT(array.GetNumberOfValues() == ARRAY_SIZE, - "Dynamic array reports unexpected size."); - std::cout << "array.GetNumberOfComponents() = " << array.GetNumberOfComponentsFlat() << ", " - << "numComponents = " << numComponents << "\n"; - VTKM_TEST_ASSERT(array.GetNumberOfComponentsFlat() == numComponents, - "Dynamic array reports unexpected number of components."); -} - -template -void CheckArrayVariant(const vtkm::cont::VariantArrayHandleBase& array, - vtkm::IdComponent numComponents, - bool isBasicArray) -{ - BasicArrayVariantChecks(array, numComponents); - - std::cout << " CastAndCall with default storage" << std::endl; - bool calledBasic = false; - bool calledVirtual = false; - CastAndCall(array, CheckFunctor(), calledBasic, calledVirtual); - - VTKM_TEST_ASSERT( - calledBasic || calledVirtual, - "The functor was never called (and apparently a bad value exception not thrown)."); - if (isBasicArray) - { - VTKM_TEST_ASSERT(calledBasic, "The functor was never called with the basic array fast path"); - VTKM_TEST_ASSERT(!calledVirtual, "The functor was somehow called with the virtual path"); - } - else - { - VTKM_TEST_ASSERT(!calledBasic, "The array somehow got cast to a basic storage."); - } - -// Work around apparent bug in some versions of GCC that give a warning about -// StorageVirtualImpl<>::GetNumberOfValues() being "declared 'static' but never defined" -// (even though nothing about this method is declared static). See the following -// stackoverflow discussion for more details: -// -// https://stackoverflow.com/questions/56615695/how-to-fix-declared-static-but-never-defined-on-member-function -#if !defined(VTKM_GCC) || (__GNUC__ >= 9) - std::cout << " CastAndCall with extra storage" << std::endl; - calledBasic = false; - calledVirtual = false; - array.CastAndCall(vtkm::List{}, - CheckFunctor(), - calledBasic, - calledVirtual); - VTKM_TEST_ASSERT( - calledBasic || calledVirtual, - "The functor was never called (and apparently a bad value exception not thrown)."); - if (isBasicArray) - { - VTKM_TEST_ASSERT(calledBasic, "The functor was never called with the basic array fast path"); - VTKM_TEST_ASSERT(!calledVirtual, "The functor was somehow called with the virtual path"); - } - else - { - VTKM_TEST_ASSERT(!calledBasic, "The array somehow got cast to a basic storage."); - } -#endif -} - -template -vtkm::cont::VariantArrayHandle CreateArrayVariant(T) -{ - vtkm::cont::ArrayHandle array; - array.Allocate(ARRAY_SIZE); - SetPortal(array.WritePortal()); - return vtkm::cont::VariantArrayHandle(array); -} - -vtkm::cont::VariantArrayHandle CreateArrayVariant(UnusualType) -{ - vtkm::cont::ArrayHandle array; - array.Allocate(ARRAY_SIZE); - auto portal = array.WritePortal(); - for (vtkm::Id index = 0; index < ARRAY_SIZE; ++index) - { - portal.Set(index, TestValue(index, UnusualType::T{})); - } - return vtkm::cont::VariantArrayHandle(array); -} - -template -void CheckCastToArrayHandle(const ArrayHandleType& array) -{ - VTKM_IS_ARRAY_HANDLE(ArrayHandleType); - - vtkm::cont::VariantArrayHandle arrayVariant = array; - VTKM_TEST_ASSERT(!arrayVariant.IsType>(), - "Dynamic array reporting is wrong type."); - - ArrayHandleType castArray1; - arrayVariant.CopyTo(castArray1); - VTKM_TEST_ASSERT(arrayVariant.CanConvert(), "Did not query handle correctly."); - //VTKM_TEST_ASSERT(array == castArray1, "Did not get back same array."); - auto result = test_equal_ArrayHandles(array, castArray1); - VTKM_TEST_ASSERT(result, result.GetMergedMessage()); - - - ArrayHandleType castArray2 = arrayVariant.Cast(); - //VTKM_TEST_ASSERT(array == castArray2, "Did not get back same array."); - VTKM_TEST_ASSERT(test_equal_ArrayHandles(array, castArray2)); -} - -// A vtkm::Vec if NumComps > 1, otherwise a scalar -template -using VecOrScalar = typename std::conditional<(NumComps > 1), vtkm::Vec, T>::type; - -template -void TryNewInstance(T, ArrayVariantType originalArray) -{ - // This check should already have been performed by caller, but just in case. - CheckArrayVariant(originalArray, vtkm::VecTraits::NUM_COMPONENTS, true); - - std::cout << "Create new instance of array." << std::endl; - ArrayVariantType newArray = originalArray.NewInstance(); - - std::cout << "Get a static instance of the new array (which checks the type)." << std::endl; - vtkm::cont::ArrayHandle staticArray; - newArray.CopyTo(staticArray); - - std::cout << "Fill the new array with invalid values and make sure the original" << std::endl - << "is uneffected." << std::endl; - staticArray.Allocate(ARRAY_SIZE); - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) - { - staticArray.WritePortal().Set(index, TestValue(index + 100, T())); - } - CheckArrayVariant(originalArray, vtkm::VecTraits::NUM_COMPONENTS, true); - - std::cout << "Set the new static array to expected values and make sure the new" << std::endl - << "dynamic array points to the same new values." << std::endl; - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) - { - staticArray.WritePortal().Set(index, TestValue(index, T())); - } - CheckArrayVariant(newArray, vtkm::VecTraits::NUM_COMPONENTS, true); -} - -template -void TryAsMultiplexer(T, ArrayVariantType sourceArray) -{ - auto originalArray = sourceArray.template Cast>(); - - { - std::cout << "Get multiplex array through direct type." << std::endl; - using MultiplexerType = vtkm::cont::ArrayHandleMultiplexer, - vtkm::cont::ArrayHandleConstant>; - MultiplexerType multiplexArray = sourceArray.template AsMultiplexer(); - - VTKM_TEST_ASSERT(multiplexArray.IsValid()); - VTKM_TEST_ASSERT(test_equal_portals(multiplexArray.ReadPortal(), originalArray.ReadPortal())); - } - - { - std::cout << "Get multiplex array through cast type." << std::endl; - using CastT = typename vtkm::VecTraits::template ReplaceBaseComponentType; - using MultiplexerType = vtkm::cont::ArrayHandleMultiplexer< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandleCast>>; - MultiplexerType multiplexArray = sourceArray.template AsMultiplexer(); - - VTKM_TEST_ASSERT(multiplexArray.IsValid()); - VTKM_TEST_ASSERT(test_equal_portals(multiplexArray.ReadPortal(), originalArray.ReadPortal())); - } - - { - std::cout << "Make sure multiplex array prefers direct array (1st arg)" << std::endl; - using MultiplexerType = vtkm::cont::ArrayHandleMultiplexer< - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandleCast>>; - MultiplexerType multiplexArray = sourceArray.template AsMultiplexer(); - - VTKM_TEST_ASSERT(multiplexArray.IsValid()); - VTKM_TEST_ASSERT(multiplexArray.GetArrayHandleVariant().GetIndex() == 0); - VTKM_TEST_ASSERT(test_equal_portals(multiplexArray.ReadPortal(), originalArray.ReadPortal())); - } - - { - std::cout << "Make sure multiplex array prefers direct array (2nd arg)" << std::endl; - using MultiplexerType = - vtkm::cont::ArrayHandleMultiplexer>, - vtkm::cont::ArrayHandle>; - MultiplexerType multiplexArray = sourceArray.template AsMultiplexer(); - - VTKM_TEST_ASSERT(multiplexArray.IsValid()); - VTKM_TEST_ASSERT(multiplexArray.GetArrayHandleVariant().GetIndex() == 1); - VTKM_TEST_ASSERT(test_equal_portals(multiplexArray.ReadPortal(), originalArray.ReadPortal())); - } -} - -struct TryDefaultType -{ - template - void operator()(T) const - { - vtkm::cont::VariantArrayHandle array = CreateArrayVariant(T()); - - CheckArrayVariant(array, vtkm::VecTraits::NUM_COMPONENTS, true); - - TryNewInstance(T(), array); - - TryAsMultiplexer(T(), array); - } -}; - -struct TryBasicVTKmType -{ - template - void operator()(T) const - { - vtkm::cont::VariantArrayHandle array = CreateArrayVariant(T()); - - CheckArrayVariant( - array.ResetTypes(vtkm::TypeListAll()), vtkm::VecTraits::NUM_COMPONENTS, true); - - TryNewInstance(T(), array.ResetTypes(vtkm::TypeListAll())); - } -}; - -void TryUnusualType() -{ - // A string is an unlikely type to be declared elsewhere in VTK-m. - vtkm::cont::VariantArrayHandle array = CreateArrayVariant(UnusualType{}); - - try - { - CheckArrayVariant(array, 1, true); - VTKM_TEST_FAIL("CastAndCall failed to error for unrecognized type."); - } - catch (vtkm::cont::ErrorBadType&) - { - std::cout << " Caught exception for unrecognized type." << std::endl; - } - CheckArrayVariant(array.ResetTypes(vtkm::List()), 1, true); - std::cout << " Found type when type list was reset." << std::endl; -} -template -void TryCastToArrayHandle(const ArrayHandleType& array) -{ - CheckCastToArrayHandle(array); -} - -void TryCastToArrayHandle() -{ - std::cout << " Normal array handle." << std::endl; - vtkm::FloatDefault buffer[ARRAY_SIZE]; - for (vtkm::Id index = 0; index < ARRAY_SIZE; index++) - { - buffer[index] = TestValue(index, vtkm::FloatDefault()); - } - - vtkm::cont::ArrayHandle array = - vtkm::cont::make_ArrayHandle(buffer, ARRAY_SIZE, vtkm::CopyFlag::On); - TryCastToArrayHandle(array); - - std::cout << " Cast array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::make_ArrayHandleCast(array)); - - std::cout << " Composite vector array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::make_ArrayHandleCompositeVector(array, array)); - - std::cout << " Constant array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::make_ArrayHandleConstant(5, ARRAY_SIZE)); - - std::cout << " Counting array handle." << std::endl; - vtkm::cont::ArrayHandleCounting countingArray(ARRAY_SIZE - 1, -1, ARRAY_SIZE); - TryCastToArrayHandle(countingArray); - - std::cout << " Group vec array handle" << std::endl; - vtkm::cont::ArrayHandleGroupVec, 2> groupVecArray( - array); - TryCastToArrayHandle(groupVecArray); - - std::cout << " Implicit array handle." << std::endl; - TryCastToArrayHandle( - vtkm::cont::make_ArrayHandleImplicit(TestValueFunctor(), ARRAY_SIZE)); - - std::cout << " Index array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::ArrayHandleIndex(ARRAY_SIZE)); - - std::cout << " Permutation array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::make_ArrayHandlePermutation(countingArray, array)); - - std::cout << " Transform array handle." << std::endl; - TryCastToArrayHandle( - vtkm::cont::make_ArrayHandleTransform(countingArray, TestValueFunctor())); - - std::cout << " Uniform point coordinates array handle." << std::endl; - TryCastToArrayHandle(vtkm::cont::ArrayHandleUniformPointCoordinates(vtkm::Id3(ARRAY_SIZE))); - - // std::cout << " Zip array handle." << std::endl; - // CheckCastToArrayHandle(vtkm::cont::make_ArrayHandleZip(countingArray, array)); -} - -void TestVariantArrayHandle() -{ - std::cout << "Try common types with default type lists." << std::endl; - vtkm::testing::Testing::TryTypes(TryDefaultType{}, VTKM_DEFAULT_TYPE_LIST{}); - - std::cout << "Try exemplar VTK-m types." << std::endl; - vtkm::testing::Testing::TryTypes(TryBasicVTKmType()); - - std::cout << "Try unusual type." << std::endl; - TryUnusualType(); - - std::cout << "Try CastToArrayHandle" << std::endl; - TryCastToArrayHandle(); -} - -} // anonymous namespace - -int UnitTestVariantArrayHandle(int argc, char* argv[]) -{ - return vtkm::cont::testing::Testing::Run(TestVariantArrayHandle, argc, argv); -} - -// The MSVC compiler is sometimes complaining about use of deprecated VariantArrayHandle at the -// end of this file. This is the end of the translation unit, so just keep the suppression on. -//VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/cont/testlib/CMakeLists.txt b/vtkm/cont/testlib/CMakeLists.txt index f1718ae0b..fcc847ce7 100644 --- a/vtkm/cont/testlib/CMakeLists.txt +++ b/vtkm/cont/testlib/CMakeLists.txt @@ -20,7 +20,7 @@ set(testing_library_headers ) set(testing_library_sources - # MakeTestDataSet.cxx Currently in vtkm_cont. Should be moved to testlib in VTK-m 2.0 + MakeTestDataSet.cxx TestEqualArrayHandles.cxx Testing.cxx ) diff --git a/vtkm/cont/testlib/Testing.cxx b/vtkm/cont/testlib/Testing.cxx index c4680f982..39c324617 100644 --- a/vtkm/cont/testlib/Testing.cxx +++ b/vtkm/cont/testlib/Testing.cxx @@ -16,12 +16,9 @@ namespace enum TestOptionsIndex { TEST_UNKNOWN, - DATADIR, // base dir containing test data files - BASELINEDIR, // base dir for regression test images - WRITEDIR, // base dir for generated regression test images - DEPRECATED_DATADIR, // base dir containing test data files - DEPRECATED_BASELINEDIR, // base dir for regression test images - DEPRECATED_WRITEDIR // base dir for generated regression test images + DATADIR, // base dir containing test data files + BASELINEDIR, // base dir for regression test images + WRITEDIR, // base dir for generated regression test images }; } // anonymous namespace @@ -178,30 +175,6 @@ void Testing::ParseAdditionalTestArgs(int& argc, char* argv[]) "\tPath to the write dir " "to store generated " "regression test images" }); - usage.push_back({ DEPRECATED_DATADIR, - 0, - "D", - "data-dir", - opt::VtkmArg::Required, - " --data-dir " - " " - "\tDEPRECATED: use --vtkm-data-dir instead" }); - usage.push_back({ DEPRECATED_BASELINEDIR, - 0, - "B", - "baseline-dir", - opt::VtkmArg::Required, - " --baseline-dir " - " " - "\tDEPRECATED: use --vtkm-baseline-dir instead" }); - usage.push_back({ WRITEDIR, - 0, - "", - "write-dir", - opt::VtkmArg::Required, - " --write-dir " - " " - "\tDEPRECATED: use --vtkm-write-dir instead" }); // Required to collect unknown arguments when help is off. usage.push_back({ TEST_UNKNOWN, 0, "", "", opt::VtkmArg::UnknownOption, "" }); @@ -223,33 +196,6 @@ void Testing::ParseAdditionalTestArgs(int& argc, char* argv[]) exit(1); } - if (options[DEPRECATED_DATADIR]) - { - VTKM_LOG_S(vtkm::cont::LogLevel::Error, - "Supplied deprecated datadir flag: " - << std::string{ options[DEPRECATED_DATADIR].name } - << ", use --vtkm-data-dir instead"); - SetAndGetTestDataBasePath(options[DEPRECATED_DATADIR].arg); - } - - if (options[DEPRECATED_BASELINEDIR]) - { - VTKM_LOG_S(vtkm::cont::LogLevel::Error, - "Supplied deprecated baselinedir flag: " - << std::string{ options[DEPRECATED_BASELINEDIR].name } - << ", use --vtkm-baseline-dir instead"); - SetAndGetRegressionImageBasePath(options[DEPRECATED_BASELINEDIR].arg); - } - - if (options[DEPRECATED_WRITEDIR]) - { - VTKM_LOG_S(vtkm::cont::LogLevel::Error, - "Supplied deprecated writedir flag: " - << std::string{ options[DEPRECATED_WRITEDIR].name } - << ", use --vtkm-write-dir instead"); - SetAndGetWriteDirBasePath(options[DEPRECATED_WRITEDIR].arg); - } - if (options[DATADIR]) { SetAndGetTestDataBasePath(options[DATADIR].arg); diff --git a/vtkm/exec/AtomicArrayExecutionObject.h b/vtkm/exec/AtomicArrayExecutionObject.h index 03687f170..8f730d06c 100644 --- a/vtkm/exec/AtomicArrayExecutionObject.h +++ b/vtkm/exec/AtomicArrayExecutionObject.h @@ -77,46 +77,8 @@ struct ArithType }; } -template -class AtomicArrayExecutionObject; - -template -class VTKM_DEPRECATED(1.6, "AtomicArrayExecutionObject no longer uses Device template parameter.") - AtomicArrayExecutionObject : public AtomicArrayExecutionObject -{ - using Superclass = AtomicArrayExecutionObject; - -public: - AtomicArrayExecutionObject() = default; - - // This constructor is deprecated in VTK-m 1.6. - VTKM_DEPRECATED(1.6, "AtomicArrayExecutionObject no longer uses Device template parameter.") - AtomicArrayExecutionObject(vtkm::cont::ArrayHandle handle) - : Superclass(handle, Device{}) - { - } - - VTKM_DEPRECATED(1.6, "AtomicArrayExecutionObject no longer uses Device template parameter.") - AtomicArrayExecutionObject(vtkm::cont::ArrayHandle handle, vtkm::cont::Token& token) - : Superclass(handle, Device{}, token) - { - } - - // How does this even work? - template -#ifndef VTKM_MSVC - // Some versions of visual studio seem to have a bug that causes an error with the - // deprecated attribute at this location. - VTKM_DEPRECATED(1.6, "AtomicArrayExecutionObject no longer uses Device template parameter.") -#endif - AtomicArrayExecutionObject(const PortalType& portal) - : Superclass(portal) - { - } -}; - template -class AtomicArrayExecutionObject +class AtomicArrayExecutionObject { // Checks if PortalType has a GetIteratorBegin() method that returns a // pointer. @@ -131,19 +93,6 @@ public: AtomicArrayExecutionObject() = default; - // This constructor is deprecated in VTK-m 1.6. - VTKM_CONT VTKM_DEPRECATED(1.6, "AtomicArrayExecutionObject constructor needs token.") - AtomicArrayExecutionObject(vtkm::cont::ArrayHandle handle, - vtkm::cont::DeviceAdapterId device) - : Data{ handle.PrepareForInPlace(device).GetIteratorBegin() } - , NumberOfValues{ handle.GetNumberOfValues() } - { - using PortalType = decltype(handle.PrepareForInPlace(device)); - VTKM_STATIC_ASSERT_MSG(HasPointerAccess::value, - "Source portal must return a pointer from " - "GetIteratorBegin()."); - } - VTKM_CONT AtomicArrayExecutionObject(vtkm::cont::ArrayHandle handle, vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) @@ -285,15 +234,6 @@ public: static_cast(newValue)); } - VTKM_DEPRECATED(1.6, "Use CompareExchange. (Note the changed interface.)") - VTKM_EXEC ValueType CompareAndSwap(vtkm::Id index, - const ValueType& newValue, - ValueType oldValue) const - { - this->CompareExchange(index, &oldValue, newValue); - return oldValue; - } - private: ValueType* Data{ nullptr }; vtkm::Id NumberOfValues{ 0 }; diff --git a/vtkm/exec/CellDerivative.h b/vtkm/exec/CellDerivative.h index 2afbba791..9f1e87ccc 100644 --- a/vtkm/exec/CellDerivative.h +++ b/vtkm/exec/CellDerivative.h @@ -11,7 +11,6 @@ #define vtk_m_exec_Derivative_h #include -#include #include #include #include @@ -202,28 +201,6 @@ VTKM_EXEC vtkm::ErrorCode CellDerivative(const FieldVecType& pointFieldValues, return status; } -template -VTKM_DEPRECATED( - 1.6, - "Call signature has changed to CellDerivative(field, wCoords, pcoords, shape, result).") -VTKM_EXEC vtkm::Vec CellDerivative( - const FieldVecType& field, - const WorldCoordType& wCoords, - const vtkm::Vec& pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::Vec result; - vtkm::ErrorCode status = CellDerivative(field, wCoords, pcoords, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} } } // namespace vtkm::exec diff --git a/vtkm/exec/CellEdge.h b/vtkm/exec/CellEdge.h index 2f85660b1..e748a8dec 100644 --- a/vtkm/exec/CellEdge.h +++ b/vtkm/exec/CellEdge.h @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -174,22 +173,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellEdgeNumberOfEdges(vtkm::IdComponent } } -template -VTKM_DEPRECATED(1.6, "Signature changed to CellEdgeNumberOfEdges(numPoints, shape, result).") -static inline VTKM_EXEC vtkm::IdComponent - CellEdgeNumberOfEdges(vtkm::IdComponent numPoints, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::IdComponent numEdges; - vtkm::ErrorCode status = CellEdgeNumberOfEdges(numPoints, shape, numEdges); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return numEdges; -} - template static inline VTKM_EXEC vtkm::ErrorCode CellEdgeLocalIndex(vtkm::IdComponent numPoints, vtkm::IdComponent pointIndex, @@ -290,25 +273,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellEdgeLocalIndex(vtkm::IdComponent num } } -template -VTKM_DEPRECATED( - 1.6, - "Signature changed to CellEdgeLocalIndex(numPoints, pointIndex, edgeIndex, shape, result).") -static inline VTKM_EXEC vtkm::IdComponent CellEdgeLocalIndex(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::IdComponent edgeIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::IdComponent result; - vtkm::ErrorCode status = CellEdgeLocalIndex(numPoints, pointIndex, edgeIndex, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - /// \brief Returns a canonical identifier for a cell edge /// /// Given information about a cell edge and the global point indices for that cell, returns a @@ -345,26 +309,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellEdgeCanonicalId( return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED( - 1.6, - "Signature changed to CellEdgeCononicalId(numPoints, edgeIndex, shape, globalIds, result).") -static inline VTKM_EXEC vtkm::Id2 - CellEdgeCanonicalId(vtkm::IdComponent numPoints, - vtkm::IdComponent edgeIndex, - CellShapeTag shape, - const GlobalPointIndicesVecType& globalPointIndicesVec, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::Id2 result; - vtkm::ErrorCode status = - CellEdgeCanonicalId(numPoints, edgeIndex, shape, globalPointIndicesVec, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} } } // namespace vtkm::exec diff --git a/vtkm/exec/CellFace.h b/vtkm/exec/CellFace.h index 199dda74d..200dceebc 100644 --- a/vtkm/exec/CellFace.h +++ b/vtkm/exec/CellFace.h @@ -11,7 +11,6 @@ #define vtk_m_exec_CellFace_h #include -#include #include #include #include @@ -149,20 +148,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellFaceNumberOfFaces(CellShapeTag shape return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED(1.6, "Signature changed to CellFaceNumberOfFaces(shape, result).") -static inline VTKM_EXEC vtkm::IdComponent - CellFaceNumberOfFaces(CellShapeTag shape, const vtkm::exec::FunctorBase& worklet) -{ - vtkm::IdComponent result; - vtkm::ErrorCode status = CellFaceNumberOfFaces(shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - template static inline VTKM_EXEC vtkm::ErrorCode CellFaceNumberOfPoints(vtkm::IdComponent faceIndex, CellShapeTag shape, @@ -186,22 +171,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellFaceNumberOfPoints(vtkm::IdComponent return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED(1.6, "Signature changed to CellFaceNumberOfPoints(faceIndex, shape, result).") -static inline VTKM_EXEC vtkm::IdComponent - CellFaceNumberOfPoints(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::IdComponent result; - vtkm::ErrorCode status = CellFaceNumberOfPoints(faceIndex, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - template static inline VTKM_EXEC vtkm::ErrorCode CellFaceShape(vtkm::IdComponent faceIndex, CellShapeTag shape, @@ -231,21 +200,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellFaceShape(vtkm::IdComponent faceInde return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED(1.6, "Signature changed to CellFaceShape(faceIndex, shape, result).") -static inline VTKM_EXEC vtkm::UInt8 CellFaceShape(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::UInt8 result; - vtkm::ErrorCode status = CellFaceShape(faceIndex, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - template static inline VTKM_EXEC vtkm::ErrorCode CellFaceLocalIndex(vtkm::IdComponent pointIndex, vtkm::IdComponent faceIndex, @@ -267,23 +221,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellFaceLocalIndex(vtkm::IdComponent poi return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED(1.6, - "Signature changed to CellFaceLocalIndex(pointIndex, faceIndex, shape, result).") -static inline VTKM_EXEC vtkm::IdComponent CellFaceLocalIndex(vtkm::IdComponent pointIndex, - vtkm::IdComponent faceIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::IdComponent result; - vtkm::ErrorCode status = CellFaceLocalIndex(pointIndex, faceIndex, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - /// \brief Returns a canonical identifier for a cell face /// /// Given information about a cell face and the global point indices for that cell, returns a @@ -369,23 +306,6 @@ static inline VTKM_EXEC vtkm::ErrorCode CellFaceCanonicalId( return vtkm::ErrorCode::Success; } -template -VTKM_DEPRECATED(1.6, - "Signature changed to CellFaceCononicalId(faceIndex, shape, globalIds, result).") -static inline VTKM_EXEC vtkm::Id3 - CellFaceCanonicalId(vtkm::IdComponent faceIndex, - CellShapeTag shape, - const GlobalPointIndicesVecType& globalPointIndicesVec, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::Id3 result; - vtkm::ErrorCode status = CellFaceCanonicalId(faceIndex, shape, globalPointIndicesVec, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} } } // namespace vtkm::exec diff --git a/vtkm/exec/CellInterpolate.h b/vtkm/exec/CellInterpolate.h index e2fb54256..7224c6bd0 100644 --- a/vtkm/exec/CellInterpolate.h +++ b/vtkm/exec/CellInterpolate.h @@ -11,7 +11,6 @@ #define vtk_m_exec_Interpolate_h #include -#include #include #include #include @@ -177,24 +176,6 @@ VTKM_EXEC vtkm::ErrorCode CellInterpolate(const FieldVecType& pointFieldValues, return status; } -//----------------------------------------------------------------------------- -template -VTKM_DEPRECATED(1.6, - "Signature changed to CellInterpolate(pointFieldValues, pcoords, shape, result).") -VTKM_EXEC typename FieldVecType::ComponentType - CellInterpolate(const FieldVecType& pointFieldValues, - const vtkm::Vec& pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - typename FieldVecType::ComponentType result; - vtkm::ErrorCode status = CellInterpolate(pointFieldValues, pcoords, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} } } // namespace vtkm::exec diff --git a/vtkm/exec/CellLocatorBoundingIntervalHierarchy.h b/vtkm/exec/CellLocatorBoundingIntervalHierarchy.h index d80306982..d60a52c3d 100644 --- a/vtkm/exec/CellLocatorBoundingIntervalHierarchy.h +++ b/vtkm/exec/CellLocatorBoundingIntervalHierarchy.h @@ -176,11 +176,6 @@ public: } } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC CellLocatorBoundingIntervalHierarchy* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const CellLocatorBoundingIntervalHierarchy* operator->() const { return this; } - private: enum struct FindCellState { diff --git a/vtkm/exec/CellLocatorMultiplexer.h b/vtkm/exec/CellLocatorMultiplexer.h index 3192b3a7f..7807e6155 100644 --- a/vtkm/exec/CellLocatorMultiplexer.h +++ b/vtkm/exec/CellLocatorMultiplexer.h @@ -83,11 +83,6 @@ public: return this->Locators.CastAndCall( detail::FindCellFunctor{}, point, cellId, parametric, lastCell); } - - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC CellLocatorMultiplexer* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const CellLocatorMultiplexer* operator->() const { return this; } }; } diff --git a/vtkm/exec/CellLocatorRectilinearGrid.h b/vtkm/exec/CellLocatorRectilinearGrid.h index ede7b95f6..e5bf48655 100644 --- a/vtkm/exec/CellLocatorRectilinearGrid.h +++ b/vtkm/exec/CellLocatorRectilinearGrid.h @@ -157,11 +157,6 @@ public: return vtkm::ErrorCode::Success; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC CellLocatorRectilinearGrid* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const CellLocatorRectilinearGrid* operator->() const { return this; } - private: vtkm::Id PlaneSize; vtkm::Id RowSize; diff --git a/vtkm/exec/CellLocatorTwoLevel.h b/vtkm/exec/CellLocatorTwoLevel.h index d0212efc1..5d0caea8a 100644 --- a/vtkm/exec/CellLocatorTwoLevel.h +++ b/vtkm/exec/CellLocatorTwoLevel.h @@ -195,11 +195,6 @@ public: return this->FindCellImpl(point, cellId, parametric, lastCell); } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC CellLocatorTwoLevel* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const CellLocatorTwoLevel* operator->() const { return this; } - private: VTKM_EXEC vtkm::ErrorCode PointInCell(const vtkm::Vec3f& point, diff --git a/vtkm/exec/CellLocatorUniformGrid.h b/vtkm/exec/CellLocatorUniformGrid.h index bb5398614..63293ae27 100644 --- a/vtkm/exec/CellLocatorUniformGrid.h +++ b/vtkm/exec/CellLocatorUniformGrid.h @@ -95,11 +95,6 @@ public: return vtkm::ErrorCode::Success; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC CellLocatorUniformGrid* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const CellLocatorUniformGrid* operator->() const { return this; } - private: vtkm::Id3 CellDims; vtkm::Id3 MaxCellIds; diff --git a/vtkm/exec/ColorTable.h b/vtkm/exec/ColorTable.h index 92a689024..3eb33a232 100644 --- a/vtkm/exec/ColorTable.h +++ b/vtkm/exec/ColorTable.h @@ -10,7 +10,6 @@ #ifndef vtk_m_exec_ColorTable_h #define vtk_m_exec_ColorTable_h -#include #include namespace vtkm @@ -88,44 +87,6 @@ private: vtkm::Float32 weight) const; }; -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Use vtkm::exec::ColorTable.") ColorTableBase - : public vtkm::exec::ColorTable -{ -}; - -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Use vtkm::exec::ColorTable.") ColorTableRGB final - : public ColorTable -{ -public: - ColorTableRGB() { this->Space = vtkm::ColorSpace::RGB; } -}; - -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Use vtkm::exec::ColorTable.") ColorTableHSV final - : public ColorTable -{ -public: - ColorTableHSV() { this->Space = vtkm::ColorSpace::HSV; } -}; - -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Use vtkm::exec::ColorTable.") ColorTableHSVWrap final - : public ColorTable -{ -public: - ColorTableHSVWrap() { this->Space = vtkm::ColorSpace::HSVWrap; } -}; - -class VTKM_ALWAYS_EXPORT VTKM_DEPRECATED(1.6, "Use vtkm::exec::ColorTable.") ColorTableLab final - : public ColorTable -{ -public: - ColorTableLab() { this->Space = vtkm::ColorSpace::Lab; } -}; - -class VTKM_ALWAYS_EXPORT ColorTableDiverging final : public ColorTable -{ -public: - ColorTableDiverging() { this->Space = vtkm::ColorSpace::Diverging; } -}; } } diff --git a/vtkm/exec/ParametricCoordinates.h b/vtkm/exec/ParametricCoordinates.h index d33585420..68b826feb 100644 --- a/vtkm/exec/ParametricCoordinates.h +++ b/vtkm/exec/ParametricCoordinates.h @@ -136,39 +136,6 @@ static inline VTKM_EXEC vtkm::ErrorCode ParametricCoordinatesCenter( return status; } -template -VTKM_DEPRECATED(1.6, "Signature changed to ParametricCoordinatesCenter(numPoints, shape, result).") -static inline VTKM_EXEC void ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - vtkm::Vec& pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::ErrorCode status = ParametricCoordinatesCenter(numPoints, shape, pcoords); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } -} - -/// Returns the parametric center of the given cell shape with the given number -/// of points. -/// -template -VTKM_DEPRECATED(1.6, "Signature changed to ParametricCoordinatesCenter(numPoints, shape, result).") -static inline VTKM_EXEC vtkm::Vec3f - ParametricCoordinatesCenter(vtkm::IdComponent numPoints, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::Vec3f pcoords(0.0f); - vtkm::ErrorCode status = ParametricCoordinatesCenter(numPoints, shape, pcoords); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return pcoords; -} - //----------------------------------------------------------------------------- template static inline VTKM_EXEC vtkm::ErrorCode ParametricCoordinatesPoint( @@ -293,45 +260,6 @@ static inline VTKM_EXEC vtkm::ErrorCode ParametricCoordinatesPoint( return status; } -template -VTKM_DEPRECATED( - 1.6, - "Signature changed to ParametricCoordinatesPoint(numPoints, pointIndex, shape, result).") -static inline VTKM_EXEC void ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - vtkm::Vec& pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::ErrorCode status = ParametricCoordinatesPoint(numPoints, pointIndex, shape, pcoords); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } -} - -/// Returns the parametric coordinate of a cell point of the given shape with -/// the given number of points. -/// -template -VTKM_DEPRECATED( - 1.6, - "Signature changed to ParametricCoordinatesPoint(numPoints, pointIndex, shape, result).") -static inline VTKM_EXEC vtkm::Vec3f - ParametricCoordinatesPoint(vtkm::IdComponent numPoints, - vtkm::IdComponent pointIndex, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - vtkm::Vec3f pcoords; - vtkm::ErrorCode status = ParametricCoordinatesPoint(numPoints, pointIndex, shape, pcoords); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return pcoords; -} - //----------------------------------------------------------------------------- namespace internal { @@ -447,26 +375,6 @@ static inline VTKM_EXEC vtkm::ErrorCode ParametricCoordinatesToWorldCoordinates( return status; } -template -VTKM_DEPRECATED(1.6, - "Signature changed to " - "ParametricCoordinatesToWorldCoordinates(pointWCoords, pcoords, shape, result).") -static inline VTKM_EXEC typename WorldCoordVector::ComponentType - ParametricCoordinatesToWorldCoordinates(const WorldCoordVector& pointWCoords, - const vtkm::Vec& pcoords, - CellShapeTag shape, - const vtkm::exec::FunctorBase& worklet) -{ - typename WorldCoordVector::ComponentType result; - vtkm::ErrorCode status = - ParametricCoordinatesToWorldCoordinates(pointWCoords, pcoords, shape, result); - if (status != vtkm::ErrorCode::Success) - { - worklet.RaiseError(vtkm::ErrorString(status)); - } - return result; -} - //----------------------------------------------------------------------------- namespace internal { @@ -654,31 +562,6 @@ static inline VTKM_EXEC vtkm::ErrorCode WorldCoordinatesToParametricCoordinates( return status; } -template -VTKM_DEPRECATED(1.6, - "Signature changed to " - "WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, shape, result).") -static inline VTKM_EXEC typename WorldCoordVector::ComponentType - WorldCoordinatesToParametricCoordinates(const WorldCoordVector& pointWCoords, - const typename WorldCoordVector::ComponentType& wcoords, - CellShapeTag shape, - bool& success, - const vtkm::exec::FunctorBase& worklet) -{ - typename WorldCoordVector::ComponentType result; - vtkm::ErrorCode status = - WorldCoordinatesToParametricCoordinates(pointWCoords, wcoords, shape, result); - if (status != vtkm::ErrorCode::Success) - { - success = false; - worklet.RaiseError(vtkm::ErrorString(status)); - } - else - { - success = true; - } - return result; -} } } // namespace vtkm::exec diff --git a/vtkm/exec/PointLocatorSparseGrid.h b/vtkm/exec/PointLocatorSparseGrid.h index 8409ad427..1ad0b3a73 100644 --- a/vtkm/exec/PointLocatorSparseGrid.h +++ b/vtkm/exec/PointLocatorSparseGrid.h @@ -12,7 +12,6 @@ #include -#include #include namespace vtkm @@ -83,11 +82,6 @@ public: this->FindInBox(queryPoint, ijk, level, nearestNeighborId, distance2); } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC PointLocatorSparseGrid* operator->() { return this; } - VTKM_DEPRECATED(1.6, "Locators are no longer pointers. Use . operator.") - VTKM_EXEC const PointLocatorSparseGrid* operator->() const { return this; } - private: vtkm::Vec3f Min; vtkm::Id3 Dims; diff --git a/vtkm/exec/cuda/testing/UnitTestTaskStrided.cu b/vtkm/exec/cuda/testing/UnitTestTaskStrided.cu index 065809da1..c79ac2924 100644 --- a/vtkm/exec/cuda/testing/UnitTestTaskStrided.cu +++ b/vtkm/exec/cuda/testing/UnitTestTaskStrided.cu @@ -274,7 +274,8 @@ void TestNormalFunctorInvoke() vtkm::Id inputTestValues[3] = { 5, 5, 6 }; - vtkm::cont::ArrayHandle input = vtkm::cont::make_ArrayHandle(inputTestValues, 3); + vtkm::cont::ArrayHandle input = + vtkm::cont::make_ArrayHandle(inputTestValues, 3, vtkm::CopyFlag::Off); vtkm::cont::ArrayHandle output; vtkm::internal::FunctionInterface execObjects = @@ -331,8 +332,10 @@ void TestErrorFunctorInvoke() vtkm::Id inputTestValue = 5; vtkm::Id outputTestValue = static_cast(0xDEADDEAD); - vtkm::cont::ArrayHandle input = vtkm::cont::make_ArrayHandle(&inputTestValue, 1); - vtkm::cont::ArrayHandle output = vtkm::cont::make_ArrayHandle(&outputTestValue, 1); + vtkm::cont::ArrayHandle input = + vtkm::cont::make_ArrayHandle(&inputTestValue, 1, vtkm::CopyFlag::Off); + vtkm::cont::ArrayHandle output = + vtkm::cont::make_ArrayHandle(&outputTestValue, 1, vtkm::CopyFlag::Off); vtkm::internal::FunctionInterface execObjects = vtkm::internal::make_FunctionInterface( diff --git a/vtkm/filter/AmrArrays.h b/vtkm/filter/AmrArrays.h deleted file mode 100644 index c7ef489c1..000000000 --- a/vtkm/filter/AmrArrays.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_AmrArrays_h -#define vtk_m_filter_AmrArrays_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/multi_block/AmrArrays.h instead of vtkm/filter/AmrArrays.h.") -inline void AmrArrays_deprecated() {} - -inline void AmrArrays_deprecated_warning() -{ - AmrArrays_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_AmrArrays_h diff --git a/vtkm/filter/CMakeLists.txt b/vtkm/filter/CMakeLists.txt index 20989a91a..52eb5588f 100644 --- a/vtkm/filter/CMakeLists.txt +++ b/vtkm/filter/CMakeLists.txt @@ -8,92 +8,6 @@ ## PURPOSE. See the above copyright notice for more information. ##============================================================================ -set(deprecated_headers - AmrArrays.h - CellAverage.h - CellMeasures.h - CellSetConnectivity.h - CleanGrid.h - ClipWithField.h - ClipWithImplicitFunction.h - ComputeMoments.h - Contour.h - ContourTreeUniform.h - ContourTreeUniformAugmented.h - ContourTreeUniformDistributed.h - CoordinateSystemTransform.h - CreateResult.h - CrossProduct.h - DotProduct.h - Entropy.h - ExternalFaces.h - ExtractGeometry.h - ExtractPoints.h - ExtractStructured.h - FieldToColors.h - FieldMetadata.h - FilterCell.h - FilterDataSet.h - FilterDataSet.hxx - FilterDataSetWithField.h - FilterDataSetWithField.hxx - FilterField.h - FilterField.hxx - Filter.h - Filter.hxx - FilterTraits.h - GenerateIds.h - GhostCellClassify.h - GhostCellRemove.h - Gradient.h - Histogram.h - ImageConnectivity.h - ImageDifference.h - ImageMedian.h - Instantiations.h - Lagrangian.h - LagrangianStructures.h - Mask.h - MaskPoints.h - MeshQuality.h - MIRFilter.h - NDEntropy.h - NDHistogram.h - ParticleAdvection.h - ParticleDensityCloudInCell.h - ParticleDensityNearestGridPoint.h - Pathline.h - PathParticle.h - PointAverage.h - PointElevation.h - PointTransform.h - PolicyBase.h - PolicyDefault.h - Probe.h - Slice.h - SplitSharpEdges.h - Streamline.h - StreamSurface.h - SurfaceNormals.h - Tetrahedralize.h - Threshold.h - ThresholdPoints.h - Triangulate.h - Tube.h - VertexClustering.h - VectorMagnitude.h - WarpScalar.h - WarpVector.h - ZFPCompressor1D.h - ZFPCompressor2D.h - ZFPCompressor3D.h - ZFPDecompressor1D.h - ZFPDecompressor2D.h - ZFPDecompressor3D.h - ) - -vtkm_declare_headers(${deprecated_headers}) - set(core_headers FieldSelection.h NewFilter.h @@ -134,5 +48,3 @@ target_link_libraries(vtkm_filter PUBLIC INTERFACE ) install(TARGETS vtkm_filter EXPORT ${VTKm_EXPORT_NAME}) - -add_subdirectory(internal) diff --git a/vtkm/filter/CellAverage.h b/vtkm/filter/CellAverage.h deleted file mode 100644 index b4250cc53..000000000 --- a/vtkm/filter/CellAverage.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CellAverage_h -#define vtk_m_filter_CellAverage_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_conversion/CellAverage.h instead of vtkm/filter/CellAverage.h.") -inline void CellAverage_deprecated() {} - -inline void CellAverage_deprecated_warning() -{ - CellAverage_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_CellAverage_h diff --git a/vtkm/filter/CellMeasures.h b/vtkm/filter/CellMeasures.h deleted file mode 100644 index 17b1fafc5..000000000 --- a/vtkm/filter/CellMeasures.h +++ /dev/null @@ -1,24 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CellMeasures_h -#define vtk_m_filter_CellMeasures_h - -#include -#include - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/mesh_info/CellMeasures.h instead of vtkm/filter/CellMeasures.h.") -inline void CellMeasures_deprecated() {} - -inline void CellMeasures_deprecated_warning() -{ - CellMeasures_deprecated(); -} -#endif //vtk_m_filter_CellMeasures_h diff --git a/vtkm/filter/CellSetConnectivity.h b/vtkm/filter/CellSetConnectivity.h deleted file mode 100644 index 7609cc688..000000000 --- a/vtkm/filter/CellSetConnectivity.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CellSetConnectivity_h -#define vtk_m_filter_CellSetConnectivity_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/connected_components/CellSetConnectivity.h instead of " - "vtkm/filter/CellSetConnectivity.h.") -inline void CellSetConnectivity_deprecated() {} - -inline void CellSetConnectivity_deprecated_warning() -{ - CellSetConnectivity_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_CellSetConnectivity_h diff --git a/vtkm/filter/CleanGrid.h b/vtkm/filter/CleanGrid.h deleted file mode 100644 index 4da9de239..000000000 --- a/vtkm/filter/CleanGrid.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CleanGrid_h -#define vtk_m_filter_CleanGrid_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/clean_grid/CleanGrid.h instead of vtkm/filter/CleanGrid.h.") -inline void CleanGrid_deprecated() {} - -inline void CleanGrid_deprecated_warning() -{ - CleanGrid_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_CleanGrid_h diff --git a/vtkm/filter/ClipWithField.h b/vtkm/filter/ClipWithField.h deleted file mode 100644 index a9d56d221..000000000 --- a/vtkm/filter/ClipWithField.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ClipWithField_h -#define vtk_m_filter_ClipWithField_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/contour/ClipWithField.h instead of vtkm/filter/ClipWithField.h.") -inline void ClipWithField_deprecated() {} - -inline void ClipWithField_deprecated_warning() -{ - ClipWithField_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ClipWithField_h diff --git a/vtkm/filter/ClipWithImplicitFunction.h b/vtkm/filter/ClipWithImplicitFunction.h deleted file mode 100644 index 86c51b4d2..000000000 --- a/vtkm/filter/ClipWithImplicitFunction.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ClipWithImplicitFunction_h -#define vtk_m_filter_ClipWithImplicitFunction_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/contour/ClipWithImplicitFunction.h instead of " - "vtkm/filter/ClipWithImplicitFunction.h.") -inline void ClipWithImplicitFunction_deprecated() {} - -inline void ClipWithImplicitFunction_deprecated_warning() -{ - ClipWithImplicitFunction_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ClipWithImplicitFunction_h diff --git a/vtkm/filter/ComputeMoments.h b/vtkm/filter/ComputeMoments.h deleted file mode 100644 index 475ea2575..000000000 --- a/vtkm/filter/ComputeMoments.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ComputeMoments_h -#define vtk_m_filter_ComputeMoments_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/image_processing/ComputeMoments.h instead of vtkm/filter/ComputeMoments.h.") -inline void ComputeMoments_deprecated() {} - -inline void ComputeMoments_deprecated_warning() -{ - ComputeMoments_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ComputeMoments_h diff --git a/vtkm/filter/Contour.h b/vtkm/filter/Contour.h deleted file mode 100644 index e7ee66394..000000000 --- a/vtkm/filter/Contour.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Contour_h -#define vtk_m_filter_Contour_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/contour/Contour.h instead of vtkm/filter/Contour.h.") -inline void Contour_deprecated() {} - -inline void Contour_deprecated_warning() -{ - Contour_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Contour_h diff --git a/vtkm/filter/ContourTreeUniform.h b/vtkm/filter/ContourTreeUniform.h deleted file mode 100644 index ee576f85e..000000000 --- a/vtkm/filter/ContourTreeUniform.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ContourTreeUniform_h -#define vtk_m_filter_ContourTreeUniform_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/scalar_topology/ContourTreeUniform.h instead of " - "vtkm/filter/ContourTreeUniform.h.") -inline void ContourTreeUniform_deprecated() {} - -inline void ContourTreeUniform_deprecated_warning() -{ - ContourTreeUniform_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ContourTreeUniform_h diff --git a/vtkm/filter/ContourTreeUniformAugmented.h b/vtkm/filter/ContourTreeUniformAugmented.h deleted file mode 100644 index 01bab8602..000000000 --- a/vtkm/filter/ContourTreeUniformAugmented.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ContourTreeUniformAugmented_h -#define vtk_m_filter_ContourTreeUniformAugmented_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h instead of " - "vtkm/filter/ContourTreeUniformAugmented.h.") -inline void ContourTreeUniformAugmented_deprecated() {} - -inline void ContourTreeUniformAugmented_deprecated_warning() -{ - ContourTreeUniformAugmented_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ContourTreeUniformAugmented_h diff --git a/vtkm/filter/ContourTreeUniformDistributed.h b/vtkm/filter/ContourTreeUniformDistributed.h deleted file mode 100644 index 017c05a27..000000000 --- a/vtkm/filter/ContourTreeUniformDistributed.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ContourTreeUniformDistributed_h -#define vtk_m_filter_ContourTreeUniformDistributed_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h instead of " - "vtkm/filter/ContourTreeUniformDistributed.h.") -inline void ContourTreeUniformDistributed_deprecated() {} - -inline void ContourTreeUniformDistributed_deprecated_warning() -{ - ContourTreeUniformDistributed_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ContourTreeUniformDistributed_h diff --git a/vtkm/filter/CoordinateSystemTransform.h b/vtkm/filter/CoordinateSystemTransform.h deleted file mode 100644 index 61c59c0dc..000000000 --- a/vtkm/filter/CoordinateSystemTransform.h +++ /dev/null @@ -1,36 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CoordinateSystemTransform_h -#define vtk_m_filter_CoordinateSystemTransform_h - -#include -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/field_transform/CylindricalCoordinateTransform.h or " - "vtkm/filter/field_transform/SphericalCoordinateTransform.h instead of " - "vtkm/filter/CoordinateSystemTransform.h.") -inline void CoordinateSystemTransform_deprecated() {} - -inline void CoordinateSystemTransform_deprecated_warning() -{ - CoordinateSystemTransform_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_CoordinateSystemTransform_h diff --git a/vtkm/filter/CreateResult.h b/vtkm/filter/CreateResult.h deleted file mode 100644 index 840609517..000000000 --- a/vtkm/filter/CreateResult.h +++ /dev/null @@ -1,168 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_CreateResult_h -#define vtk_m_filter_CreateResult_h - -#include -#include -#include - -#include - -// Once all the filters move to the NewFilter base classes, this header should -// be deprecated. - -namespace vtkm -{ -namespace filter -{ -//@{ -/// These are utility functions defined to use in filters when creating an -/// output dataset to return from `DoExecute` methods. The various overloads -/// provides different ways of creating the output dataset (copying the input -/// without any of the fields) and adding additional field(s). - -/// Use this if you have built a \c Field object. An output -/// \c DataSet will be created by adding the field to the input. -VTKM_DEPRECATED(1.9, "Use CreateResultField method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet CreateResult(const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::Field& field) -{ - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(field); - VTKM_ASSERT(!field.GetName().empty()); - VTKM_ASSERT(clone.HasField(field.GetName(), field.GetAssociation())); - return clone; -} - -/// Use this function if you have an ArrayHandle that holds the data for -/// the field. You also need to specify a name for the field. -template -VTKM_DEPRECATED(1.9, "Use CreateResultField method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet - CreateResult(const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::ArrayHandle& fieldArray, - const std::string& fieldName, - const vtkm::filter::FieldMetadata& metaData) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(metaData.AsField(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasField(fieldName, metaData.GetAssociation())); - return clone; -} - -/// Use this function if you have a UnknownArrayHandle that holds the data -/// for the field. -VTKM_DEPRECATED(1.9, "Use CreateResultField method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet CreateResult(const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::UnknownArrayHandle& fieldArray, - const std::string& fieldName, - const vtkm::filter::FieldMetadata& metaData) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(metaData.AsField(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasField(fieldName, metaData.GetAssociation())); - return clone; -} - -/// Use this function if you want to explicit construct a Cell field and have a ArrayHandle -/// that holds the data for the field. -template -VTKM_DEPRECATED(1.9, "Use CreateResultFieldCell method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet - CreateResultFieldCell(const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::ArrayHandle& fieldArray, - const std::string& fieldName) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(vtkm::cont::make_FieldCell(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasCellField(fieldName)); - return clone; -} - -/// Use this function if you want to explicit construct a Cell field and have a UnknownArrayHandle -/// that holds the data for the field. -VTKM_DEPRECATED(1.9, "Use CreateResultFieldCell method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet CreateResultFieldCell( - const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::UnknownArrayHandle& fieldArray, - const std::string& fieldName) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(vtkm::cont::make_FieldCell(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasCellField(fieldName)); - return clone; -} - -/// Use this function if you want to explicit construct a Point field and have a ArrayHandle -/// that holds the data for the field. -template -VTKM_DEPRECATED(1.9, "Use CreateResultFieldPoint method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet - CreateResultFieldPoint(const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::ArrayHandle& fieldArray, - const std::string& fieldName) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(vtkm::cont::make_FieldPoint(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasPointField(fieldName)); - return clone; -} - -/// Use this function if you want to explicit construct a Point field and have a UnknownArrayHandle -/// that holds the data for the field. -VTKM_DEPRECATED(1.9, "Use CreateResultFieldCell method in NewFilterField.") -inline VTKM_CONT vtkm::cont::DataSet CreateResultFieldPoint( - const vtkm::cont::DataSet& inDataSet, - const vtkm::cont::UnknownArrayHandle& fieldArray, - const std::string& fieldName) -{ - VTKM_ASSERT(!fieldName.empty()); - - vtkm::cont::DataSet clone; - clone.CopyStructure(inDataSet); - clone.AddField(vtkm::cont::make_FieldPoint(fieldName, fieldArray)); - - // Sanity check. - VTKM_ASSERT(clone.HasPointField(fieldName)); - return clone; -} - -//@} -} // namespace vtkm::filter -} // namespace vtkm - -#endif diff --git a/vtkm/filter/CrossProduct.h b/vtkm/filter/CrossProduct.h deleted file mode 100644 index 56f62986d..000000000 --- a/vtkm/filter/CrossProduct.h +++ /dev/null @@ -1,35 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_CrossProduct_h -#define vtk_m_filter_CrossProduct_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/vector_analysis/CrossProduct.h instead of vtkm/filter/CrossProduct.h.") -inline void CrossProduct_deprecated() {} - -inline void CrossProduct_deprecated_warning() -{ - CrossProduct_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif // vtk_m_filter_CrossProduct_h diff --git a/vtkm/filter/DotProduct.h b/vtkm/filter/DotProduct.h deleted file mode 100644 index 97c4e7a4d..000000000 --- a/vtkm/filter/DotProduct.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_DotProduct_h -#define vtk_m_filter_DotProduct_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/vector_analysis/DotProduct.h instead of vtkm/filter/DotProduct.h.") -inline void DotProduct_deprecated() {} - -inline void DotProduct_deprecated_warning() -{ - DotProduct_deprecated(); -} - - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_DotProduct_h diff --git a/vtkm/filter/Entropy.h b/vtkm/filter/Entropy.h deleted file mode 100644 index 309d0d013..000000000 --- a/vtkm/filter/Entropy.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Entropy_h -#define vtk_m_filter_Entropy_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/density_estimate/Entropy.h instead of vtkm/filter/Entropy.h.") -inline void Entropy_deprecated() {} - -inline void Entropy_deprecated_warning() -{ - Entropy_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Entropy_h diff --git a/vtkm/filter/ExternalFaces.h b/vtkm/filter/ExternalFaces.h deleted file mode 100644 index 1f42bd5bf..000000000 --- a/vtkm/filter/ExternalFaces.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ExternalFaces_h -#define vtk_m_filter_ExternalFaces_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/ExternalFaces.h instead of vtkm/filter/ExternalFaces.h.") -inline void ExternalFaces_deprecated() {} - -inline void ExternalFaces_deprecated_warning() -{ - ExternalFaces_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ExternalFaces_h diff --git a/vtkm/filter/ExtractGeometry.h b/vtkm/filter/ExtractGeometry.h deleted file mode 100644 index e9d3e7594..000000000 --- a/vtkm/filter/ExtractGeometry.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ExtractGeometry_h -#define vtk_m_filter_ExtractGeometry_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/ExtractGeometry.h instead of vtkm/filter/ExtractGeometry.h.") -inline void ExtractGeometry_deprecated() {} - -inline void ExtractGeometry_deprecated_warning() -{ - ExtractGeometry_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ExtractGeometry_h diff --git a/vtkm/filter/ExtractPoints.h b/vtkm/filter/ExtractPoints.h deleted file mode 100644 index ee0f210c1..000000000 --- a/vtkm/filter/ExtractPoints.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ExtractPoints_h -#define vtk_m_filter_ExtractPoints_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/ExtractPoints.h instead of vtkm/filter/ExtractPoints.h.") -inline void ExtractPoints_deprecated() {} - -inline void ExtractPoints_deprecated_warning() -{ - ExtractPoints_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ExtractPoints_h diff --git a/vtkm/filter/ExtractStructured.h b/vtkm/filter/ExtractStructured.h deleted file mode 100644 index fe9e77d3d..000000000 --- a/vtkm/filter/ExtractStructured.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ExtractStructured_h -#define vtk_m_filter_ExtractStructured_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/entity_extraction/ExtractStructured.h instead of " - "vtkm/filter/ExtractStructured.h.") -inline void ExtractStructured_deprecated() {} - -inline void ExtractStructured_deprecated_warning() -{ - ExtractStructured_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ExtractStructured_h diff --git a/vtkm/filter/FieldMetadata.h b/vtkm/filter/FieldMetadata.h deleted file mode 100644 index 2b6c5805a..000000000 --- a/vtkm/filter/FieldMetadata.h +++ /dev/null @@ -1,94 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_FieldMetadata_h -#define vtk_m_filter_FieldMetadata_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -class VTKM_DEPRECATED(1.9) FieldMetadata -{ -public: - VTKM_CONT - FieldMetadata() - : Name() - , Association(vtkm::cont::Field::Association::Any) - { - } - - VTKM_CONT - FieldMetadata(const vtkm::cont::Field& f) - : Name(f.GetName()) - , Association(f.GetAssociation()) - { - } - - VTKM_CONT - FieldMetadata(const vtkm::cont::CoordinateSystem& sys) - : Name(sys.GetName()) - , Association(sys.GetAssociation()) - { - } - - VTKM_CONT - bool IsPointField() const { return this->Association == vtkm::cont::Field::Association::Points; } - - VTKM_CONT - bool IsCellField() const { return this->Association == vtkm::cont::Field::Association::Cells; } - - VTKM_CONT - const std::string& GetName() const { return this->Name; } - - VTKM_CONT - vtkm::cont::Field::Association GetAssociation() const { return this->Association; } - - /// Construct a new field with the same association as stored in this FieldMetaData - /// but with a new name - template - VTKM_CONT vtkm::cont::Field AsField(const std::string& name, - const vtkm::cont::ArrayHandle& handle) const - { - return vtkm::cont::Field(name, this->Association, handle); - } - /// Construct a new field with the same association as stored in this FieldMetaData - /// but with a new name - VTKM_CONT - vtkm::cont::Field AsField(const std::string& name, - const vtkm::cont::UnknownArrayHandle& handle) const - { - return vtkm::cont::Field(name, this->Association, handle); - } - - /// Construct a new field with the same association and name as stored in this FieldMetaData - template - VTKM_CONT vtkm::cont::Field AsField(const vtkm::cont::ArrayHandle& handle) const - { - return this->AsField(this->Name, handle); - } - /// Construct a new field with the same association and name as stored in this FieldMetaData - VTKM_CONT vtkm::cont::Field AsField(const vtkm::cont::UnknownArrayHandle& handle) const - { - return this->AsField(this->Name, handle); - } - -private: - std::string Name; ///< name of field - vtkm::cont::Field::Association Association; -}; -} -} - -#endif //vtk_m_filter_FieldMetadata_h diff --git a/vtkm/filter/FieldSelection.h b/vtkm/filter/FieldSelection.h index a4bac5055..0bdc3a0c6 100644 --- a/vtkm/filter/FieldSelection.h +++ b/vtkm/filter/FieldSelection.h @@ -10,7 +10,6 @@ #ifndef vtk_m_filter_FieldSelection_h #define vtk_m_filter_FieldSelection_h -#include #include #include @@ -39,14 +38,6 @@ public: Select, Exclude }; - VTKM_DEPRECATED(1.8, "Use FieldSelection::Mode::None.") - static constexpr Mode MODE_NONE = Mode::None; - VTKM_DEPRECATED(1.8, "Use FieldSelection::Mode::All.") static constexpr Mode MODE_ALL = Mode::All; - VTKM_DEPRECATED(1.8, "Use FieldSelection::Mode::Select.") - static constexpr Mode MODE_SELECT = Mode::Select; - VTKM_DEPRECATED(1.8, "Use FieldSelection::Mode::Exclude.") - static constexpr Mode MODE_EXCLUDE = Mode::Exclude; - using ModeEnum VTKM_DEPRECATED(1.8, "Use FieldSelection::Mode.") = Mode; VTKM_CONT FieldSelection(Mode mode = Mode::Select); diff --git a/vtkm/filter/FieldToColors.h b/vtkm/filter/FieldToColors.h deleted file mode 100644 index a26b77773..000000000 --- a/vtkm/filter/FieldToColors.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_FieldToColors_h -#define vtk_m_filter_FieldToColors_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_transform/FieldToColors.h instead of vtkm/filter/FieldToColors.h.") -inline void FieldToColors_deprecated() {} - -inline void FieldToColors_deprecated_warning() -{ - FieldToColors_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_FieldToColors_h diff --git a/vtkm/filter/Filter.h b/vtkm/filter/Filter.h deleted file mode 100644 index 729fed715..000000000 --- a/vtkm/filter/Filter.h +++ /dev/null @@ -1,351 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Filter_h -#define vtk_m_filter_Filter_h - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -namespace vtkm -{ -namespace filter -{ -/// \brief base class for all filters. -/// -/// This is the base class for all filters. To add a new filter, one can -/// subclass this (or any of the existing subclasses e.g. FilterField, -/// FilterDataSet, FilterDataSetWithField, etc. and implement relevant methods. -/// -/// \section FilterUsage Usage -/// -/// To execute a filter, one typically calls the `auto result = -/// filter.Execute(input)`. Typical usage is as follows: -/// -/// \code{cpp} -/// -/// // create the concrete subclass (e.g. MarchingCubes). -/// vtkm::filter::MarchingCubes marchingCubes; -/// -/// // select fieds to map to the output, if different from default which is to -/// // map all input fields. -/// marchingCubes.SetFieldToPass({"var1", "var2"}); -/// -/// // execute the filter on vtkm::cont::DataSet. -/// vtkm::cont::DataSet dsInput = ... -/// auto outputDS = filter.Execute(dsInput); -/// -/// // or, execute on a vtkm::cont::PartitionedDataSet -/// vtkm::cont::PartitionedDataSet mbInput = ... -/// auto outputMB = filter.Execute(mbInput); -/// \endcode -/// -/// `Execute` methods take in the input DataSet or PartitionedDataSet to -/// process and return the result. The type of the result is same as the input -/// type, thus `Execute(DataSet&)` returns a DataSet while -/// `Execute(PartitionedDataSet&)` returns a PartitionedDataSet. -/// -/// The implementation for `Execute(DataSet&)` is merely provided for -/// convenience. Internally, it creates a PartitionedDataSet with a single -/// partition for the input and then forwards the call to -/// `Execute(PartitionedDataSet&)`. The method returns the first partition, if -/// any, from the PartitionedDataSet returned by the forwarded call. If the -/// PartitionedDataSet returned has more than 1 partition, then -/// `vtkm::cont::ErrorFilterExecution` will be thrown. -/// -/// \section FilterSubclassing Subclassing -/// -/// Typically, one subclasses one of the immediate subclasses of this class such as -/// FilterField, FilterDataSet, FilterDataSetWithField, etc. Those may impose -/// additional constraints on the methods to implement in the subclasses. -/// Here, we describes the things to consider when directly subclassing -/// vtkm::filter::Filter. -/// -/// \subsection FilterPreExecutePostExecute PreExecute and PostExecute -/// -/// Subclasses may provide implementations for either or both of the following -/// methods. -/// -/// \code{cpp} -/// -/// template -/// void PreExecute(const vtkm::cont::PartitionedDataSet& input, -/// const vtkm::filter::PolicyBase& policy); -/// -/// template -/// void PostExecute(const vtkm::cont::PartitionedDataSet& input, vtkm::cont::PartitionedDataSet& output -/// const vtkm::filter::PolicyBase& policy); -/// -/// \endcode -/// -/// As the name suggests, these are called and the beginning and before the end -/// of an `Filter::Execute` call. Most filters that don't need to handle -/// PartitionedDataSet specially, e.g. clip, cut, iso-contour, need not worry -/// about these methods or provide any implementation. If, however, your filter -/// needs do to some initialization e.g. allocation buffers to accumulate -/// results, or finalization e.g. reduce results across all partitions, then -/// these methods provide convenient hooks for the same. -/// -/// \subsection FilterPrepareForExecution PrepareForExecution -/// -/// A concrete subclass of Filter must provide `PrepareForExecution` -/// implementation that provides the meat for the filter i.e. the implementation -/// for the filter's data processing logic. There are two signatures -/// available; which one to implement depends on the nature of the filter. -/// -/// Let's consider simple filters that do not need to do anything special to -/// handle PartitionedDataSet e.g. clip, contour, etc. These are the filters -/// where executing the filter on a PartitionedDataSet simply means executing -/// the filter on one partition at a time and packing the output for each -/// iteration info the result PartitionedDataSet. For such filters, one must -/// implement the following signature. -/// -/// \code{cpp} -/// -/// template -/// vtkm::cont::DataSet PrepareForExecution( -/// const vtkm::cont::DataSet& input, -/// const vtkm::filter::PolicyBase& policy); -/// -/// \endcode -/// -/// The role of this method is to execute on the input dataset and generate the -/// result and return it. If there are any errors, the subclass must throw an -/// exception (e.g. `vtkm::cont::ErrorFilterExecution`). -/// -/// In this case, the Filter superclass handles iterating over multiple -/// partitions in the input PartitionedDataSet and calling -/// `PrepareForExecution` iteratively. -/// -/// The aforementioned approach is also suitable for filters that need special -/// handling for PartitionedDataSets which can be modelled as PreExecute and -/// PostExecute steps (e.g. `vtkm::filter::Histogram`). -/// -/// For more complex filters, like streamlines, particle tracking, where the -/// processing of PartitionedDataSets cannot be modelled as a reduction of the -/// results, one can implement the following signature. -/// -/// \code{cpp} -/// template -/// vtkm::cont::PartitionedDataSet PrepareForExecution( -/// const vtkm::cont::PartitionedDataSet& input, -/// const vtkm::filter::PolicyBase& policy); -/// \endcode -/// -/// The responsibility of this method is the same, except now the subclass is -/// given full control over the execution, including any mapping of fields to -/// output (described in next sub-section). -/// -/// \subsection FilterMapFieldOntoOutput MapFieldOntoOutput -/// -/// Subclasses may provide `MapFieldOntoOutput` method with the following -/// signature: -/// -/// \code{cpp} -/// -/// template -/// VTKM_CONT bool MapFieldOntoOutput(vtkm::cont::DataSet& result, -/// const vtkm::cont::Field& field, -/// const vtkm::filter::PolicyBase& policy); -/// -/// \endcode -/// -/// When present, this method will be called after each partition execution to -/// map an input field from the corresponding input partition to the output -/// partition. -/// -template -class VTKM_DEPRECATED(1.9, "Use vtkm::filter::NewFilter.") Filter -{ -public: - VTKM_CONT - Filter(); - - VTKM_CONT - virtual ~Filter(); - - VTKM_CONT - virtual bool CanThread() const { return false; } - - VTKM_CONT - bool GetRunMultiThreadedFilter() const - { - return this->CanThread() && this->RunFilterWithMultipleThreads; - } - - VTKM_CONT - void SetRunMultiThreadedFilter(bool val) - { - if (this->CanThread()) - this->RunFilterWithMultipleThreads = val; - else - { - std::string msg = - "Multi threaded filter not supported for " + std::string(typeid(Derived).name()); - VTKM_LOG_S(vtkm::cont::LogLevel::Info, msg); - } - } - - VTKM_CONT - virtual Filter* Clone() const - { - throw vtkm::cont::ErrorExecution("You must implement Clone in the derived class."); - } - - /// \brief Specify which subset of types a filter supports. - /// - /// A filter is able to state what subset of types it supports. - using SupportedTypes = VTKM_DEFAULT_TYPE_LIST; - - /// \brief Specify which additional field storage to support. - /// - /// When a filter gets a field value from a DataSet, it has to determine what type - /// of storage the array has. Typically this is taken from the default storage - /// types defined in DefaultTypes.h. In some cases it is useful to support additional - /// types. For example, the filter might make sense to support ArrayHandleIndex or - /// ArrayHandleConstant. If so, the storage of those additional types should be - /// listed here. - using AdditionalFieldStorage = vtkm::ListEmpty; - - /// \brief Specify which structured cell sets to support. - /// - /// When a filter gets a cell set from a DataSet, it has to determine what type - /// of concrete cell set it is. This provides a list of supported structured - /// cell sets. - using SupportedStructuredCellSets = VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED; - - /// \brief Specify which unstructured cell sets to support. - /// - /// When a filter gets a cell set from a DataSet, it has to determine what type - /// of concrete cell set it is. This provides a list of supported unstructured - /// cell sets. - using SupportedUnstructuredCellSets = VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED; - - /// \brief Specify which unstructured cell sets to support. - /// - /// When a filter gets a cell set from a DataSet, it has to determine what type - /// of concrete cell set it is. This provides a list of supported cell sets. - using SupportedCellSets = VTKM_DEFAULT_CELL_SET_LIST; - - ///@{ - /// \brief Specify which fields get passed from input to output. - /// - /// After a filter successfully executes and returns a new data set, fields are mapped from - /// input to output. Depending on what operation the filter does, this could be a simple shallow - /// copy of an array, or it could be a computed operation. You can control which fields are - /// passed (and equivalently which are not) with this parameter. - /// - /// By default, all fields are passed during execution. - /// - VTKM_CONT - void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass) - { - this->FieldsToPass = fieldsToPass; - } - - VTKM_CONT - void SetFieldsToPass(const vtkm::filter::FieldSelection& fieldsToPass, - vtkm::filter::FieldSelection::Mode mode) - { - this->FieldsToPass = fieldsToPass; - this->FieldsToPass.SetMode(mode); - } - - VTKM_CONT - void SetFieldsToPass( - const std::string& fieldname, - vtkm::cont::Field::Association association, - vtkm::filter::FieldSelection::Mode mode = vtkm::filter::FieldSelection::Mode::Select) - { - this->SetFieldsToPass({ fieldname, association }, mode); - } - - VTKM_CONT - const vtkm::filter::FieldSelection& GetFieldsToPass() const { return this->FieldsToPass; } - VTKM_CONT - vtkm::filter::FieldSelection& GetFieldsToPass() { return this->FieldsToPass; } - ///@} - - ///@{ - /// Executes the filter on the input and produces a result dataset. - /// - /// On success, this the dataset produced. On error, vtkm::cont::ErrorExecution will be thrown. - VTKM_CONT vtkm::cont::DataSet Execute(const vtkm::cont::DataSet& input); - - template - VTKM_DEPRECATED(1.6, - "Filter::Execute no longer guarantees policy modifications. " - "Specify default types in CMake configuration instead.") - VTKM_CONT vtkm::cont::DataSet - Execute(const vtkm::cont::DataSet& input, vtkm::filter::PolicyBase policy); - ///@} - - ///@{ - /// Executes the filter on the input PartitionedDataSet and produces a result PartitionedDataSet. - /// - /// On success, this the dataset produced. On error, vtkm::cont::ErrorExecution will be thrown. - VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input); - - VTKM_CONT vtkm::cont::PartitionedDataSet ExecuteThreaded( - const vtkm::cont::PartitionedDataSet& input, - vtkm::Id numThreads); - - template - VTKM_DEPRECATED(1.6, - "Filter::Execute no longer guarantees policy modifications. " - "Specify default types in CMake configuration instead.") - VTKM_CONT vtkm::cont::PartitionedDataSet Execute(const vtkm::cont::PartitionedDataSet& input, - vtkm::filter::PolicyBase policy); - ///@} - - /// Map fields from input dataset to output. - /// This is not intended for external use. Subclasses of Filter, however, may - /// use this method to map fields. - template - VTKM_CONT void MapFieldsToPass(const vtkm::cont::DataSet& input, - vtkm::cont::DataSet& output, - vtkm::filter::PolicyBase policy); - - /// Specify the vtkm::cont::Invoker to be used to execute worklets by - /// this filter instance. Overriding the default allows callers to control - /// which device adapters a filter uses. - void SetInvoker(vtkm::cont::Invoker inv) { this->Invoke = inv; } - - VTKM_CONT - virtual vtkm::Id DetermineNumberOfThreads(const vtkm::cont::PartitionedDataSet& input); - -protected: - vtkm::cont::Invoker Invoke; - - vtkm::filter::Filter& operator=(const vtkm::filter::Filter&) = default; - - VTKM_CONT - void CopyStateFrom(const Filter* filter) { *this = *filter; } - -private: - vtkm::filter::FieldSelection FieldsToPass; - bool RunFilterWithMultipleThreads = false; -}; -} -} // namespace vtkm::filter - -#include -#endif diff --git a/vtkm/filter/Filter.hxx b/vtkm/filter/Filter.hxx deleted file mode 100644 index d81cd7fb2..000000000 --- a/vtkm/filter/Filter.hxx +++ /dev/null @@ -1,469 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -namespace vtkm -{ -namespace filter -{ - -namespace internal -{ - -template -struct SupportsPreExecute -{ - template ().PreExecute( - std::declval(), - std::declval>()))> - static std::true_type has(int); - template - static std::false_type has(...); - using type = decltype(has(0)); -}; - -template -struct SupportsPostExecute -{ - template ().PostExecute( - std::declval(), - std::declval(), - std::declval>()))> - static std::true_type has(int); - template - static std::false_type has(...); - using type = decltype(has(0)); -}; - - -template -struct SupportsPrepareForExecution -{ - template ().PrepareForExecution( - std::declval(), - std::declval>()))> - static std::true_type has(int); - template - static std::false_type has(...); - using type = decltype(has(0)); -}; - -template -struct SupportsMapFieldOntoOutput -{ - template ().MapFieldOntoOutput( - std::declval(), - std::declval(), - std::declval>()))> - static std::true_type has(int); - template - static std::false_type has(...); - using type = decltype(has(0)); -}; - -//-------------------------------------------------------------------------------- -template -void CallPreExecuteInternal(std::true_type, Derived* self, Args&&... args) -{ - return self->PreExecute(std::forward(args)...); -} - -//-------------------------------------------------------------------------------- -template -void CallPreExecuteInternal(std::false_type, Derived*, Args&&...) -{ -} - -//-------------------------------------------------------------------------------- -template -void CallPreExecute(Derived* self, - const InputType& input, - const vtkm::filter::PolicyBase& policy) -{ - using call_supported_t = typename SupportsPreExecute::type; - CallPreExecuteInternal(call_supported_t(), self, input, policy); -} - -//-------------------------------------------------------------------------------- -template -void CallMapFieldOntoOutputInternal(std::true_type, - Derived* self, - const vtkm::cont::DataSet& input, - vtkm::cont::DataSet& output, - const vtkm::filter::PolicyBase& policy) -{ - for (vtkm::IdComponent cc = 0; cc < input.GetNumberOfFields(); ++cc) - { - auto field = input.GetField(cc); - if (self->GetFieldsToPass().IsFieldSelected(field)) - { - self->MapFieldOntoOutput(output, field, policy); - } - } -} - -//-------------------------------------------------------------------------------- -template -void CallMapFieldOntoOutputInternal(std::false_type, - Derived* self, - const vtkm::cont::DataSet& input, - vtkm::cont::DataSet& output, - const vtkm::filter::PolicyBase&) -{ - // no MapFieldOntoOutput method is present. In that case, we simply copy the - // requested input fields to the output. - for (vtkm::IdComponent cc = 0; cc < input.GetNumberOfFields(); ++cc) - { - auto field = input.GetField(cc); - if (self->GetFieldsToPass().IsFieldSelected(field)) - { - output.AddField(field); - } - } -} - -//-------------------------------------------------------------------------------- -template -void CallMapFieldOntoOutput(Derived* self, - const vtkm::cont::DataSet& input, - vtkm::cont::DataSet& output, - vtkm::filter::PolicyBase policy) -{ - using call_supported_t = typename SupportsMapFieldOntoOutput::type; - CallMapFieldOntoOutputInternal(call_supported_t(), self, input, output, policy); -} - -//-------------------------------------------------------------------------------- -// forward declare. -template -InputType CallPrepareForExecution(Derived* self, - const InputType& input, - const vtkm::filter::PolicyBase& policy); - -//-------------------------------------------------------------------------------- -template -InputType CallPrepareForExecutionInternal(std::true_type, - Derived* self, - const InputType& input, - const vtkm::filter::PolicyBase& policy) -{ - return self->PrepareForExecution(input, policy); -} - -template -void RunFilter(Derived* self, - const vtkm::filter::PolicyBase& policy, - vtkm::filter::DataSetQueue& input, - vtkm::filter::DataSetQueue& output) -{ - auto filterClone = static_cast(self->Clone()); - - std::pair task; - while (input.GetTask(task)) - { - auto outDS = CallPrepareForExecution(filterClone, task.second, policy); - CallMapFieldOntoOutput(filterClone, task.second, outDS, policy); - output.Push(std::make_pair(task.first, std::move(outDS))); - } - - vtkm::cont::Algorithm::Synchronize(); - delete filterClone; -} - -//-------------------------------------------------------------------------------- -// specialization for PartitionedDataSet input when `PrepareForExecution` is not provided -// by the subclass. we iterate over blocks and execute for each block -// individually. -template -vtkm::cont::PartitionedDataSet CallPrepareForExecutionInternal( - std::false_type, - Derived* self, - const vtkm::cont::PartitionedDataSet& input, - const vtkm::filter::PolicyBase& policy) -{ - vtkm::cont::PartitionedDataSet output; - - if (self->GetRunMultiThreadedFilter()) - { - vtkm::filter::DataSetQueue inputQueue(input); - vtkm::filter::DataSetQueue outputQueue; - - vtkm::Id numThreads = self->DetermineNumberOfThreads(input); - - //Run 'numThreads' filters. - std::vector> futures(static_cast(numThreads)); - for (std::size_t i = 0; i < static_cast(numThreads); i++) - { - auto f = std::async(std::launch::async, - RunFilter, - self, - policy, - std::ref(inputQueue), - std::ref(outputQueue)); - futures[i] = std::move(f); - } - - for (auto& f : futures) - f.get(); - - //Get results from the outputQueue. - output = outputQueue.Get(); - } - else - { - for (const auto& inBlock : input) - { - vtkm::cont::DataSet outBlock = CallPrepareForExecution(self, inBlock, policy); - CallMapFieldOntoOutput(self, inBlock, outBlock, policy); - output.AppendPartition(outBlock); - } - } - - return output; -} - -//-------------------------------------------------------------------------------- -template -InputType CallPrepareForExecution(Derived* self, - const InputType& input, - const vtkm::filter::PolicyBase& policy) -{ - using call_supported_t = - typename SupportsPrepareForExecution::type; - return CallPrepareForExecutionInternal(call_supported_t(), self, input, policy); -} - -//-------------------------------------------------------------------------------- -template -void CallPostExecuteInternal(std::true_type, - Derived* self, - const InputType& input, - InputType& output, - const vtkm::filter::PolicyBase& policy) -{ - self->PostExecute(input, output, policy); -} - -//-------------------------------------------------------------------------------- -template -void CallPostExecuteInternal(std::false_type, Derived*, Args&&...) -{ -} - -//-------------------------------------------------------------------------------- -template -void CallPostExecute(Derived* self, - const InputType& input, - InputType& output, - const vtkm::filter::PolicyBase& policy) -{ - using call_supported_t = typename SupportsPostExecute::type; - CallPostExecuteInternal(call_supported_t(), self, input, output, policy); -} -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT Filter::Filter() - : Invoke() - , FieldsToPass(vtkm::filter::FieldSelection::Mode::All) -{ -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT Filter::~Filter() -{ -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT vtkm::cont::DataSet Filter::Execute(const vtkm::cont::DataSet& input) -{ - Derived* self = static_cast(this); - vtkm::cont::PartitionedDataSet output = self->Execute(vtkm::cont::PartitionedDataSet(input)); - if (output.GetNumberOfPartitions() > 1) - { - throw vtkm::cont::ErrorFilterExecution("Expecting at most 1 block."); - } - return output.GetNumberOfPartitions() == 1 ? output.GetPartition(0) : vtkm::cont::DataSet(); -} - -template -inline VTKM_CONT vtkm::cont::PartitionedDataSet Filter::Execute( - const vtkm::cont::PartitionedDataSet& input) -{ - VTKM_LOG_SCOPE(vtkm::cont::LogLevel::Perf, - "Filter (%d partitions): '%s'", - (int)input.GetNumberOfPartitions(), - vtkm::cont::TypeToString().c_str()); - - Derived* self = static_cast(this); - - vtkm::filter::PolicyDefault policy; - - // Call `void Derived::PreExecute(input, policy)`, if defined. - internal::CallPreExecute(self, input, policy); - - // Call `PrepareForExecution` (which should probably be renamed at some point) - vtkm::cont::PartitionedDataSet output = internal::CallPrepareForExecution(self, input, policy); - - // Call `Derived::PostExecute(input, output, policy)` if defined. - internal::CallPostExecute(self, input, output, policy); - return output; -} - -template -inline VTKM_CONT vtkm::Id Filter::DetermineNumberOfThreads( - const vtkm::cont::PartitionedDataSet& input) -{ - vtkm::Id numDS = input.GetNumberOfPartitions(); - - //Aribitrary constants. - const vtkm::Id threadsPerGPU = 8; - const vtkm::Id threadsPerCPU = 4; - - vtkm::Id availThreads = 1; - - auto& tracker = vtkm::cont::GetRuntimeDeviceTracker(); - - if (tracker.CanRunOn(vtkm::cont::DeviceAdapterTagCuda{})) - availThreads = threadsPerGPU; - else if (tracker.CanRunOn(vtkm::cont::DeviceAdapterTagKokkos{})) - { - //Kokkos doesn't support threading on the CPU. -#ifdef VTKM_KOKKOS_CUDA - availThreads = threadsPerGPU; -#else - availThreads = 1; -#endif - } - else if (tracker.CanRunOn(vtkm::cont::DeviceAdapterTagSerial{})) - availThreads = 1; - else - availThreads = threadsPerCPU; - - vtkm::Id numThreads = std::min(numDS, availThreads); - return numThreads; -} - -template -inline VTKM_CONT vtkm::cont::PartitionedDataSet Filter::ExecuteThreaded( - const vtkm::cont::PartitionedDataSet& input, - vtkm::Id vtkmNotUsed(numThreads)) -{ - VTKM_LOG_SCOPE(vtkm::cont::LogLevel::Perf, - "Filter (%d partitions): '%s'", - (int)input.GetNumberOfPartitions(), - vtkm::cont::TypeToString().c_str()); - - Derived* self = static_cast(this); - - vtkm::filter::PolicyDefault policy; - - // Call `void Derived::PreExecute(input, policy)`, if defined. - internal::CallPreExecute(self, input, policy); - - // Call `PrepareForExecution` (which should probably be renamed at some point) - vtkm::cont::PartitionedDataSet output = internal::CallPrepareForExecution(self, input, policy); - - // Call `Derived::PostExecute(input, output, policy)` if defined. - internal::CallPostExecute(self, input, output, policy); - return output; -} - - - - -//---------------------------------------------------------------------------- -template -template -VTKM_CONT vtkm::cont::DataSet Filter::Execute( - const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy) -{ - Derived* self = static_cast(this); - VTKM_DEPRECATED_SUPPRESS_BEGIN - vtkm::cont::PartitionedDataSet output = - self->Execute(vtkm::cont::PartitionedDataSet(input), policy); - VTKM_DEPRECATED_SUPPRESS_END - if (output.GetNumberOfPartitions() > 1) - { - throw vtkm::cont::ErrorFilterExecution("Expecting at most 1 block."); - } - return output.GetNumberOfPartitions() == 1 ? output.GetPartition(0) : vtkm::cont::DataSet(); -} - -//---------------------------------------------------------------------------- -template -template -VTKM_CONT vtkm::cont::PartitionedDataSet Filter::Execute( - const vtkm::cont::PartitionedDataSet& input, - vtkm::filter::PolicyBase policy) -{ - VTKM_LOG_SCOPE(vtkm::cont::LogLevel::Perf, - "Filter (%d partitions): '%s'", - (int)input.GetNumberOfPartitions(), - vtkm::cont::TypeToString().c_str()); - - Derived* self = static_cast(this); - - // Call `void Derived::PreExecute(input, policy)`, if defined. - internal::CallPreExecute(self, input, policy); - - // Call `PrepareForExecution` (which should probably be renamed at some point) - vtkm::cont::PartitionedDataSet output = internal::CallPrepareForExecution(self, input, policy); - - // Call `Derived::PostExecute(input, output, policy)` if defined. - internal::CallPostExecute(self, input, output, policy); - return output; -} - -//---------------------------------------------------------------------------- -template -template -inline VTKM_CONT void Filter::MapFieldsToPass( - const vtkm::cont::DataSet& input, - vtkm::cont::DataSet& output, - vtkm::filter::PolicyBase policy) -{ - Derived* self = static_cast(this); - for (vtkm::IdComponent cc = 0; cc < input.GetNumberOfFields(); ++cc) - { - auto field = input.GetField(cc); - if (this->GetFieldsToPass().IsFieldSelected(field)) - { - internal::CallMapFieldOntoOutput(self, output, field, policy); - } - } -} -} -} diff --git a/vtkm/filter/FilterCell.h b/vtkm/filter/FilterCell.h deleted file mode 100644 index 2025dae64..000000000 --- a/vtkm/filter/FilterCell.h +++ /dev/null @@ -1,28 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_CellFilter_h -#define vtk_m_filter_CellFilter_h - -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -using FilterCell VTKM_DEPRECATED(1.6, "Use FilterField instead of FilterCell.") = - vtkm::filter::FilterField; -VTKM_DEPRECATED_SUPPRESS_END -} -} -#endif // vtk_m_filter_CellFilter_h diff --git a/vtkm/filter/FilterDataSet.h b/vtkm/filter/FilterDataSet.h deleted file mode 100644 index cf2b3df78..000000000 --- a/vtkm/filter/FilterDataSet.h +++ /dev/null @@ -1,78 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_DataSetFilter_h -#define vtk_m_filter_DataSetFilter_h - -#include -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -class VTKM_DEPRECATED(1.9, "Use vtkm::filter::NewFilter.") FilterDataSet - : public vtkm::filter::Filter -{ -public: - VTKM_CONT - FilterDataSet(); - - VTKM_CONT - ~FilterDataSet(); - - VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } - - VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } - - /// These are provided to satisfy the Filter API requirements. - - //From the field we can extract the association component - // Association::Any -> unable to map - // Association::WholeDataSet -> (I think this is points) - // Association::Points -> map using point mapping - // Association::Cells -> how do we map this? - template - VTKM_CONT bool MapFieldOntoOutput(vtkm::cont::DataSet& result, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy); - - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy); - -protected: - vtkm::filter::FilterDataSet& operator=(const vtkm::filter::FilterDataSet&) = - default; - VTKM_CONT - void CopyStateFrom(const FilterDataSet* filter) { *this = *filter; } - -private: - vtkm::Id CoordinateSystemIndex; - - friend class vtkm::filter::Filter; -}; -VTKM_DEPRECATED_SUPPRESS_END -} -} // namespace vtkm::filter - -#include - -#endif // vtk_m_filter_DataSetFilter_h diff --git a/vtkm/filter/FilterDataSet.hxx b/vtkm/filter/FilterDataSet.hxx deleted file mode 100644 index 04df41b17..000000000 --- a/vtkm/filter/FilterDataSet.hxx +++ /dev/null @@ -1,82 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include -#include -#include - -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterDataSet::FilterDataSet() - : CoordinateSystemIndex(0) -{ -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterDataSet::~FilterDataSet() -{ -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT vtkm::cont::DataSet FilterDataSet::PrepareForExecution( - const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy) -{ - return (static_cast(this))->DoExecute(input, policy); -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT bool FilterDataSet::MapFieldOntoOutput( - vtkm::cont::DataSet& result, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy) -{ - bool valid = false; - - vtkm::filter::FieldMetadata metaData(field); - using FunctorType = internal::ResolveFieldTypeAndMap; - FunctorType functor(static_cast(this), result, metaData, policy, valid); - - try - { - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicyFieldNotActive(field, policy), functor); - } - catch (vtkm::cont::ErrorBadType& error) - { - VTKM_LOG_S(vtkm::cont::LogLevel::Warn, - "Failed to map field " << field.GetName() - << " because it is an unknown type. Cast error:\n" - << error.GetMessage()); - (void)error; // Suppress unused error message if logging is turned off. - } - - //the bool valid will be modified by the map algorithm to hold if the - //mapping occurred or not. If the mapping was good a new field has been - //added to the result that was passed in. - return valid; -} -} -} diff --git a/vtkm/filter/FilterDataSetWithField.h b/vtkm/filter/FilterDataSetWithField.h deleted file mode 100644 index 4a93d237f..000000000 --- a/vtkm/filter/FilterDataSetWithField.h +++ /dev/null @@ -1,120 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_DataSetWithFieldFilter_h -#define vtk_m_filter_DataSetWithFieldFilter_h - -#include -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -class VTKM_DEPRECATED(1.9, "Use vtkm::filter::NewFilterField.") FilterDataSetWithField - : public vtkm::filter::Filter -{ -public: - VTKM_CONT - FilterDataSetWithField(); - - VTKM_CONT - ~FilterDataSetWithField(); - - VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } - - VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } - - ///@{ - /// Choose the field to operate on. Note, if - /// `this->UseCoordinateSystemAsField` is true, then the active field is not used. - VTKM_CONT - void SetActiveField( - const std::string& name, - vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any) - { - this->ActiveFieldName = name; - this->ActiveFieldAssociation = association; - } - - VTKM_CONT const std::string& GetActiveFieldName() const { return this->ActiveFieldName; } - VTKM_CONT vtkm::cont::Field::Association GetActiveFieldAssociation() const - { - return this->ActiveFieldAssociation; - } - ///@} - - ///@{ - /// To simply use the active coordinate system as the field to operate on, set - /// UseCoordinateSystemAsField to true. - VTKM_CONT - void SetUseCoordinateSystemAsField(bool val) { this->UseCoordinateSystemAsField = val; } - VTKM_CONT - bool GetUseCoordinateSystemAsField() const { return this->UseCoordinateSystemAsField; } - ///@} - - //From the field we can extract the association component - // Association::Any -> unable to map - // Association::WholeDataSet -> (I think this is points) - // Association::Points -> map using point mapping - // Association::Cells -> how do we map this? - template - VTKM_CONT bool MapFieldOntoOutput(vtkm::cont::DataSet& result, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy); - - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy); - -protected: - vtkm::filter::FilterDataSetWithField& operator=( - const vtkm::filter::FilterDataSetWithField&) = default; - - VTKM_CONT - void CopyStateFrom(const FilterDataSetWithField* filter) { *this = *filter; } - -private: - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy); - - //How do we specify float/double coordinate types? - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - vtkm::filter::PolicyBase policy); - - std::string OutputFieldName; - vtkm::Id CoordinateSystemIndex; - std::string ActiveFieldName; - vtkm::cont::Field::Association ActiveFieldAssociation; - bool UseCoordinateSystemAsField; - - friend class vtkm::filter::Filter; -}; -VTKM_DEPRECATED_SUPPRESS_END -} -} // namespace vtkm::filter - -#include - -#endif // vtk_m_filter_DataSetWithFieldFilter_h diff --git a/vtkm/filter/FilterDataSetWithField.hxx b/vtkm/filter/FilterDataSetWithField.hxx deleted file mode 100644 index d42442606..000000000 --- a/vtkm/filter/FilterDataSetWithField.hxx +++ /dev/null @@ -1,141 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include -#include -#include - -#include -#include - -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterDataSetWithField::FilterDataSetWithField() - : OutputFieldName() - , CoordinateSystemIndex(0) - , ActiveFieldName() - , ActiveFieldAssociation(vtkm::cont::Field::Association::Any) - , UseCoordinateSystemAsField(false) -{ -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterDataSetWithField::~FilterDataSetWithField() -{ -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT vtkm::cont::DataSet FilterDataSetWithField::PrepareForExecution( - const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy) -{ - if (this->UseCoordinateSystemAsField) - { - // we need to state that the field is actually a coordinate system, so that - // the filter uses the proper policy to convert the types. - return this->PrepareForExecution(input, input.GetCoordinateSystem(), policy); - } - else - { - return this->PrepareForExecution( - input, input.GetField(this->GetActiveFieldName(), this->GetActiveFieldAssociation()), policy); - } -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT vtkm::cont::DataSet FilterDataSetWithField::PrepareForExecution( - const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy) -{ - vtkm::filter::FieldMetadata metaData(field); - vtkm::cont::DataSet result; - - vtkm::cont::CastAndCall( - vtkm::filter::ApplyPolicyFieldActive(field, policy, vtkm::filter::FilterTraits()), - internal::ResolveFieldTypeAndExecute(), - static_cast(this), - input, - metaData, - policy, - result); - return result; -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT vtkm::cont::DataSet FilterDataSetWithField::PrepareForExecution( - const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - vtkm::filter::PolicyBase policy) -{ - //We have a special signature just for CoordinateSystem, so that we can ask - //the policy for the storage types and value types just for coordinate systems - vtkm::filter::FieldMetadata metaData(field); - vtkm::cont::DataSet result; - - //determine the field type first - using Traits = vtkm::filter::FilterTraits; - constexpr bool supportsVec3 = - vtkm::ListHas::value; - using supportsCoordinateSystem = std::integral_constant; - vtkm::cont::ConditionalCastAndCall(supportsCoordinateSystem(), - field, - internal::ResolveFieldTypeAndExecute(), - static_cast(this), - input, - metaData, - policy, - result); - - return result; -} - -//----------------------------------------------------------------------------- -template -template -inline VTKM_CONT bool FilterDataSetWithField::MapFieldOntoOutput( - vtkm::cont::DataSet& result, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy) -{ - bool valid = false; - - vtkm::filter::FieldMetadata metaData(field); - using FunctorType = internal::ResolveFieldTypeAndMap; - FunctorType functor(static_cast(this), result, metaData, policy, valid); - - vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicyFieldNotActive(field, policy), functor); - - //the bool valid will be modified by the map algorithm to hold if the - //mapping occurred or not. If the mapping was good a new field has been - //added to the result that was passed in. - return valid; -} -} -} diff --git a/vtkm/filter/FilterField.h b/vtkm/filter/FilterField.h deleted file mode 100644 index ffc4bc4ef..000000000 --- a/vtkm/filter/FilterField.h +++ /dev/null @@ -1,123 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_FieldFilter_h -#define vtk_m_filter_FieldFilter_h - -#include -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -class VTKM_DEPRECATED(1.9, "Use vtkm::filter::NewFilterField.") FilterField - : public vtkm::filter::Filter -{ -public: - VTKM_CONT - FilterField(); - - VTKM_CONT - ~FilterField(); - - VTKM_CONT - void SetOutputFieldName(const std::string& name) { this->OutputFieldName = name; } - - VTKM_CONT - const std::string& GetOutputFieldName() const { return this->OutputFieldName; } - - ///@{ - /// Choose the field to operate on. Note, if - /// `this->UseCoordinateSystemAsField` is true, then the active field is not used. - VTKM_CONT - void SetActiveField( - const std::string& name, - vtkm::cont::Field::Association association = vtkm::cont::Field::Association::Any) - { - this->ActiveFieldName = name; - this->ActiveFieldAssociation = association; - } - - VTKM_CONT const std::string& GetActiveFieldName() const { return this->ActiveFieldName; } - VTKM_CONT vtkm::cont::Field::Association GetActiveFieldAssociation() const - { - return this->ActiveFieldAssociation; - } - ///@} - - ///@{ - /// To simply use the active coordinate system as the field to operate on, set - /// UseCoordinateSystemAsField to true. - VTKM_CONT - void SetUseCoordinateSystemAsField(bool val) { this->UseCoordinateSystemAsField = val; } - VTKM_CONT - bool GetUseCoordinateSystemAsField() const { return this->UseCoordinateSystemAsField; } - ///@} - - - ///@{ - /// Select the coordinate system index to make active to use when processing the input - /// DataSet. This is used primarily by the Filter to select the coordinate system - /// to use as a field when \c UseCoordinateSystemAsField is true. - VTKM_CONT - void SetActiveCoordinateSystem(vtkm::Id index) { this->CoordinateSystemIndex = index; } - - VTKM_CONT - vtkm::Id GetActiveCoordinateSystemIndex() const { return this->CoordinateSystemIndex; } - ///@} - - ///@{ - /// These are provided to satisfy the Filter API requirements. - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy); - - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy); - - template - VTKM_CONT vtkm::cont::DataSet PrepareForExecution(const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - vtkm::filter::PolicyBase policy); - ///@} - -protected: - vtkm::filter::FilterField& operator=(const vtkm::filter::FilterField&) = - default; - VTKM_CONT - void CopyStateFrom(const FilterField* filter) { *this = *filter; } - -private: - std::string OutputFieldName; - vtkm::Id CoordinateSystemIndex; - std::string ActiveFieldName; - vtkm::cont::Field::Association ActiveFieldAssociation; - bool UseCoordinateSystemAsField; - - friend class vtkm::filter::Filter; -}; -VTKM_DEPRECATED_SUPPRESS_END -} -} // namespace vtkm::filter - -#include - -#endif // vtk_m_filter_FieldFilter_h diff --git a/vtkm/filter/FilterField.hxx b/vtkm/filter/FilterField.hxx deleted file mode 100644 index a65a50bf2..000000000 --- a/vtkm/filter/FilterField.hxx +++ /dev/null @@ -1,119 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterField::FilterField() - : OutputFieldName() - , CoordinateSystemIndex(0) - , ActiveFieldName() - , ActiveFieldAssociation(vtkm::cont::Field::Association::Any) - , UseCoordinateSystemAsField(false) -{ -} - -//---------------------------------------------------------------------------- -template -inline VTKM_CONT FilterField::~FilterField() -{ -} - -//----------------------------------------------------------------------------- -template -template -VTKM_CONT vtkm::cont::DataSet FilterField::PrepareForExecution( - const vtkm::cont::DataSet& input, - vtkm::filter::PolicyBase policy) -{ - if (this->UseCoordinateSystemAsField) - { - // we need to state that the field is actually a coordinate system, so that - // the filter uses the proper policy to convert the types. - return this->PrepareForExecution( - input, input.GetCoordinateSystem(this->GetActiveCoordinateSystemIndex()), policy); - } - else - { - return this->PrepareForExecution( - input, input.GetField(this->GetActiveFieldName(), this->GetActiveFieldAssociation()), policy); - } -} - -//----------------------------------------------------------------------------- -template -template -VTKM_CONT vtkm::cont::DataSet FilterField::PrepareForExecution( - const vtkm::cont::DataSet& input, - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase policy) -{ - vtkm::filter::FieldMetadata metaData(field); - vtkm::cont::DataSet result; - - vtkm::cont::CastAndCall( - vtkm::filter::ApplyPolicyFieldActive(field, policy, vtkm::filter::FilterTraits()), - internal::ResolveFieldTypeAndExecute(), - static_cast(this), - input, - metaData, - policy, - result); - return result; -} - -//----------------------------------------------------------------------------- -template -template -VTKM_CONT vtkm::cont::DataSet FilterField::PrepareForExecution( - const vtkm::cont::DataSet& input, - const vtkm::cont::CoordinateSystem& field, - vtkm::filter::PolicyBase policy) -{ - //We have a special signature just for CoordinateSystem, so that we can ask - //the policy for the storage types and value types just for coordinate systems - vtkm::filter::FieldMetadata metaData(field); - vtkm::cont::DataSet result; - - using Traits = vtkm::filter::FilterTraits; - constexpr bool supportsVec3 = - vtkm::ListHas::value; - - using supportsCoordinateSystem = std::integral_constant; - vtkm::cont::ConditionalCastAndCall(supportsCoordinateSystem(), - field, - internal::ResolveFieldTypeAndExecute(), - static_cast(this), - input, - metaData, - policy, - result); - - return result; -} -} -} diff --git a/vtkm/filter/FilterTraits.h b/vtkm/filter/FilterTraits.h deleted file mode 100644 index c7b85428d..000000000 --- a/vtkm/filter/FilterTraits.h +++ /dev/null @@ -1,50 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_FilterTraits_h -#define vtk_m_filter_FilterTraits_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -template -class Filter; - - -template -struct VTKM_DEPRECATED(1.9) FilterTraits -{ - using InputFieldTypeList = typename Filter::SupportedTypes; - using AdditionalFieldStorage = typename Filter::AdditionalFieldStorage; -}; - -template -struct VTKM_DEPRECATED(1.9) DeduceFilterFieldTypes -{ - using PList = typename DerivedPolicy::FieldTypeList; - using TypeList = vtkm::ListIntersect; -}; - -template -struct VTKM_DEPRECATED(1.9) DeduceFilterFieldStorage -{ - using PList = typename DerivedPolicy::StorageList; - using StorageList = vtkm::ListAppend; -}; - -} -} - -#endif //vtk_m_filter_FilterTraits_h diff --git a/vtkm/filter/GenerateIds.h b/vtkm/filter/GenerateIds.h deleted file mode 100644 index 01f529968..000000000 --- a/vtkm/filter/GenerateIds.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_GenerateIds_h -#define vtk_m_filter_GenerateIds_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_transform/GenerateIds.h instead of vtkm/filter/GenerateIds.h.") -inline void GenerateIds_deprecated() {} - -inline void GenerateIds_deprecated_warning() -{ - GenerateIds_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_GenerateIds_h diff --git a/vtkm/filter/GhostCellClassify.h b/vtkm/filter/GhostCellClassify.h deleted file mode 100644 index c7b6a2336..000000000 --- a/vtkm/filter/GhostCellClassify.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_GhostCellClassify_h -#define vtk_m_filter_GhostCellClassify_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/mesh_info/GhostCellClassify.h instead of vtkm/filter/GhostCellClassify.h.") -inline void GhostCellClassify_deprecated() {} - -inline void GhostCellClassify_deprecated_warning() -{ - GhostCellClassify_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_GhostCellClassify_h diff --git a/vtkm/filter/GhostCellRemove.h b/vtkm/filter/GhostCellRemove.h deleted file mode 100644 index 4da23781a..000000000 --- a/vtkm/filter/GhostCellRemove.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_GhostCellRemove_h -#define vtk_m_filter_GhostCellRemove_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/GhostCellRemove.h instead of vtkm/filter/GhostCellRemove.h.") -inline void GhostCellRemove_deprecated() {} - -inline void GhostCellRemove_deprecated_warning() -{ - GhostCellRemove_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_GhostCellRemove_h diff --git a/vtkm/filter/Gradient.h b/vtkm/filter/Gradient.h deleted file mode 100644 index 7faf4b53b..000000000 --- a/vtkm/filter/Gradient.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Gradient_h -#define vtk_m_filter_Gradient_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/vector_analysis/Gradient.h instead of vtkm/filter/Gradient.h.") -inline void Gradient_deprecated() {} - -inline void Gradient_deprecated_warning() -{ - Gradient_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Gradient_h diff --git a/vtkm/filter/Histogram.h b/vtkm/filter/Histogram.h deleted file mode 100644 index 9f75ad9f6..000000000 --- a/vtkm/filter/Histogram.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Histogram_h -#define vtk_m_filter_Histogram_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/density_estimate/Histogram.h instead of vtkm/filter/Histogram.h.") -inline void Histogram_deprecated() {} - -inline void Histogram_deprecated_warning() -{ - Histogram_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Histogram_h diff --git a/vtkm/filter/ImageConnectivity.h b/vtkm/filter/ImageConnectivity.h deleted file mode 100644 index 2f56c087c..000000000 --- a/vtkm/filter/ImageConnectivity.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ImageConnectivity_h -#define vtk_m_filter_ImageConnectivity_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/connected_components/ImageConnectivity.h instead of " - "vtkm/filter/ImageConnectivity.h.") -inline void ImageConnectivity_deprecated() {} - -inline void ImageConnectivity_deprecated_warning() -{ - ImageConnectivity_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ImageConnectivity_h diff --git a/vtkm/filter/ImageDifference.h b/vtkm/filter/ImageDifference.h deleted file mode 100644 index 15dd2dd9a..000000000 --- a/vtkm/filter/ImageDifference.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ImageDifference_h -#define vtk_m_filter_ImageDifference_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/image_processing/ImageDifference.h instead of vtkm/filter/ImageDifference.h.") -inline void ImageDifference_deprecated() {} - -inline void ImageDifference_deprecated_warning() -{ - ImageDifference_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ImageDifference_h diff --git a/vtkm/filter/ImageMedian.h b/vtkm/filter/ImageMedian.h deleted file mode 100644 index 377c68d96..000000000 --- a/vtkm/filter/ImageMedian.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ImageMedian_h -#define vtk_m_filter_ImageMedian_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/image_processing/ImageMedian.h instead of vtkm/filter/ImageMedian.h.") -inline void ImageMedian_deprecated() {} - -inline void ImageMedian_deprecated_warning() -{ - ImageMedian_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ImageMedian_h diff --git a/vtkm/filter/Instantiations.h b/vtkm/filter/Instantiations.h deleted file mode 100644 index 27c3e42c4..000000000 --- a/vtkm/filter/Instantiations.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_Instantiations_h -#define vtk_m_filter_Instantiations_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/internal/Instantiations.h instead of vtkm/filter/Instantiations.h") -inline void Instantiations_deprecated() {} - -inline void Instantiations_deprecated_warning() -{ - Instantiations_deprecated(); -} - -} // namespace vtkm -} // namespace filter - -#endif //vtk_m_filter_Instantiations_h diff --git a/vtkm/filter/Lagrangian.h b/vtkm/filter/Lagrangian.h deleted file mode 100644 index 3ab00a305..000000000 --- a/vtkm/filter/Lagrangian.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Lagrangian_h -#define vtk_m_filter_Lagrangian_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/flow/Lagrangian.h instead of vtkm/filter/Lagrangian.h") -inline void Lagrangian_deprecated() {} - -inline void Lagrangian_deprecated_warning() -{ - Lagrangian_deprecated(); -} - -} -} - -#endif //vtk_m_filter_Lagrangian_h diff --git a/vtkm/filter/LagrangianStructures.h b/vtkm/filter/LagrangianStructures.h deleted file mode 100644 index a423bd146..000000000 --- a/vtkm/filter/LagrangianStructures.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_LagrangianStructures_h -#define vtk_m_filter_LagrangianStructures_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/flow/LagrangianStructures.h instead of vtkm/filter/LagrangianStructures.h") -inline void LagrangianStructures_deprecated() {} - -inline void LagrangianStructures_deprecated_warning() -{ - LagrangianStructures_deprecated(); -} - -} -} - -#endif //vtk_m_filter_LagrangnianStructures_h diff --git a/vtkm/filter/MIRFilter.h b/vtkm/filter/MIRFilter.h deleted file mode 100644 index 8550d6152..000000000 --- a/vtkm/filter/MIRFilter.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_MIRFilter_h -#define vtk_m_filter_MIRFilter_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/contour/MIRFilter.h instead of vtkm/filter/MIRFilter.h.") -inline void MIRFilter_deprecated() {} - -inline void MIRFilter_deprecated_warning() -{ - MIRFilter_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_MIRFilter_h diff --git a/vtkm/filter/Mask.h b/vtkm/filter/Mask.h deleted file mode 100644 index a58c82a98..000000000 --- a/vtkm/filter/Mask.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Mask_h -#define vtk_m_filter_Mask_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/entity_extraction/Mask.h instead of vtkm/filter/Mask.h.") -inline void Mask_deprecated() {} - -inline void Mask_deprecated_warning() -{ - Mask_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Mask_h diff --git a/vtkm/filter/MaskPoints.h b/vtkm/filter/MaskPoints.h deleted file mode 100644 index 6547a3d2b..000000000 --- a/vtkm/filter/MaskPoints.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_MaskPoints_h -#define vtk_m_filter_MaskPoints_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/MaskPoints.h instead of vtkm/filter/MaskPoints.h.") -inline void MaskPoints_deprecated() {} - -inline void MaskPoints_deprecated_warning() -{ - MaskPoints_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_MaskPoints_h diff --git a/vtkm/filter/MeshQuality.h b/vtkm/filter/MeshQuality.h deleted file mode 100644 index 61ab2ffb1..000000000 --- a/vtkm/filter/MeshQuality.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_MeshQuality_h -#define vtk_m_filter_MeshQuality_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/mesh_info/MeshQuality.h instead of vtkm/filter/MeshQuality.h.") -inline void MeshQuality_deprecated() {} - -inline void MeshQuality_deprecated_warning() -{ - MeshQuality_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_MeshQuality_h diff --git a/vtkm/filter/NDEntropy.h b/vtkm/filter/NDEntropy.h deleted file mode 100644 index c54b51350..000000000 --- a/vtkm/filter/NDEntropy.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_NDEntropy_h -#define vtk_m_filter_NDEntropy_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/density_estimate/NDEntropy.h instead of vtkm/filter/NDEntropy.h.") -inline void NDEntropy_deprecated() {} - -inline void NDEntropy_deprecated_warning() -{ - NDEntropy_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_NDEntropy_h diff --git a/vtkm/filter/NDHistogram.h b/vtkm/filter/NDHistogram.h deleted file mode 100644 index 8f0e37abf..000000000 --- a/vtkm/filter/NDHistogram.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_NDHistogram_h -#define vtk_m_filter_NDHistogram_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/density_estimate/NDHistogram.h instead of vtkm/filter/NDHistogram.h.") -inline void NDHistogram_deprecated() {} - -inline void NDHistogram_deprecated_warning() -{ - NDHistogram_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_NDHistogram_h diff --git a/vtkm/filter/ParticleAdvection.h b/vtkm/filter/ParticleAdvection.h deleted file mode 100644 index b395c0f91..000000000 --- a/vtkm/filter/ParticleAdvection.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ParticleAdvection_h -#define vtk_m_filter_ParticleAdvection_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/flow/ParticleAdvection.h instead of vtkm/filter/ParticleAdvection.h") -inline void ParticleAdvection_deprecated() {} - -inline void ParticleAdvection_deprecated_warning() -{ - ParticleAdvection_deprecated(); -} - -} -} - -#endif //vtk_m_filter_ParticleAdvection_h diff --git a/vtkm/filter/ParticleDensityCloudInCell.h b/vtkm/filter/ParticleDensityCloudInCell.h deleted file mode 100644 index 01aa90829..000000000 --- a/vtkm/filter/ParticleDensityCloudInCell.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ParticleDensityCloudInCell_h -#define vtk_m_filter_ParticleDensityCloudInCell_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/density_estimate/ParticleDensityCloudInCell.h instead of " - "vtkm/filter/ParticleDensityCloudInCell.h.") -inline void ParticleDensityCloudInCell_deprecated() {} - -inline void ParticleDensityCloudInCell_deprecated_warning() -{ - ParticleDensityCloudInCell_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ParticleDensityCloudInCell_h diff --git a/vtkm/filter/ParticleDensityNearestGridPoint.h b/vtkm/filter/ParticleDensityNearestGridPoint.h deleted file mode 100644 index cec7c7e44..000000000 --- a/vtkm/filter/ParticleDensityNearestGridPoint.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ParticleDensityNearestGridPoint_h -#define vtk_m_filter_ParticleDensityNearestGridPoint_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.h instead of " - "vtkm/filter/ParticleDensityNearestGridPoint.h.") -inline void ParticleDensityNearestGridPoint_deprecated() {} - -inline void ParticleDensityNearestGridPoint_deprecated_warning() -{ - ParticleDensityNearestGridPoint_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ParticleDensityNearestGridPoint_h diff --git a/vtkm/filter/PathParticle.h b/vtkm/filter/PathParticle.h deleted file mode 100644 index 064948881..000000000 --- a/vtkm/filter/PathParticle.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_PathParticle_h -#define vtk_m_filter_PathParticle_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/flow/PathParticle.h instead of vtkm/filter/PathParticle.h") -inline void PathParticle_deprecated() {} - -inline void PathParticle_deprecated_warning() -{ - PathParticle_deprecated(); -} - -} -} - -#endif //vtk_m_filter_PathParticle_h diff --git a/vtkm/filter/Pathline.h b/vtkm/filter/Pathline.h deleted file mode 100644 index 03c5df89b..000000000 --- a/vtkm/filter/Pathline.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Pathline_h -#define vtk_m_filter_Pathline_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/flow/Pathline.h instead of vtkm/filter/Pathline.h") -inline void Pathline_deprecated() {} - -inline void Pathline_deprecated_warning() -{ - Pathline_deprecated(); -} - -} -} - -#endif //vtk_m_filter_Pathline_h diff --git a/vtkm/filter/PointAverage.h b/vtkm/filter/PointAverage.h deleted file mode 100644 index 874782c0c..000000000 --- a/vtkm/filter/PointAverage.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_PointAverage_h -#define vtk_m_filter_PointAverage_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_conversion/PointAverage.h instead of vtkm/filter/PointAverage.h.") -inline void PointAverage_deprecated() {} - -inline void PointAverage_deprecated_warning() -{ - PointAverage_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_PointAverage_h diff --git a/vtkm/filter/PointElevation.h b/vtkm/filter/PointElevation.h deleted file mode 100644 index b11b1a928..000000000 --- a/vtkm/filter/PointElevation.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_PointElevation_h -#define vtk_m_filter_PointElevation_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_transform/PointElevation.h instead of vtkm/filter/PointElevation.h.") -inline void PointElevation_deprecated() {} - -inline void PointElevation_deprecated_warning() -{ - PointElevation_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_PointElevation_h diff --git a/vtkm/filter/PointTransform.h b/vtkm/filter/PointTransform.h deleted file mode 100644 index 5cb5c5a69..000000000 --- a/vtkm/filter/PointTransform.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_PointTransform_h -#define vtk_m_filter_PointTransform_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/field_transform/PointTransform.h instead of vtkm/filter/PointTransform.h.") -inline void PointTransform_deprecated() {} - -inline void PointTransform_deprecated_warning() -{ - PointTransform_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_PointTransform_h diff --git a/vtkm/filter/PolicyBase.h b/vtkm/filter/PolicyBase.h deleted file mode 100644 index 2b3b539f6..000000000 --- a/vtkm/filter/PolicyBase.h +++ /dev/null @@ -1,486 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_PolicyBase_h -#define vtk_m_filter_PolicyBase_h - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace vtkm -{ -namespace filter -{ - -template -struct VTKM_DEPRECATED(1.9) PolicyBase -{ - using FieldTypeList = vtkm::ListUniversal; - using StorageList = VTKM_DEFAULT_STORAGE_LIST; - - using StructuredCellSetList = VTKM_DEFAULT_CELL_SET_LIST_STRUCTURED; - using UnstructuredCellSetList = VTKM_DEFAULT_CELL_SET_LIST_UNSTRUCTURED; - using AllCellSetList = VTKM_DEFAULT_CELL_SET_LIST; -}; - -namespace internal -{ - -namespace detail -{ - -// Given a base type, forms a list of all types with the same Vec structure but with the -// base component replaced with each of the basic C types. -template -struct AllCastingTypes -{ - using VTraits = vtkm::VecTraits; - - using type = vtkm::List, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType, - typename VTraits::template ReplaceBaseComponentType>; -}; - -// Provides a transform template that builds a cast from an array of some source type to a -// cast array to a specific target type. -template -struct CastArrayTransform -{ - template - using Transform = vtkm::cont::ArrayHandleCast>; -}; - -// Provides a predicate for a particular storage that resolves to std::true_type if a given -// type cannot be used with the storage. -template -struct ArrayValidPredicate -{ - template - using Predicate = vtkm::cont::internal::IsInvalidArrayHandle; -}; - -template -struct AllCastArraysForStorageImpl; - -template -struct ValidCastingTypes -{ - using type = vtkm::ListRemoveIf::type, - ArrayValidPredicate::template Predicate>; -}; - -template -struct AllCastArraysForStorageImpl -{ - using SourceTypes = typename ValidCastingTypes::type; - using CastArrays = - vtkm::ListTransform::template Transform>; - using type = vtkm::ListAppend>, CastArrays>; -}; - -template -struct AllCastArraysForStorageImpl -{ - using SourceTypes = typename ValidCastingTypes::type; - using type = - vtkm::ListTransform::template Transform>; -}; - -// Special cases for known storage with limited type support. -template <> -struct AllCastArraysForStorageImpl -{ - using type = vtkm::List; -}; -template -struct AllCastArraysForStorageImpl, - vtkm::cont::ArrayHandleUniformPointCoordinates::StorageTag, - false> -{ - using type = vtkm::List, - vtkm::cont::ArrayHandle>>; -}; -template -struct AllCastArraysForStorageImpl -{ - using type = vtkm::ListEmpty; -}; - -template -struct AllCastArraysForStorageImpl, - vtkm::cont::StorageTagCartesianProduct, - true> -{ - using type = vtkm::List, - vtkm::cont::ArrayHandle, - vtkm::cont::ArrayHandle>>; -}; -template -struct AllCastArraysForStorageImpl, - false> -{ - using type = vtkm::ListEmpty; -}; - -#ifdef VTKM_ADD_XGC_DEFAULT_TYPES -template -struct AllCastArraysForStorageImpl, vtkm::cont::StorageTagXGCCoordinates, true> -{ - using type = vtkm::List>; -}; -template -struct AllCastArraysForStorageImpl -{ - using type = vtkm::ListEmpty; -}; -#endif - -// Given a target type and storage of an array handle, provides a list this array handle plus all -// array handles that can be cast to the target type wrapped in an ArrayHandleCast that does so. -template -struct AllCastArraysForStorage -{ - using type = typename AllCastArraysForStorageImpl< - TargetT, - Storage, - vtkm::cont::internal::IsValidArrayHandle::value>::type; -}; - -// Provides a transform template that converts a storage type to a list of all arrays that come -// from that storage type and can be cast to a target type (wrapped in an ArrayHandleCast as -// appropriate). -template -struct AllCastArraysTransform -{ - template - using Transform = typename AllCastArraysForStorage::type; -}; - -// Given a target type and a list of storage types, provides a joined list of all possible arrays -// of any of these storage cast to the target type. -template -struct AllCastArraysForStorageList -{ - VTKM_IS_LIST(StorageList); - using listOfLists = - vtkm::ListTransform::template Transform>; - using type = vtkm::ListApply; -}; - -} // detail - -template -using ArrayHandleMultiplexerForStorageList = vtkm::cont::ArrayHandleMultiplexerFromList< - typename detail::AllCastArraysForStorageList::type>; - -} // namespace internal - -//----------------------------------------------------------------------------- -/// \brief Get an array from a `Field` that is not the active field. -/// -/// Use this form for getting a `Field` when you don't know the type and it is not -/// (necessarily) the "active" field of the filter. It is generally used for arrays -/// passed to the `DoMapField` method of filters. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::UncertainArrayHandle< - typename std::conditional< - std::is_same::value, - VTKM_DEFAULT_TYPE_LIST, - typename DerivedPolicy::FieldTypeList>::type, - typename DerivedPolicy::StorageList> ApplyPolicyFieldNotActive(const vtkm::cont::Field& field, - vtkm::filter::PolicyBase< - DerivedPolicy>) -{ - // Policies are on their way out, but until they are we want to respect them. In the mean - // time, respect the policy if it is defined. - using TypeList = typename std::conditional< - std::is_same::value, - VTKM_DEFAULT_TYPE_LIST, - typename DerivedPolicy::FieldTypeList>::type; - return field.GetData().ResetTypes(TypeList{}, typename DerivedPolicy::StorageList{}); -} - -//----------------------------------------------------------------------------- -/// \brief Get an `ArrayHandle` of a specific type from a `Field`. -/// -/// Use this form of `ApplyPolicy` when you know what the value type of a field is or -/// (more likely) there is a type you are going to cast it to anyway. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT internal::ArrayHandleMultiplexerForStorageList< - T, - vtkm::ListAppend::AdditionalFieldStorage, - typename DerivedPolicy:: - StorageList>> ApplyPolicyFieldOfType(const vtkm::cont::Field& field, - vtkm::filter::PolicyBase, - const FilterType&) -{ - using ArrayHandleMultiplexerType = internal::ArrayHandleMultiplexerForStorageList< - T, - vtkm::ListAppend>; - return field.GetData().AsArrayHandle(); -} - -//----------------------------------------------------------------------------- -/// \brief Get an array from a `Field` that follows the types of an active field. -/// -/// Use this form for getting a `Field` to build the types that are appropriate for -/// the active field of this filter. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::UncertainArrayHandle< - typename vtkm::filter::DeduceFilterFieldTypes< - DerivedPolicy, - typename vtkm::filter::FilterTraits::InputFieldTypeList>::TypeList, - typename vtkm::filter::DeduceFilterFieldStorage< - DerivedPolicy, - typename vtkm::filter::FilterTraits::AdditionalFieldStorage>:: - StorageList> ApplyPolicyFieldActive(const vtkm::cont::Field& field, - vtkm::filter::PolicyBase, - vtkm::filter::FilterTraits) -{ - using FilterTypes = typename vtkm::filter::FilterTraits::InputFieldTypeList; - using TypeList = - typename vtkm::filter::DeduceFilterFieldTypes::TypeList; - using FilterStorage = typename vtkm::filter::FilterTraits::AdditionalFieldStorage; - using StorageList = - typename vtkm::filter::DeduceFilterFieldStorage::StorageList; - return field.GetData().ResetTypes(TypeList{}, StorageList{}); -} - -//----------------------------------------------------------------------------- -/// \brief Ge a cell set from a `UnknownCellSet` object. -/// -/// Adjusts the types of `CellSet`s to support those types specified in a policy. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::UncertainCellSet< - vtkm::ListAppend> ApplyPolicyCellSet(const vtkm::cont::UnknownCellSet& cellset, - vtkm::filter::PolicyBase, - const vtkm::filter::Filter&) -{ - using CellSetList = vtkm::ListAppend; - return cellset.ResetCellSetList(CellSetList()); -} - -template -VTKM_DEPRECATED(1.6, "ApplyPolicyCellSet now takes the filter as an argument.") -VTKM_CONT vtkm::cont::UncertainCellSet ApplyPolicyCellSet( - const vtkm::cont::UnknownCellSet& cellset, - vtkm::filter::PolicyBase) -{ - using CellSetList = typename DerivedPolicy::AllCellSetList; - return cellset.ResetCellSetList(CellSetList()); -} - -//----------------------------------------------------------------------------- -/// \brief Get a structured cell set from a `UnknownCellSet` object. -/// -/// Adjusts the types of `CellSet`s to support those structured cell set types -/// specified in a policy. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::UncertainCellSet> ApplyPolicyCellSetStructured(const vtkm::cont::UnknownCellSet& cellset, - vtkm::filter::PolicyBase, - const vtkm::filter::Filter&) -{ - using CellSetList = vtkm::ListAppend; - return cellset.ResetCellSetList(CellSetList()); -} - -template -VTKM_DEPRECATED(1.6, "ApplyPolicyCellSetStructured now takes the filter as an argument.") -VTKM_CONT vtkm::cont:: - UncertainCellSet ApplyPolicyCellSetStructured( - const vtkm::cont::UnknownCellSet& cellset, - vtkm::filter::PolicyBase) -{ - using CellSetList = typename DerivedPolicy::StructuredCellSetList; - return cellset.ResetCellSetList(CellSetList()); -} - -//----------------------------------------------------------------------------- -/// \brief Get an unstructured cell set from a `UnknownCellSet` object. -/// -/// Adjusts the types of `CellSet`s to support those unstructured cell set types -/// specified in a policy. -/// -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::UncertainCellSet> ApplyPolicyCellSetUnstructured(const vtkm::cont::UnknownCellSet& - cellset, - vtkm::filter::PolicyBase< - DerivedPolicy>, - const vtkm::filter::Filter< - DerivedFilter>&) -{ - using CellSetList = vtkm::ListAppend; - return cellset.ResetCellSetList(CellSetList()); -} - -template -VTKM_DEPRECATED(1.6, "ApplyPolicyCellSetUnstructured now takes the filter as an argument.") -VTKM_CONT vtkm::cont:: - UncertainCellSet ApplyPolicyCellSetUnstructured( - const vtkm::cont::UnknownCellSet& cellset, - vtkm::filter::PolicyBase) -{ - using CellSetList = typename DerivedPolicy::UnstructuredCellSetList; - return cellset.ResetCellSetList(CellSetList()); -} - -//----------------------------------------------------------------------------- -VTKM_DEPRECATED_SUPPRESS_BEGIN -template -VTKM_DEPRECATED(1.6, "MakeSerializableField is no longer needed.") -VTKM_CONT - vtkm::cont::SerializableField MakeSerializableField( - vtkm::filter::PolicyBase) -{ - return {}; -} - -template -VTKM_DEPRECATED(1.6, "MakeSerializableField is no longer needed.") -VTKM_CONT - vtkm::cont::SerializableField MakeSerializableField( - const vtkm::cont::Field& field, - vtkm::filter::PolicyBase) -{ - return vtkm::cont::SerializableField{ field }; -} -VTKM_DEPRECATED_SUPPRESS_END - -template -VTKM_DEPRECATED(1.6, "MakeSerializableDataSet now takes the filter as an argument.") -VTKM_CONT vtkm::cont::SerializableDataSet< - typename DerivedPolicy::FieldTypeList, - typename DerivedPolicy::AllCellSetList> MakeSerializableDataSet(vtkm::filter:: - PolicyBase) -{ - return {}; -} - -// TODO: Make DataSet serializable (issue #725). -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::SerializableDataSet< - typename DerivedPolicy::FieldTypeList, - vtkm::ListAppend< - typename DerivedFilter::SupportedCellSets, - typename DerivedPolicy::AllCellSetList>> MakeSerializableDataSet(vtkm::filter:: - PolicyBase, - const vtkm::filter::Filter< - DerivedFilter>&) -{ - return {}; -} - -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::SerializableDataSet< - VTKM_DEFAULT_TYPE_LIST, - typename DerivedFilter::SupportedCellSets> MakeSerializableDataSet(const vtkm::filter:: - Filter&) -{ - return {}; -} - -template -VTKM_DEPRECATED(1.6, "MakeSerializableDataSet now takes the filter as an argument.") -VTKM_CONT vtkm::cont::SerializableDataSet< - typename DerivedPolicy::FieldTypeList, - typename DerivedPolicy::AllCellSetList> MakeSerializableDataSet(const vtkm::cont::DataSet& - dataset, - vtkm::filter::PolicyBase< - DerivedPolicy>) -{ - return vtkm::cont::SerializableDataSet{ dataset }; -} - -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::SerializableDataSet< - typename DerivedPolicy::FieldTypeList, - vtkm::ListAppend< - typename DerivedFilter::SupportedCellSets, - typename DerivedPolicy:: - AllCellSetList>> MakeSerializableDataSet(const vtkm::cont::DataSet& dataset, - vtkm::filter::PolicyBase, - const vtkm::filter::Filter&) -{ - return vtkm::cont::SerializableDataSet>{ - dataset - }; -} - -template -VTKM_DEPRECATED(1.9) -VTKM_CONT vtkm::cont::SerializableDataSet< - VTKM_DEFAULT_TYPE_LIST, - typename DerivedFilter::SupportedCellSets> MakeSerializableDataSet(const vtkm::cont::DataSet& - dataset, - const vtkm::filter::Filter< - DerivedFilter>&) -{ - return vtkm::cont::SerializableDataSet{ dataset }; -} -} -} // vtkm::filter - -#endif //vtk_m_filter_PolicyBase_h diff --git a/vtkm/filter/PolicyDefault.h b/vtkm/filter/PolicyDefault.h deleted file mode 100644 index 985a384b5..000000000 --- a/vtkm/filter/PolicyDefault.h +++ /dev/null @@ -1,28 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_filter_PolicyDefault_h -#define vtk_m_filter_PolicyDefault_h - -#include - -namespace vtkm -{ -namespace filter -{ - -struct VTKM_DEPRECATED(1.9) PolicyDefault : vtkm::filter::PolicyBase -{ - // Inherit defaults from PolicyBase -}; -} -} - -#endif //vtk_m_filter_PolicyDefault_h diff --git a/vtkm/filter/Probe.h b/vtkm/filter/Probe.h deleted file mode 100644 index d0ba730ca..000000000 --- a/vtkm/filter/Probe.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Probe_h -#define vtk_m_filter_Probe_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/resampling/Probe.h instead of vtkm/filter/Probe.h.") -inline void Probe_deprecated() {} - -inline void Probe_deprecated_warning() -{ - Probe_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Probe_h diff --git a/vtkm/filter/Slice.h b/vtkm/filter/Slice.h deleted file mode 100644 index d263d2a76..000000000 --- a/vtkm/filter/Slice.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Slice_h -#define vtk_m_filter_Slice_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/contour/Slice.h instead of vtkm/filter/Slice.h.") -inline void Slice_deprecated() {} - -inline void Slice_deprecated_warning() -{ - Slice_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Slice_h diff --git a/vtkm/filter/SplitSharpEdges.h b/vtkm/filter/SplitSharpEdges.h deleted file mode 100644 index 24d59bd14..000000000 --- a/vtkm/filter/SplitSharpEdges.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_SplitSharpEdges_h -#define vtk_m_filter_SplitSharpEdges_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/geometry_refinement/SplitSharpEdges.h instead of vtkm/filter/SplitSharpEdges.h.") -inline void SplitSharpEdges_deprecated() {} - -inline void SplitSharpEdges_deprecated_warning() -{ - SplitSharpEdges_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_SplitSharpEdges_h diff --git a/vtkm/filter/StreamSurface.h b/vtkm/filter/StreamSurface.h deleted file mode 100644 index 362c38e91..000000000 --- a/vtkm/filter/StreamSurface.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_StreamSurface_h -#define vtk_m_filter_StreamSurface_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/flow/StreamSurface.h instead of vtkm/filter/StreamSurface.h") -inline void StreamSurface_deprecated() {} - -inline void StreamSurface_deprecated_warning() -{ - StreamSurface_deprecated(); -} - -} -} - -#endif //vtk_m_filter_StreamSurface_h diff --git a/vtkm/filter/Streamline.h b/vtkm/filter/Streamline.h deleted file mode 100644 index 39356dac3..000000000 --- a/vtkm/filter/Streamline.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Streamline_h -#define vtk_m_filter_Streamline_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/flow/Streamline.h instead of vtkm/filter/Streamline.h") -inline void Streamline_deprecated() {} - -inline void Streamline_deprecated_warning() -{ - Streamline_deprecated(); -} - -} -} - -#endif //vtk_m_filter_Streamline_h diff --git a/vtkm/filter/SurfaceNormals.h b/vtkm/filter/SurfaceNormals.h deleted file mode 100644 index b72508ea4..000000000 --- a/vtkm/filter/SurfaceNormals.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_SurfaceNormals_h -#define vtk_m_filter_SurfaceNormals_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/vector_analysis/SurfaceNormals.h instead of vtkm/filter/SurfaceNormals.h.") -inline void SurfaceNormals_deprecated() {} - -inline void SurfaceNormals_deprecated_warning() -{ - SurfaceNormals_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_SurfaceNormals_h diff --git a/vtkm/filter/Tetrahedralize.h b/vtkm/filter/Tetrahedralize.h deleted file mode 100644 index cc01be273..000000000 --- a/vtkm/filter/Tetrahedralize.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Tetrahedralize_h -#define vtk_m_filter_Tetrahedralize_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/geometry_refinement/Tetrahedralize.h instead of vtkm/filter/Tetrahedralize.h.") -inline void Tetrahedralize_deprecated() {} - -inline void Tetrahedralize_deprecated_warning() -{ - Tetrahedralize_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Tetrahedralize_h diff --git a/vtkm/filter/Threshold.h b/vtkm/filter/Threshold.h deleted file mode 100644 index a14385451..000000000 --- a/vtkm/filter/Threshold.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Threshold_h -#define vtk_m_filter_Threshold_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/entity_extraction/Threshold.h instead of vtkm/filter/Threshold.h.") -inline void Threshold_deprecated() {} - -inline void Threshold_deprecated_warning() -{ - Threshold_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Threshold_h diff --git a/vtkm/filter/ThresholdPoints.h b/vtkm/filter/ThresholdPoints.h deleted file mode 100644 index 73839e19f..000000000 --- a/vtkm/filter/ThresholdPoints.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ThresholdPoints_h -#define vtk_m_filter_ThresholdPoints_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/entity_extraction/ThresholdPoints.h instead of vtkm/filter/ThresholdPoints.h.") -inline void ThresholdPoints_deprecated() {} - -inline void ThresholdPoints_deprecated_warning() -{ - ThresholdPoints_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ThresholdPoints_h diff --git a/vtkm/filter/Triangulate.h b/vtkm/filter/Triangulate.h deleted file mode 100644 index c79d94ff8..000000000 --- a/vtkm/filter/Triangulate.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Triangulate_h -#define vtk_m_filter_Triangulate_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/geometry_refinement/Triangulate.h instead of vtkm/filter/Triangulate.h.") -inline void Triangulate_deprecated() {} - -inline void Triangulate_deprecated_warning() -{ - Triangulate_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Triangulate_h diff --git a/vtkm/filter/Tube.h b/vtkm/filter/Tube.h deleted file mode 100644 index 588ba57f7..000000000 --- a/vtkm/filter/Tube.h +++ /dev/null @@ -1,32 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_Tube_h -#define vtk_m_filter_Tube_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, "Use vtkm/filter/geometry_refinement/Tube.h instead of vtkm/filter/Tube.h.") -inline void Tube_deprecated() {} - -inline void Tube_deprecated_warning() -{ - Tube_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_Tube_h diff --git a/vtkm/filter/VectorMagnitude.h b/vtkm/filter/VectorMagnitude.h deleted file mode 100644 index e28311dd3..000000000 --- a/vtkm/filter/VectorMagnitude.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_VectorMagnitude_h -#define vtk_m_filter_VectorMagnitude_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/vector_analysis/VectorMagnitude.h instead of vtkm/filter/VectorMagnitude.h.") -inline void VectorMagnitude_deprecated() {} - -inline void VectorMagnitude_deprecated_warning() -{ - VectorMagnitude_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_VectorMagnitude_h diff --git a/vtkm/filter/VertexClustering.h b/vtkm/filter/VertexClustering.h deleted file mode 100644 index e672fba63..000000000 --- a/vtkm/filter/VertexClustering.h +++ /dev/null @@ -1,35 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_VertexClustering_h -#define vtk_m_filter_VertexClustering_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/geometry_refinement/VertexClustering.h instead of " - "vtkm/filter/VertexClustering.h.") -inline void VertexClustering_deprecated() {} - -inline void VertexClustering_deprecated_warning() -{ - VertexClustering_deprecated(); -} - - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_VertexClustering_h diff --git a/vtkm/filter/WarpScalar.h b/vtkm/filter/WarpScalar.h deleted file mode 100644 index 4d4d27cf5..000000000 --- a/vtkm/filter/WarpScalar.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_WarpScalar_h -#define vtk_m_filter_WarpScalar_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/field_transform/WarpScalar.h instead of vtkm/filter/WarpScalar.h.") -inline void WarpScalar_deprecated() {} - -inline void WarpScalar_deprecated_warning() -{ - WarpScalar_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_WarpScalar_h diff --git a/vtkm/filter/WarpVector.h b/vtkm/filter/WarpVector.h deleted file mode 100644 index 5a24d3aa1..000000000 --- a/vtkm/filter/WarpVector.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_WarpVector_h -#define vtk_m_filter_WarpVector_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/field_transform/WarpVector.h instead of vtkm/filter/WarpVector.h.") -inline void WarpVector_deprecated() {} - -inline void WarpVector_deprecated_warning() -{ - WarpVector_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_WarpVector_h diff --git a/vtkm/filter/ZFPCompressor1D.h b/vtkm/filter/ZFPCompressor1D.h deleted file mode 100644 index 453bdfd56..000000000 --- a/vtkm/filter/ZFPCompressor1D.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPCompressor1D_h -#define vtk_m_filter_ZFPCompressor1D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/zfp/ZFPCompressor1D.h instead of vtkm/filter/ZFPCompressor1D.h.") -inline void ZFPCompressor1D_deprecated() {} - -inline void ZFPCompressor1D_deprecated_warning() -{ - ZFPCompressor1D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPCompressor1D_h diff --git a/vtkm/filter/ZFPCompressor2D.h b/vtkm/filter/ZFPCompressor2D.h deleted file mode 100644 index ce07f14eb..000000000 --- a/vtkm/filter/ZFPCompressor2D.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPCompressor2D_h -#define vtk_m_filter_ZFPCompressor2D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/zfp/ZFPCompressor2D.h instead of vtkm/filter/ZFPCompressor2D.h.") -inline void ZFPCompressor2D_deprecated() {} - -inline void ZFPCompressor2D_deprecated_warning() -{ - ZFPCompressor2D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPCompressor2D_h diff --git a/vtkm/filter/ZFPCompressor3D.h b/vtkm/filter/ZFPCompressor3D.h deleted file mode 100644 index 8ba525048..000000000 --- a/vtkm/filter/ZFPCompressor3D.h +++ /dev/null @@ -1,33 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPCompressor3D_h -#define vtk_m_filter_ZFPCompressor3D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED(1.8, - "Use vtkm/filter/zfp/ZFPCompressor3D.h instead of vtkm/filter/ZFPCompressor3D.h.") -inline void ZFPCompressor3D_deprecated() {} - -inline void ZFPCompressor3D_deprecated_warning() -{ - ZFPCompressor3D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPCompressor3D_h diff --git a/vtkm/filter/ZFPDecompressor1D.h b/vtkm/filter/ZFPDecompressor1D.h deleted file mode 100644 index 49636d9ec..000000000 --- a/vtkm/filter/ZFPDecompressor1D.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPDecompressor1D_h -#define vtk_m_filter_ZFPDecompressor1D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/zfp/ZFPDecompressor1D.h instead of vtkm/filter/ZFPDecompressor1D.h.") -inline void ZFPDecompressor1D_deprecated() {} - -inline void ZFPDecompressor1D_deprecated_warning() -{ - ZFPDecompressor1D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPDecompressor1D_h diff --git a/vtkm/filter/ZFPDecompressor2D.h b/vtkm/filter/ZFPDecompressor2D.h deleted file mode 100644 index 30d798ec8..000000000 --- a/vtkm/filter/ZFPDecompressor2D.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPDecompressor2D_h -#define vtk_m_filter_ZFPDecompressor2D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/zfp/ZFPDecompressor2D.h instead of vtkm/filter/ZFPDecompressor2D.h.") -inline void ZFPDecompressor2D_deprecated() {} - -inline void ZFPDecompressor2D_deprecated_warning() -{ - ZFPDecompressor2D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPDecompressor2D_h diff --git a/vtkm/filter/ZFPDecompressor3D.h b/vtkm/filter/ZFPDecompressor3D.h deleted file mode 100644 index a46350959..000000000 --- a/vtkm/filter/ZFPDecompressor3D.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_ZFPDecompressor3D_h -#define vtk_m_filter_ZFPDecompressor3D_h - -#include -#include - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED( - 1.8, - "Use vtkm/filter/zfp/ZFPDecompressor3D.h instead of vtkm/filter/ZFPDecompressor3D.h.") -inline void ZFPDecompressor3D_deprecated() {} - -inline void ZFPDecompressor3D_deprecated_warning() -{ - ZFPDecompressor3D_deprecated(); -} - -} -} // namespace vtkm::filter - -#endif //vtk_m_filter_ZFPDecompressor3D_h diff --git a/vtkm/filter/clean_grid/CleanGrid.h b/vtkm/filter/clean_grid/CleanGrid.h index 2e8fec952..9b2c5de5d 100644 --- a/vtkm/filter/clean_grid/CleanGrid.h +++ b/vtkm/filter/clean_grid/CleanGrid.h @@ -97,12 +97,6 @@ private: }; } // namespace clean_grid -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::clean_grid::CleanGrid.") CleanGrid - : public vtkm::filter::clean_grid::CleanGrid -{ - using clean_grid::CleanGrid::CleanGrid; -}; - } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/clean_grid/worklet/RemoveUnusedPoints.h b/vtkm/filter/clean_grid/worklet/RemoveUnusedPoints.h index f5ee58804..c841b33ef 100644 --- a/vtkm/filter/clean_grid/worklet/RemoveUnusedPoints.h +++ b/vtkm/filter/clean_grid/worklet/RemoveUnusedPoints.h @@ -21,12 +21,6 @@ #include #include -// For support of deprecated features. -#include -VTKM_DEPRECATED_SUPPRESS_BEGIN -#include -VTKM_DEPRECATED_SUPPRESS_END - namespace vtkm { namespace worklet @@ -226,18 +220,6 @@ private: (*this)(inArray, outArray, self); outHolder = vtkm::cont::UnknownArrayHandle{ outArray }; } - - VTKM_DEPRECATED_SUPPRESS_BEGIN - template - VTKM_CONT void operator()(const vtkm::cont::ArrayHandle& inArray, - vtkm::cont::VariantArrayHandleCommon& outHolder, - const RemoveUnusedPoints& self) const - { - vtkm::cont::ArrayHandle outArray; - (*this)(inArray, outArray, self); - outHolder = vtkm::cont::VariantArrayHandleCommon{ outArray }; - } - VTKM_DEPRECATED_SUPPRESS_END }; public: @@ -284,25 +266,6 @@ public: vtkm::cont::CastAndCall(inArray, MapPointFieldDeepFunctor{}, outArray, *this); return outArray; } - - VTKM_DEPRECATED_SUPPRESS_BEGIN - template - VTKM_CONT void MapPointFieldDeep(const vtkm::cont::VariantArrayHandleBase& inArray, - OutArrayHandle& outArray) const - { - vtkm::cont::CastAndCall(inArray, MapPointFieldDeepFunctor{}, outArray, *this); - } - - template - VTKM_CONT vtkm::cont::VariantArrayHandleBase MapPointFieldDeep( - const vtkm::cont::VariantArrayHandleBase& inArray) const - { - vtkm::cont::VariantArrayHandleBase outArray; - vtkm::cont::CastAndCall(inArray, MapPointFieldDeepFunctor{}, outArray, *this); - - return outArray; - } - VTKM_DEPRECATED_SUPPRESS_END ///@} const vtkm::worklet::ScatterCounting& GetPointScatter() const { return *this->PointScatter; } diff --git a/vtkm/filter/connected_components/CellSetConnectivity.h b/vtkm/filter/connected_components/CellSetConnectivity.h index efb95ee58..c727b3c69 100644 --- a/vtkm/filter/connected_components/CellSetConnectivity.h +++ b/vtkm/filter/connected_components/CellSetConnectivity.h @@ -41,12 +41,6 @@ private: } // namespace connected_components -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::connected_components::CellSetConnectivity.") - CellSetConnectivity : public vtkm::filter::connected_components::CellSetConnectivity -{ - using connected_components::CellSetConnectivity::CellSetConnectivity; -}; - } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/connected_components/ImageConnectivity.h b/vtkm/filter/connected_components/ImageConnectivity.h index 6ab5f216b..c1fc332af 100644 --- a/vtkm/filter/connected_components/ImageConnectivity.h +++ b/vtkm/filter/connected_components/ImageConnectivity.h @@ -42,12 +42,6 @@ private: }; } // namespace connected_components -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::connected_components::ImageConnectivity.") - ImageConnectivity : public vtkm::filter::connected_components::ImageConnectivity -{ - using connected_components::ImageConnectivity::ImageConnectivity; -}; - } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/contour/ClipWithField.h b/vtkm/filter/contour/ClipWithField.h index 7087a9aa3..b0bc3375c 100644 --- a/vtkm/filter/contour/ClipWithField.h +++ b/vtkm/filter/contour/ClipWithField.h @@ -45,11 +45,6 @@ private: bool Invert = false; }; } // namespace contour -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::contour::ClipWithField.") ClipWithField - : public vtkm::filter::contour::ClipWithField -{ - using contour::ClipWithField::ClipWithField; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/contour/ClipWithImplicitFunction.h b/vtkm/filter/contour/ClipWithImplicitFunction.h index a0dfbb9a8..d0e27d0b3 100644 --- a/vtkm/filter/contour/ClipWithImplicitFunction.h +++ b/vtkm/filter/contour/ClipWithImplicitFunction.h @@ -46,11 +46,6 @@ private: bool Invert = false; }; } // namespace contour -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::contour::ClipWithImplicitFunction.") - ClipWithImplicitFunction : public vtkm::filter::contour::ClipWithImplicitFunction -{ - using contour::ClipWithImplicitFunction::ClipWithImplicitFunction; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/contour/Contour.h b/vtkm/filter/contour/Contour.h index 257cdbff9..062502abb 100644 --- a/vtkm/filter/contour/Contour.h +++ b/vtkm/filter/contour/Contour.h @@ -128,11 +128,6 @@ protected: vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& result) override; }; } // namespace contour -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::contour::Contour.") Contour - : public vtkm::filter::contour::Contour -{ - using contour::Contour::Contour; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/contour/MIRFilter.h b/vtkm/filter/contour/MIRFilter.h index cd1c1c53e..e8b9eb1bb 100644 --- a/vtkm/filter/contour/MIRFilter.h +++ b/vtkm/filter/contour/MIRFilter.h @@ -87,11 +87,6 @@ private: vtkm::Float64 error_scaling = vtkm::Float64(0.0); }; } // namespace contour -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::contour::MIRFilter.") MIRFilter - : public vtkm::filter::contour::MIRFilter -{ - using contour::MIRFilter::MIRFilter; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/contour/Slice.h b/vtkm/filter/contour/Slice.h index 10244bc1b..c2bb4c18d 100644 --- a/vtkm/filter/contour/Slice.h +++ b/vtkm/filter/contour/Slice.h @@ -37,11 +37,6 @@ private: vtkm::ImplicitFunctionGeneral Function; }; } // namespace contour -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::contour::Slice.") Slice - : public vtkm::filter::contour::Slice -{ - using contour::Slice::Slice; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/density_estimate/Entropy.h b/vtkm/filter/density_estimate/Entropy.h index 60e709caf..e820ab50a 100644 --- a/vtkm/filter/density_estimate/Entropy.h +++ b/vtkm/filter/density_estimate/Entropy.h @@ -45,11 +45,6 @@ private: vtkm::Id NumberOfBins = 10; }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::Entropy.") Entropy - : public vtkm::filter::density_estimate::Entropy -{ - using density_estimate::Entropy::Entropy; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/density_estimate/Histogram.h b/vtkm/filter/density_estimate/Histogram.h index afd175e8e..15dddeb29 100644 --- a/vtkm/filter/density_estimate/Histogram.h +++ b/vtkm/filter/density_estimate/Histogram.h @@ -79,11 +79,6 @@ private: bool InExecutePartitions = false; }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::Histogram.") Histogram - : public vtkm::filter::density_estimate::Histogram -{ - using density_estimate::Histogram::Histogram; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/density_estimate/NDEntropy.h b/vtkm/filter/density_estimate/NDEntropy.h index 8639de57f..30bd28601 100644 --- a/vtkm/filter/density_estimate/NDEntropy.h +++ b/vtkm/filter/density_estimate/NDEntropy.h @@ -36,11 +36,6 @@ private: std::vector FieldNames; }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::NDEntropy.") NDEntropy - : public vtkm::filter::density_estimate::NDEntropy -{ - using density_estimate::NDEntropy::NDEntropy; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/density_estimate/NDHistogram.h b/vtkm/filter/density_estimate/NDHistogram.h index 86d60be27..2a4cbeff5 100644 --- a/vtkm/filter/density_estimate/NDHistogram.h +++ b/vtkm/filter/density_estimate/NDHistogram.h @@ -56,11 +56,6 @@ private: std::vector DataRanges; //Min Max of the field }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::NDHistogram.") NDHistogram - : public vtkm::filter::density_estimate::NDHistogram -{ - using density_estimate::NDHistogram::NDHistogram; -}; } // namespace filter } // namespace vtm diff --git a/vtkm/filter/density_estimate/ParticleDensityCloudInCell.cxx b/vtkm/filter/density_estimate/ParticleDensityCloudInCell.cxx index 3a5b7ce94..94e184e42 100644 --- a/vtkm/filter/density_estimate/ParticleDensityCloudInCell.cxx +++ b/vtkm/filter/density_estimate/ParticleDensityCloudInCell.cxx @@ -72,21 +72,6 @@ namespace filter { namespace density_estimate { -VTKM_CONT ParticleDensityCloudInCell::ParticleDensityCloudInCell(const vtkm::Id3& dimension, - const vtkm::Vec3f& origin, - const vtkm::Vec3f& spacing) -{ - this->SetDimension(dimension); - this->SetOrigin(origin); - this->SetSpacing(spacing); -} - -VTKM_CONT ParticleDensityCloudInCell::ParticleDensityCloudInCell(const Id3& dimension, - const vtkm::Bounds& bounds) -{ - this->SetDimension(dimension); - this->SetBounds(bounds); -} VTKM_CONT vtkm::cont::DataSet ParticleDensityCloudInCell::DoExecute(const cont::DataSet& input) { diff --git a/vtkm/filter/density_estimate/ParticleDensityCloudInCell.h b/vtkm/filter/density_estimate/ParticleDensityCloudInCell.h index 0383b5e9d..10e02c192 100644 --- a/vtkm/filter/density_estimate/ParticleDensityCloudInCell.h +++ b/vtkm/filter/density_estimate/ParticleDensityCloudInCell.h @@ -11,7 +11,6 @@ #ifndef vtk_m_filter_density_estimate_ParticleDensityCIC_h #define vtk_m_filter_density_estimate_ParticleDensityCIC_h -#include #include namespace vtkm @@ -43,23 +42,10 @@ public: ParticleDensityCloudInCell() = default; - VTKM_DEPRECATED(1.9, "Use default constructor and `Set*` accessors.") - ParticleDensityCloudInCell(const vtkm::Id3& dimension, - const vtkm::Vec3f& origin, - const vtkm::Vec3f& spacing); - - VTKM_DEPRECATED(1.9, "Use default constructor and `Set*` accessors.") - ParticleDensityCloudInCell(const Id3& dimension, const vtkm::Bounds& bounds); - private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::ParticleDensityCloudInCell.") - ParticleDensityCloudInCell : public vtkm::filter::density_estimate::ParticleDensityCloudInCell -{ - using density_estimate::ParticleDensityCloudInCell::ParticleDensityCloudInCell; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.cxx b/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.cxx index e3906d862..c51242b4a 100644 --- a/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.cxx +++ b/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.cxx @@ -54,23 +54,6 @@ namespace filter { namespace density_estimate { -VTKM_CONT ParticleDensityNearestGridPoint::ParticleDensityNearestGridPoint( - const vtkm::Id3& dimension, - const vtkm::Vec3f& origin, - const vtkm::Vec3f& spacing) -{ - this->SetDimension(dimension); - this->SetOrigin(origin); - this->SetSpacing(spacing); -} - -VTKM_CONT ParticleDensityNearestGridPoint::ParticleDensityNearestGridPoint( - const Id3& dimension, - const vtkm::Bounds& bounds) -{ - this->SetDimension(dimension); - this->SetBounds(bounds); -} VTKM_CONT vtkm::cont::DataSet ParticleDensityNearestGridPoint::DoExecute( const vtkm::cont::DataSet& input) diff --git a/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.h b/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.h index a44ebdb6c..c064080d9 100644 --- a/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.h +++ b/vtkm/filter/density_estimate/ParticleDensityNearestGridPoint.h @@ -42,24 +42,10 @@ public: ParticleDensityNearestGridPoint() = default; - VTKM_DEPRECATED(1.9, "Use default constructor and `Set*` accessors.") - ParticleDensityNearestGridPoint(const vtkm::Id3& dimension, - const vtkm::Vec3f& origin, - const vtkm::Vec3f& spacing); - - VTKM_DEPRECATED(1.9, "Use default constructor and `Set*` accessors.") - ParticleDensityNearestGridPoint(const vtkm::Id3& dimension, const vtkm::Bounds& bounds); - private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace density_estimate -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::density_estimate::ParticleDensityNearestGridPoint.") - ParticleDensityNearestGridPoint - : public vtkm::filter::density_estimate::ParticleDensityNearestGridPoint -{ - using density_estimate::ParticleDensityNearestGridPoint::ParticleDensityNearestGridPoint; -}; } // namespace filter } // namespace vtkm #endif //vtk_m_filter_density_estimate_ParticleDensityNGP_h diff --git a/vtkm/filter/entity_extraction/ExternalFaces.h b/vtkm/filter/entity_extraction/ExternalFaces.h index 79f6d03b4..f15dd276c 100644 --- a/vtkm/filter/entity_extraction/ExternalFaces.h +++ b/vtkm/filter/entity_extraction/ExternalFaces.h @@ -76,11 +76,6 @@ private: std::unique_ptr Worklet; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::ExternalFaces.") ExternalFaces - : public vtkm::filter::entity_extraction::ExternalFaces -{ - using entity_extraction::ExternalFaces::ExternalFaces; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/ExtractGeometry.h b/vtkm/filter/entity_extraction/ExtractGeometry.h index 0afbd0d11..03eae6759 100644 --- a/vtkm/filter/entity_extraction/ExtractGeometry.h +++ b/vtkm/filter/entity_extraction/ExtractGeometry.h @@ -81,11 +81,6 @@ private: vtkm::ImplicitFunctionGeneral Function; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::ExtractGeometry.") ExtractGeometry - : public vtkm::filter::entity_extraction::ExtractGeometry -{ - using entity_extraction::ExtractGeometry::ExtractGeometry; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/ExtractPoints.h b/vtkm/filter/entity_extraction/ExtractPoints.h index b0a99041c..f0f839301 100644 --- a/vtkm/filter/entity_extraction/ExtractPoints.h +++ b/vtkm/filter/entity_extraction/ExtractPoints.h @@ -65,11 +65,6 @@ private: bool CompactPoints = false; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::ExtractPoints.") ExtractPoints - : public vtkm::filter::entity_extraction::ExtractPoints -{ - using entity_extraction::ExtractPoints::ExtractPoints; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/ExtractStructured.h b/vtkm/filter/entity_extraction/ExtractStructured.h index d00d8d558..5218a0a00 100644 --- a/vtkm/filter/entity_extraction/ExtractStructured.h +++ b/vtkm/filter/entity_extraction/ExtractStructured.h @@ -92,12 +92,6 @@ private: }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, - "Use vtkm::filter::entity_extraction::ExtractStructured.") ExtractStructured - : public vtkm::filter::entity_extraction::ExtractStructured -{ - using entity_extraction::ExtractStructured::ExtractStructured; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/GhostCellRemove.h b/vtkm/filter/entity_extraction/GhostCellRemove.h index 984eba4c8..691cbcc63 100644 --- a/vtkm/filter/entity_extraction/GhostCellRemove.h +++ b/vtkm/filter/entity_extraction/GhostCellRemove.h @@ -65,11 +65,6 @@ private: }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::GhostCellRemove.") GhostCellRemove - : public vtkm::filter::entity_extraction::GhostCellRemove -{ - using entity_extraction::GhostCellRemove::GhostCellRemove; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/Mask.h b/vtkm/filter/entity_extraction/Mask.h index 4e7117d10..82c01009d 100644 --- a/vtkm/filter/entity_extraction/Mask.h +++ b/vtkm/filter/entity_extraction/Mask.h @@ -47,11 +47,6 @@ private: bool CompactPoints = false; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::Mask.") Mask - : public vtkm::filter::entity_extraction::Mask -{ - using entity_extraction::Mask::Mask; -}; } // namespace filter } // namespace vtk diff --git a/vtkm/filter/entity_extraction/MaskPoints.h b/vtkm/filter/entity_extraction/MaskPoints.h index 682e16346..fd78043a6 100644 --- a/vtkm/filter/entity_extraction/MaskPoints.h +++ b/vtkm/filter/entity_extraction/MaskPoints.h @@ -46,11 +46,6 @@ private: bool CompactPoints = true; }; } // namespace eneity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::MaskPoints.") MaskPoints - : public vtkm::filter::entity_extraction::MaskPoints -{ - using entity_extraction::MaskPoints::MaskPoints; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/Threshold.h b/vtkm/filter/entity_extraction/Threshold.h index bd3faed1d..4e99a6a9a 100644 --- a/vtkm/filter/entity_extraction/Threshold.h +++ b/vtkm/filter/entity_extraction/Threshold.h @@ -103,11 +103,6 @@ private: bool Invert = false; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::Threshold.") Threshold - : public vtkm::filter::entity_extraction::Threshold -{ - using entity_extraction::Threshold::Threshold; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/entity_extraction/ThresholdPoints.h b/vtkm/filter/entity_extraction/ThresholdPoints.h index 0fd7f8777..58ce00b47 100644 --- a/vtkm/filter/entity_extraction/ThresholdPoints.h +++ b/vtkm/filter/entity_extraction/ThresholdPoints.h @@ -62,11 +62,6 @@ private: bool CompactPoints = false; }; } // namespace entity_extraction -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::entity_extraction::ThresholdPoints.") ThresholdPoints - : public vtkm::filter::entity_extraction::ThresholdPoints -{ - using entity_extraction::ThresholdPoints::ThresholdPoints; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_conversion/CellAverage.h b/vtkm/filter/field_conversion/CellAverage.h index 33b1cf02b..f800ee388 100644 --- a/vtkm/filter/field_conversion/CellAverage.h +++ b/vtkm/filter/field_conversion/CellAverage.h @@ -33,11 +33,6 @@ private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace field_conversion -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_conversion::CellAverage.") CellAverage - : public vtkm::filter::field_conversion::CellAverage -{ - using field_conversion::CellAverage::CellAverage; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_conversion/PointAverage.h b/vtkm/filter/field_conversion/PointAverage.h index d66bc41cc..4925d90a8 100644 --- a/vtkm/filter/field_conversion/PointAverage.h +++ b/vtkm/filter/field_conversion/PointAverage.h @@ -32,11 +32,6 @@ private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace field_conversion -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_conversion::PointAverage.") PointAverage - : public vtkm::filter::field_conversion::PointAverage -{ - using field_conversion::PointAverage::PointAverage; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/CylindricalCoordinateTransform.h b/vtkm/filter/field_transform/CylindricalCoordinateTransform.h index 2e11b6ed3..ce5149c06 100644 --- a/vtkm/filter/field_transform/CylindricalCoordinateTransform.h +++ b/vtkm/filter/field_transform/CylindricalCoordinateTransform.h @@ -38,12 +38,6 @@ private: bool CartesianToCylindrical = true; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::CylindricalCoordinateTransform.") - CylindricalCoordinateTransform - : public vtkm::filter::field_transform::CylindricalCoordinateTransform -{ - using field_transform::CylindricalCoordinateTransform::CylindricalCoordinateTransform; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/FieldToColors.h b/vtkm/filter/field_transform/FieldToColors.h index 0c1944995..41963ea0e 100644 --- a/vtkm/filter/field_transform/FieldToColors.h +++ b/vtkm/filter/field_transform/FieldToColors.h @@ -11,7 +11,6 @@ #ifndef vtk_m_filter_field_transform_FieldToColors_h #define vtk_m_filter_field_transform_FieldToColors_h -#include #include #include #include @@ -35,28 +34,13 @@ public: Scalar, Magnitude, Component, - SCALAR VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Scalar.") = Scalar, - MAGNITUDE VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Magnitude.") = Magnitude, - COMPONENT VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Component.") = Component }; - using FieldToColorsInputMode VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode.") = InputMode; - VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Scalar.") - static constexpr InputMode SCALAR = InputMode::Scalar; - VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Magnitude.") - static constexpr InputMode MAGNITUDE = InputMode::Magnitude; - VTKM_DEPRECATED(1.8, "Use FieldToColors::InputMode::Component.") - static constexpr InputMode COMPONENT = InputMode::Component; enum struct OutputMode { RGB, RGBA }; - using FieldToColorsOutputMode VTKM_DEPRECATED(1.8, "Use FieldToColors::OutputMode.") = OutputMode; - VTKM_DEPRECATED(1.8, "Use FieldToColors::OutputMode::RGB.") - static constexpr OutputMode RGB = OutputMode::RGB; - VTKM_DEPRECATED(1.8, "Use FieldToColors::OutputMode::RGBA.") - static constexpr OutputMode RGBA = OutputMode::RGBA; void SetColorTable(const vtkm::cont::ColorTable& table) { @@ -101,11 +85,6 @@ private: vtkm::Id ModifiedCount = -1; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::FieldToColors.") FieldToColors - : public vtkm::filter::field_transform::FieldToColors -{ - using field_transform::FieldToColors::FieldToColors; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/GenerateIds.h b/vtkm/filter/field_transform/GenerateIds.h index c49a71e99..1183c46a0 100644 --- a/vtkm/filter/field_transform/GenerateIds.h +++ b/vtkm/filter/field_transform/GenerateIds.h @@ -89,11 +89,6 @@ private: vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::GenerateIds.") GenerateIds - : public vtkm::filter::field_transform::GenerateIds -{ - using field_transform::GenerateIds::GenerateIds; -}; } // namespace vtkm::filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/PointElevation.h b/vtkm/filter/field_transform/PointElevation.h index 378e5838c..ab65af573 100644 --- a/vtkm/filter/field_transform/PointElevation.h +++ b/vtkm/filter/field_transform/PointElevation.h @@ -60,11 +60,6 @@ private: vtkm::Float64 RangeLow = 0.0, RangeHigh = 1.0; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::PointElevation.") PointElevation - : public vtkm::filter::field_transform::PointElevation -{ - using field_transform::PointElevation::PointElevation; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/PointTransform.h b/vtkm/filter/field_transform/PointTransform.h index 1e339e635..8ee02a709 100644 --- a/vtkm/filter/field_transform/PointTransform.h +++ b/vtkm/filter/field_transform/PointTransform.h @@ -104,11 +104,6 @@ private: bool ChangeCoordinateSystem = true; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::PointTransform.") PointTransform - : public vtkm::filter::field_transform::PointTransform -{ - using field_transform::PointTransform::PointTransform; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/SphericalCoordinateTransform.h b/vtkm/filter/field_transform/SphericalCoordinateTransform.h index e76cfa78a..a5072a935 100644 --- a/vtkm/filter/field_transform/SphericalCoordinateTransform.h +++ b/vtkm/filter/field_transform/SphericalCoordinateTransform.h @@ -36,11 +36,6 @@ private: bool CartesianToSpherical = true; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::SphericalCoordinateTransform.") - SphericalCoordinateTransform : public vtkm::filter::field_transform::SphericalCoordinateTransform -{ - using field_transform::SphericalCoordinateTransform::SphericalCoordinateTransform; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/field_transform/WarpScalar.h b/vtkm/filter/field_transform/WarpScalar.h index 206428ec1..24830191a 100644 --- a/vtkm/filter/field_transform/WarpScalar.h +++ b/vtkm/filter/field_transform/WarpScalar.h @@ -87,11 +87,6 @@ private: vtkm::FloatDefault ScaleAmount; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::WarpScalar.") WarpScalar - : public vtkm::filter::field_transform::WarpScalar -{ - using field_transform::WarpScalar::WarpScalar; -}; } // namespace filter } // namespace vtkm #endif // vtk_m_filter_field_transform_WarpScalar_h diff --git a/vtkm/filter/field_transform/WarpVector.h b/vtkm/filter/field_transform/WarpVector.h index 0e04e148d..3d0659faa 100644 --- a/vtkm/filter/field_transform/WarpVector.h +++ b/vtkm/filter/field_transform/WarpVector.h @@ -62,11 +62,6 @@ private: vtkm::FloatDefault Scale; }; } // namespace field_transform -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::field_transform::WarpVector.") WarpVector - : public vtkm::filter::field_transform::WarpVector -{ - using field_transform::WarpVector::WarpVector; -}; } // namespace filter } // namespace vtkm #endif // vtk_m_filter_field_transform_WarpVector_h diff --git a/vtkm/filter/flow/Lagrangian.cxx b/vtkm/filter/flow/Lagrangian.cxx index 19a1fc7f8..864e5bf90 100644 --- a/vtkm/filter/flow/Lagrangian.cxx +++ b/vtkm/filter/flow/Lagrangian.cxx @@ -289,65 +289,3 @@ VTKM_CONT vtkm::cont::DataSet Lagrangian::DoExecute(const vtkm::cont::DataSet& i } } } //vtkm::filter::flow - - -//Deprecated filter: vtkm::filter::Lagrangian -namespace vtkm -{ -namespace filter -{ - -static vtkm::Id deprecatedLagrange_Cycle = 0; -static vtkm::cont::ArrayHandle deprecatedLagrange_BasisParticles; -static vtkm::cont::ArrayHandle deprecatedLagrange_BasisParticlesOriginal; -static vtkm::cont::ArrayHandle deprecatedLagrange_BasisParticlesValidity; - - -VTKM_CONT vtkm::cont::DataSet Lagrangian::DoExecute(const vtkm::cont::DataSet& input) -{ - //Initialize the filter with the static variables - this->SetCycle(deprecatedLagrange_Cycle); - this->SetBasisParticles(deprecatedLagrange_BasisParticles); - this->SetBasisParticlesOriginal(deprecatedLagrange_BasisParticlesOriginal); - this->SetBasisParticleValidity(deprecatedLagrange_BasisParticlesValidity); - - //call the base class - auto output = vtkm::filter::flow::Lagrangian::DoExecute(input); - - //Set the static variables with the current values. - deprecatedLagrange_Cycle = this->GetCycle(); - deprecatedLagrange_BasisParticles = this->GetBasisParticles(); - deprecatedLagrange_BasisParticlesOriginal = this->GetBasisParticlesOriginal(); - deprecatedLagrange_BasisParticlesValidity = this->GetBasisParticleValidity(); - - //The deprecated filter returned a rectilinear grid of points whereas the new version - //returns a uniform grid of points. Convert the coordinates for deprecated users. - if (output.GetNumberOfCoordinateSystems() > 0) - { - vtkm::cont::ArrayHandleUniformPointCoordinates originalCoordinates; - output.GetCoordinateSystem().GetData().AsArrayHandle(originalCoordinates); - vtkm::Id3 dims = originalCoordinates.GetDimensions(); - vtkm::Vec3f origin = originalCoordinates.GetOrigin(); - vtkm::Vec3f spacing = originalCoordinates.GetSpacing(); - - vtkm::cont::ArrayHandle xCoords; - vtkm::cont::ArrayCopy( - vtkm::cont::ArrayHandleCounting(origin[0], spacing[0], dims[0]), xCoords); - - vtkm::cont::ArrayHandle yCoords; - vtkm::cont::ArrayCopy( - vtkm::cont::ArrayHandleCounting(origin[1], spacing[1], dims[1]), yCoords); - - vtkm::cont::ArrayHandle zCoords; - vtkm::cont::ArrayCopy( - vtkm::cont::ArrayHandleCounting(origin[2], spacing[2], dims[2]), zCoords); - - output.GetCoordinateSystem() = vtkm::cont::CoordinateSystem( - "coords", vtkm::cont::make_ArrayHandleCartesianProduct(xCoords, yCoords, zCoords)); - } - - return output; -} - -} -} // namespace vtkm::filter diff --git a/vtkm/filter/flow/Lagrangian.h b/vtkm/filter/flow/Lagrangian.h index 43b415688..0a5dea59f 100644 --- a/vtkm/filter/flow/Lagrangian.h +++ b/vtkm/filter/flow/Lagrangian.h @@ -99,10 +99,9 @@ public: return this->BasisParticlesValidity; } -protected: // make this protected so the deprecated version can override. +private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override; -private: vtkm::cont::ArrayHandle BasisParticles; vtkm::cont::ArrayHandle BasisParticlesOriginal; vtkm::cont::ArrayHandle BasisParticlesValidity; @@ -123,29 +122,4 @@ private: } } //vtkm::filter::flow - -//Deprecated Lagrangian filter -namespace vtkm -{ -namespace filter -{ - -class VTKM_FILTER_FLOW_EXPORT VTKM_DEPRECATED( - 1.9, - "Use vtkm::filter::flow::Lagrangian. " - "Note that the new version of the filter no longer relies on global " - "variables to record particle position from one time step to the next. " - "It is important to keep a reference to _the same object_. " - "If you create a new filter object, the seeds will be reinitialized.") Lagrangian - : public vtkm::filter::flow::Lagrangian -{ -private: - VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& inData) override; -}; - -} -} //vtkm::filter - - - #endif // #define vtk_m_filter_flow_Lagrangian_h diff --git a/vtkm/filter/flow/LagrangianStructures.h b/vtkm/filter/flow/LagrangianStructures.h index d24e64971..c70474e1a 100644 --- a/vtkm/filter/flow/LagrangianStructures.h +++ b/vtkm/filter/flow/LagrangianStructures.h @@ -69,11 +69,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::LagrangianStructures.") LagrangianStructures - : vtkm::filter::flow::LagrangianStructures -{ - using vtkm::filter::flow::LagrangianStructures::LagrangianStructures; -}; } } // namespace vtkm diff --git a/vtkm/filter/flow/ParticleAdvection.h b/vtkm/filter/flow/ParticleAdvection.h index e973da730..12f5aaf3d 100644 --- a/vtkm/filter/flow/ParticleAdvection.h +++ b/vtkm/filter/flow/ParticleAdvection.h @@ -36,11 +36,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::ParticleAdvection.") ParticleAdvection - : vtkm::filter::flow::ParticleAdvection -{ - using vtkm::filter::flow::ParticleAdvection::ParticleAdvection; -}; } } // namespace vtkm::filter::flow diff --git a/vtkm/filter/flow/PathParticle.h b/vtkm/filter/flow/PathParticle.h index b606cdb4f..b87612128 100644 --- a/vtkm/filter/flow/PathParticle.h +++ b/vtkm/filter/flow/PathParticle.h @@ -35,11 +35,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::PathParticle.") PathParticle - : vtkm::filter::flow::PathParticle -{ - using vtkm::filter::flow::PathParticle::PathParticle; -}; } } // namespace vtkm::filter::flow diff --git a/vtkm/filter/flow/Pathline.h b/vtkm/filter/flow/Pathline.h index 485b5d591..f1b4711ca 100644 --- a/vtkm/filter/flow/Pathline.h +++ b/vtkm/filter/flow/Pathline.h @@ -35,11 +35,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::Pathline.") Pathline - : vtkm::filter::flow::Pathline -{ - using vtkm::filter::flow::Pathline::Pathline; -}; } } // namespace vtkm::filter::flow diff --git a/vtkm/filter/flow/StreamSurface.h b/vtkm/filter/flow/StreamSurface.h index c06a3f769..b1c56a37b 100644 --- a/vtkm/filter/flow/StreamSurface.h +++ b/vtkm/filter/flow/StreamSurface.h @@ -58,11 +58,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::StreamSurface.") StreamSurface - : vtkm::filter::flow::StreamSurface -{ - using vtkm::filter::flow::StreamSurface::StreamSurface; -}; } } // namespace vtkm::filter::flow diff --git a/vtkm/filter/flow/Streamline.h b/vtkm/filter/flow/Streamline.h index 34a58d693..d4633f0e0 100644 --- a/vtkm/filter/flow/Streamline.h +++ b/vtkm/filter/flow/Streamline.h @@ -35,11 +35,6 @@ private: }; } -struct VTKM_DEPRECATED(1.8, "Use vtkm::filter::flow::Streamline.") Streamline - : vtkm::filter::flow::Streamline -{ - using vtkm::filter::flow::Streamline::Streamline; -}; } } // namespace vtkm::filter::flow diff --git a/vtkm/filter/geometry_refinement/SplitSharpEdges.h b/vtkm/filter/geometry_refinement/SplitSharpEdges.h index 81ef19578..1483904dd 100644 --- a/vtkm/filter/geometry_refinement/SplitSharpEdges.h +++ b/vtkm/filter/geometry_refinement/SplitSharpEdges.h @@ -48,12 +48,6 @@ private: vtkm::FloatDefault FeatureAngle = 30.0; }; } // namespace geometry_refinement -class VTKM_DEPRECATED(1.8, - "Use vtkm::filter::geometry_refinement::SplitSharpEdges.") SplitSharpEdges - : public vtkm::filter::geometry_refinement::SplitSharpEdges -{ - using geometry_refinement::SplitSharpEdges::SplitSharpEdges; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/geometry_refinement/Tetrahedralize.h b/vtkm/filter/geometry_refinement/Tetrahedralize.h index 963422962..339bda942 100644 --- a/vtkm/filter/geometry_refinement/Tetrahedralize.h +++ b/vtkm/filter/geometry_refinement/Tetrahedralize.h @@ -25,11 +25,6 @@ class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Tetrahedralize : public vtkm::filte VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace geometry_refinement -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::geometry_refinement::Tetrahedralize.") Tetrahedralize - : public vtkm::filter::geometry_refinement::Tetrahedralize -{ - using geometry_refinement::Tetrahedralize::Tetrahedralize; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/geometry_refinement/Triangulate.h b/vtkm/filter/geometry_refinement/Triangulate.h index c57245397..83030c108 100644 --- a/vtkm/filter/geometry_refinement/Triangulate.h +++ b/vtkm/filter/geometry_refinement/Triangulate.h @@ -25,11 +25,6 @@ class VTKM_FILTER_GEOMETRY_REFINEMENT_EXPORT Triangulate : public vtkm::filter:: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace geometry_refinement -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::geometry_refinement::Triangulate.") Triangulate - : public vtkm::filter::geometry_refinement::Triangulate -{ - using geometry_refinement::Triangulate::Triangulate; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/geometry_refinement/Tube.h b/vtkm/filter/geometry_refinement/Tube.h index 786c9f7c3..5e37e679c 100644 --- a/vtkm/filter/geometry_refinement/Tube.h +++ b/vtkm/filter/geometry_refinement/Tube.h @@ -45,11 +45,6 @@ private: bool Capping{}; }; } // namespace geometry_refinement -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::geometry_refinement::Tube.") Tube - : public vtkm::filter::geometry_refinement::Tube -{ - using geometry_refinement::Tube::Tube; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/geometry_refinement/VertexClustering.h b/vtkm/filter/geometry_refinement/VertexClustering.h index 9371e2f5e..4b69d43dd 100644 --- a/vtkm/filter/geometry_refinement/VertexClustering.h +++ b/vtkm/filter/geometry_refinement/VertexClustering.h @@ -63,12 +63,6 @@ private: vtkm::Id3 NumberOfDivisions = { 256, 256, 256 }; }; } // namespace geometry_refinement -class VTKM_DEPRECATED(1.8, - "Use vtkm::filter::geometry_refinement::VertexClustering.") VertexClustering - : public vtkm::filter::geometry_refinement::VertexClustering -{ - using geometry_refinement::VertexClustering::VertexClustering; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/image_processing/ComputeMoments.h b/vtkm/filter/image_processing/ComputeMoments.h index 67f97c369..466191785 100644 --- a/vtkm/filter/image_processing/ComputeMoments.h +++ b/vtkm/filter/image_processing/ComputeMoments.h @@ -38,11 +38,6 @@ private: vtkm::Int32 Order = 0; }; } // namespace image_processing -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::image_processing::ComputeMoments.") ComputeMoments - : public vtkm::filter::image_processing::ComputeMoments -{ - using image_processing::ComputeMoments::ComputeMoments; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/image_processing/ImageDifference.h b/vtkm/filter/image_processing/ImageDifference.h index bd5be6e76..d70a63458 100644 --- a/vtkm/filter/image_processing/ImageDifference.h +++ b/vtkm/filter/image_processing/ImageDifference.h @@ -108,11 +108,6 @@ private: std::string ThresholdFieldName = "threshold-output"; }; } // namespace image_processing -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::image_processing::ImageDifference.") ImageDifference - : public vtkm::filter::image_processing::ImageDifference -{ - using image_processing::ImageDifference::ImageDifference; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/image_processing/ImageMedian.h b/vtkm/filter/image_processing/ImageMedian.h index 3fc007717..4cda91e7e 100644 --- a/vtkm/filter/image_processing/ImageMedian.h +++ b/vtkm/filter/image_processing/ImageMedian.h @@ -44,11 +44,6 @@ private: int Neighborhood = 1; }; } // namespace image_processing -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::image_processing::ImageMedian.") ImageMedian - : public vtkm::filter::image_processing::ImageMedian -{ - using image_processing::ImageMedian::ImageMedian; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/internal/CMakeLists.txt b/vtkm/filter/internal/CMakeLists.txt deleted file mode 100644 index 05e3f8da9..000000000 --- a/vtkm/filter/internal/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ - -##============================================================================ -## Copyright (c) Kitware, Inc. -## All rights reserved. -## See LICENSE.txt for details. -## -## This software is distributed WITHOUT ANY WARRANTY; without even -## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE. See the above copyright notice for more information. -##============================================================================ - -set(deprecated_headers - ResolveFieldTypeAndExecute.h - ResolveFieldTypeAndMap.h -) - -vtkm_declare_headers(${deprecated_headers}) diff --git a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h b/vtkm/filter/internal/ResolveFieldTypeAndExecute.h deleted file mode 100644 index 767f658fd..000000000 --- a/vtkm/filter/internal/ResolveFieldTypeAndExecute.h +++ /dev/null @@ -1,48 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_internal_ResolveFieldTypeAndExecute_h -#define vtk_m_filter_internal_ResolveFieldTypeAndExecute_h - -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ -namespace internal -{ - -struct VTKM_ALWAYS_EXPORT ResolveFieldTypeAndExecute -{ - template - void operator()(const vtkm::cont::ArrayHandle& field, - DerivedClass* derivedClass, - const vtkm::cont::DataSet& inputData, - const vtkm::filter::FieldMetadata& fieldMeta, - vtkm::filter::PolicyBase policy, - ResultType& result) - { - result = derivedClass->DoExecute(inputData, field, fieldMeta, policy); - } -}; -} -} -} // namespace vtkm::filter::internal - -#endif //vtk_m_filter_internal_ResolveFieldTypeAndExecute_h diff --git a/vtkm/filter/internal/ResolveFieldTypeAndMap.h b/vtkm/filter/internal/ResolveFieldTypeAndMap.h deleted file mode 100644 index 3c051a563..000000000 --- a/vtkm/filter/internal/ResolveFieldTypeAndMap.h +++ /dev/null @@ -1,65 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_filter_internal_ResolveFieldTypeAndMap_h -#define vtk_m_filter_internal_ResolveFieldTypeAndMap_h - -#include -#include -#include - -#include -#include - -namespace vtkm -{ -namespace filter -{ -namespace internal -{ - -template -struct ResolveFieldTypeAndMap -{ - using Self = ResolveFieldTypeAndMap; - - Derived* DerivedClass; - vtkm::cont::DataSet& InputResult; - const vtkm::filter::FieldMetadata& Metadata; - const vtkm::filter::PolicyBase& Policy; - bool& RanProperly; - - ResolveFieldTypeAndMap(Derived* derivedClass, - vtkm::cont::DataSet& inResult, - const vtkm::filter::FieldMetadata& fieldMeta, - const vtkm::filter::PolicyBase& policy, - bool& ran) - : DerivedClass(derivedClass) - , InputResult(inResult) - , Metadata(fieldMeta) - , Policy(policy) - , RanProperly(ran) - { - } - - template - void operator()(const vtkm::cont::ArrayHandle& field) const - { - this->RanProperly = - this->DerivedClass->DoMapField(this->InputResult, field, this->Metadata, this->Policy); - } - -private: - void operator=(const ResolveFieldTypeAndMap&) = delete; -}; -} -} -} // namespace vtkm::filter::internal - -#endif //vtk_m_filter_internal_ResolveFieldTypeAndMap_h diff --git a/vtkm/filter/mesh_info/CellMeasures.h b/vtkm/filter/mesh_info/CellMeasures.h index ad89e0db2..c6e458efb 100644 --- a/vtkm/filter/mesh_info/CellMeasures.h +++ b/vtkm/filter/mesh_info/CellMeasures.h @@ -66,83 +66,4 @@ private: } // namespace filter } // namespace vtkm -// Implement the deprecated functionality of vtkm::filter::CellMeasures, which was moved into the -// mesh_info namespace (along with some other API changes). Everything below this line (up to the -// #endif for the include guard) can be deleted once the deprecated functionality is removed. - -// Don't warn about deprecation while implementing deprecated functionality. -VTKM_DEPRECATED_SUPPRESS_BEGIN - -namespace vtkm -{ - -struct VTKM_DEPRECATED(1.8, "IntegrateOver is no longer supported") IntegrateOver -{ -}; -struct VTKM_DEPRECATED(1.8, "IntegrateOverCurve is no longer supported") IntegrateOverCurve - : IntegrateOver -{ - static constexpr vtkm::filter::mesh_info::IntegrationType value = - vtkm::filter::mesh_info::IntegrationType::ArcLength; -}; -struct VTKM_DEPRECATED(1.8, "IntegrateOverSurface is no longer supported") IntegrateOverSurface - : IntegrateOver -{ - static constexpr vtkm::filter::mesh_info::IntegrationType value = - vtkm::filter::mesh_info::IntegrationType::Area; -}; -struct VTKM_DEPRECATED(1.8, "IntegrateOverSurface is no longer supported") IntegrateOverSolid - : IntegrateOver -{ - static constexpr vtkm::filter::mesh_info::IntegrationType value = - vtkm::filter::mesh_info::IntegrationType::Volume; -}; - -// Lists of acceptable types of integration -using ArcLength VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::IntegrationType::ArcLength") = - vtkm::List; -using Area VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::IntegrationType::Area") = - vtkm::List; -using Volume VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::IntegrationType::Volume") = - vtkm::List; -using AllMeasures VTKM_DEPRECATED(1.8, - "Use vtkm::filter::mesh_info::IntegrationType::AllMeasures") = - vtkm::List; - -namespace detail -{ - -inline vtkm::filter::mesh_info::IntegrationType OldToNewIntegrationType(vtkm::List<>) -{ - return vtkm::filter::mesh_info::IntegrationType::None; -} - -template -inline vtkm::filter::mesh_info::IntegrationType OldToNewIntegrationType(vtkm::List) -{ - return T::value | OldToNewIntegrationType(vtkm::List{}); -} - -} // namespace detail - -namespace filter -{ - -template -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::CellMeasures.") CellMeasures - : public vtkm::filter::mesh_info::CellMeasures -{ -public: - CellMeasures() - : vtkm::filter::mesh_info::CellMeasures( - vtkm::detail::OldToNewIntegrationType(IntegrationTypeList{})) - { - } -}; - -} // namespace filter -} // namespace vtkm - -VTKM_DEPRECATED_SUPPRESS_END - #endif // vtk_m_filter_mesh_info_CellMeasures_h diff --git a/vtkm/filter/mesh_info/GhostCellClassify.h b/vtkm/filter/mesh_info/GhostCellClassify.h index 03e1d6952..1437e04ed 100644 --- a/vtkm/filter/mesh_info/GhostCellClassify.h +++ b/vtkm/filter/mesh_info/GhostCellClassify.h @@ -35,11 +35,6 @@ public: VTKM_CONT const std::string& GetGhostCellName() { return this->GhostCellName; } }; } // namespace mesh_info -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::GhostCellClassify.") GhostCellClassify - : public vtkm::filter::mesh_info::GhostCellClassify -{ - using mesh_info::GhostCellClassify::GhostCellClassify; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/mesh_info/MeshQuality.cxx b/vtkm/filter/mesh_info/MeshQuality.cxx index 4e3e18073..0ca42f534 100644 --- a/vtkm/filter/mesh_info/MeshQuality.cxx +++ b/vtkm/filter/mesh_info/MeshQuality.cxx @@ -172,69 +172,3 @@ VTKM_CONT vtkm::cont::DataSet MeshQuality::DoExecute(const vtkm::cont::DataSet& } // namespace mesh_info } // namespace filter } // namespace vtkm - -namespace vtkm -{ -namespace filter -{ - -VTKM_DEPRECATED_SUPPRESS_BEGIN - -vtkm::filter::mesh_info::CellMetric MeshQuality::ConvertCellMetric( - vtkm::filter::CellMetric oldMetricEnum) -{ - switch (oldMetricEnum) - { - case vtkm::filter::CellMetric::AREA: - return vtkm::filter::mesh_info::CellMetric::Area; - case vtkm::filter::CellMetric::ASPECT_GAMMA: - return vtkm::filter::mesh_info::CellMetric::AspectGamma; - case vtkm::filter::CellMetric::ASPECT_RATIO: - return vtkm::filter::mesh_info::CellMetric::AspectRatio; - case vtkm::filter::CellMetric::CONDITION: - return vtkm::filter::mesh_info::CellMetric::Condition; - case vtkm::filter::CellMetric::DIAGONAL_RATIO: - return vtkm::filter::mesh_info::CellMetric::DiagonalRatio; - case vtkm::filter::CellMetric::DIMENSION: - return vtkm::filter::mesh_info::CellMetric::Dimension; - case vtkm::filter::CellMetric::JACOBIAN: - return vtkm::filter::mesh_info::CellMetric::Jacobian; - case vtkm::filter::CellMetric::MAX_ANGLE: - return vtkm::filter::mesh_info::CellMetric::MaxAngle; - case vtkm::filter::CellMetric::MAX_DIAGONAL: - return vtkm::filter::mesh_info::CellMetric::MaxDiagonal; - case vtkm::filter::CellMetric::MIN_ANGLE: - return vtkm::filter::mesh_info::CellMetric::MinAngle; - case vtkm::filter::CellMetric::MIN_DIAGONAL: - return vtkm::filter::mesh_info::CellMetric::MinDiagonal; - case vtkm::filter::CellMetric::ODDY: - return vtkm::filter::mesh_info::CellMetric::Oddy; - case vtkm::filter::CellMetric::RELATIVE_SIZE_SQUARED: - return vtkm::filter::mesh_info::CellMetric::RelativeSizeSquared; - case vtkm::filter::CellMetric::SCALED_JACOBIAN: - return vtkm::filter::mesh_info::CellMetric::ScaledJacobian; - case vtkm::filter::CellMetric::SHAPE: - return vtkm::filter::mesh_info::CellMetric::Shape; - case vtkm::filter::CellMetric::SHAPE_AND_SIZE: - return vtkm::filter::mesh_info::CellMetric::ShapeAndSize; - case vtkm::filter::CellMetric::SHEAR: - return vtkm::filter::mesh_info::CellMetric::Shear; - case vtkm::filter::CellMetric::SKEW: - return vtkm::filter::mesh_info::CellMetric::Skew; - case vtkm::filter::CellMetric::STRETCH: - return vtkm::filter::mesh_info::CellMetric::Stretch; - case vtkm::filter::CellMetric::TAPER: - return vtkm::filter::mesh_info::CellMetric::Taper; - case vtkm::filter::CellMetric::VOLUME: - return vtkm::filter::mesh_info::CellMetric::Volume; - case vtkm::filter::CellMetric::WARPAGE: - return vtkm::filter::mesh_info::CellMetric::Warpage; - default: - throw vtkm::cont::ErrorBadValue("Invalid mesh quality metric."); - } -} - -VTKM_DEPRECATED_SUPPRESS_END - -} // namespace filter -} // namespace vtkm diff --git a/vtkm/filter/mesh_info/MeshQuality.h b/vtkm/filter/mesh_info/MeshQuality.h index 1bdd4a642..b5c208b6a 100644 --- a/vtkm/filter/mesh_info/MeshQuality.h +++ b/vtkm/filter/mesh_info/MeshQuality.h @@ -77,79 +77,6 @@ private: CellMetric MyMetric; }; } // namespace mesh_info - -VTKM_DEPRECATED_SUPPRESS_BEGIN -VTKM_DEPRECATED(1.8) -static const std::string MetricNames[] = { "area", - "aspectGamma", - "aspectRatio", - "condition", - "diagonalRatio", - "dimension", - "jacobian", - "maxAngle", - "maxDiagonal", - "minAngle", - "minDiagonal", - "oddy", - "relativeSizeSquared", - "scaledJacobian", - "shape", - "shapeAndSize", - "shear", - "skew", - "stretch", - "taper", - "volume", - "warpage" }; -VTKM_DEPRECATED_SUPPRESS_END - -enum struct VTKM_DEPRECATED(1.8 "Use vtkm::filter::mesh_info::CellMetric.") CellMetric -{ - AREA, - ASPECT_GAMMA, - ASPECT_RATIO, - CONDITION, - DIAGONAL_RATIO, - DIMENSION, - JACOBIAN, - MAX_ANGLE, - MAX_DIAGONAL, - MIN_ANGLE, - MIN_DIAGONAL, - ODDY, - RELATIVE_SIZE_SQUARED, - SCALED_JACOBIAN, - SHAPE, - SHAPE_AND_SIZE, - SHEAR, - SKEW, - STRETCH, - TAPER, - VOLUME, - WARPAGE, - NUMBER_OF_CELL_METRICS, - EMPTY -}; - -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::mesh_info::MeshQuality.") - VTKM_FILTER_MESH_INFO_EXPORT MeshQuality : public vtkm::filter::mesh_info::MeshQuality -{ - VTKM_DEPRECATED_SUPPRESS_BEGIN - static vtkm::filter::mesh_info::CellMetric ConvertCellMetric( - vtkm::filter::CellMetric oldMetricEnum); - VTKM_DEPRECATED_SUPPRESS_END - -public: - using mesh_info::MeshQuality::MeshQuality; - - VTKM_DEPRECATED_SUPPRESS_BEGIN - MeshQuality(vtkm::filter::CellMetric oldMetric) - : mesh_info::MeshQuality(ConvertCellMetric(oldMetric)) - { - } - VTKM_DEPRECATED_SUPPRESS_END -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/multi_block/AmrArrays.h b/vtkm/filter/multi_block/AmrArrays.h index 505d31dc0..d5d5b7c57 100644 --- a/vtkm/filter/multi_block/AmrArrays.h +++ b/vtkm/filter/multi_block/AmrArrays.h @@ -70,14 +70,6 @@ private: std::vector> ChildrenIdsVector; }; } // namespace multi_block - - -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::multi_block::AmrArrays.") AmrArrays - : public vtkm::filter::multi_block::AmrArrays -{ - using multi_block::AmrArrays::AmrArrays; -}; - } // namesapce filter } // namespace vtkm diff --git a/vtkm/filter/resampling/Probe.h b/vtkm/filter/resampling/Probe.h index 2b896a260..f311fd7f1 100644 --- a/vtkm/filter/resampling/Probe.h +++ b/vtkm/filter/resampling/Probe.h @@ -43,13 +43,6 @@ private: vtkm::Float64 InvalidValue = vtkm::Nan64(); }; } // namespace resampling - -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::resampling::Probe.") Probe - : public vtkm::filter::resampling::Probe -{ - using resampling::Probe::Probe; -}; - } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/scalar_topology/ContourTreeUniform.h b/vtkm/filter/scalar_topology/ContourTreeUniform.h index 9de8d050d..b233aaa51 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniform.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniform.h @@ -100,16 +100,6 @@ private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace scalar_topology -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::scalar_topology::ContourTree2D.") ContourTree2D - : public vtkm::filter::scalar_topology::ContourTreeMesh2D -{ - using scalar_topology::ContourTreeMesh2D::ContourTreeMesh2D; -}; -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::scalar_topology::ContourTree3D.") ContourTree3D - : public vtkm::filter::scalar_topology::ContourTreeMesh3D -{ - using scalar_topology::ContourTreeMesh3D::ContourTreeMesh3D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h b/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h index aadb869c8..08cd51787 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniformAugmented.h @@ -120,19 +120,6 @@ public: void SetBlockIndices(vtkm::Id3 blocksPerDim, const vtkm::cont::ArrayHandle& localBlockIndices); - VTKM_CONT - VTKM_DEPRECATED(1.9, - "Set PointSize, GlobalPointOrigin, and GlobalPointSize in CellSetStructured and " - "optionally use SetBlockIndices.") - void SetSpatialDecomposition(vtkm::Id3 blocksPerDim, - vtkm::Id3, - const vtkm::cont::ArrayHandle& localBlockIndices, - const vtkm::cont::ArrayHandle&, - const vtkm::cont::ArrayHandle&) - { - SetBlockIndices(blocksPerDim, localBlockIndices); - } - ///@{ /// Get the contour tree computed by the filter const vtkm::worklet::contourtree_augmented::ContourTree& GetContourTree() const; @@ -185,11 +172,6 @@ private: MultiBlockTreeHelper; }; } // namespace scalar_topology -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::scalar_topology::ContourTreeAugmented.") - ContourTreeAugmented : public vtkm::filter::scalar_topology::ContourTreeAugmented -{ - using scalar_topology::ContourTreeAugmented::ContourTreeAugmented; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.cxx b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.cxx index a4de37b00..03714050a 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.cxx +++ b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.cxx @@ -164,30 +164,6 @@ void SaveHierarchicalTreeDot( //----------------------------------------------------------------------------- // Main constructor //----------------------------------------------------------------------------- -ContourTreeUniformDistributed::ContourTreeUniformDistributed( - vtkm::Id3 blocksPerDim, - vtkm::Id3, // globalSize, -> Now in CellSetStructured - const vtkm::cont::ArrayHandle& localBlockIndices, - const vtkm::cont::ArrayHandle&, // localBlockOrigins, -> Use from CellSetStructured - const vtkm::cont::ArrayHandle&, // localBlockSizes, -> Use from CellSetStructured - vtkm::cont::LogLevel timingsLogLevel, - vtkm::cont::LogLevel treeLogLevel) - : UseBoundaryExtremaOnly(true) - , UseMarchingCubes(false) - , AugmentHierarchicalTree(false) - , SaveDotFiles(false) - , TimingsLogLevel(timingsLogLevel) - , TreeLogLevel(treeLogLevel) - , BlocksPerDimension(blocksPerDim) - , LocalBlockIndices(localBlockIndices) - , LocalMeshes() - , LocalContourTrees() - , LocalBoundaryTrees() - , LocalInteriorForests() -{ - this->SetOutputFieldName("resultData"); -} - ContourTreeUniformDistributed::ContourTreeUniformDistributed(vtkm::cont::LogLevel timingsLogLevel, vtkm::cont::LogLevel treeLogLevel) : UseBoundaryExtremaOnly(true) diff --git a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h index bafebbc21..952ba8a0d 100644 --- a/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h +++ b/vtkm/filter/scalar_topology/ContourTreeUniformDistributed.h @@ -97,33 +97,6 @@ public: return false; } - /// - /// Create the contour tree filter - /// @param[in] blocksPerDim Number of data blocks used in each data dimension - /// @param[in] globalSize Global extends of the input mesh (i.e., number of mesh points in each dimension) - /// @param[in] localBlockIndices Array with the (x,y,z) index of each local data block with - /// with respect to blocksPerDim - /// @param[in] localBlockOrigins Array with the (x,y,z) origin (with regard to mesh index) of each - /// local data block - /// @param[in] localBlockSizes Array with the sizes (i.e., extends in number of mesh points) of each - /// local data block - /// @param[in] timingsLogLevel Set the vtkm::cont:LogLevel to be used to record timings information - /// specific to the computation of the hierachical contour tree - /// @param[in] treeLogLevel Set the vtkm::cont:LogLevel to be used to record metadata information - /// about the various trees computed as part of the hierarchical contour tree compute - VTKM_CONT - VTKM_DEPRECATED( - 1.9, - "Use default constructor and set PointSize, GlobalPointIndexStart, and GlobalPointSize in " - "CellSetStructured. Optionally use `SetBlockIndices` accessor (if information is available).") - ContourTreeUniformDistributed(vtkm::Id3 blocksPerDim, - vtkm::Id3 globalSize, - const vtkm::cont::ArrayHandle& localBlockIndices, - const vtkm::cont::ArrayHandle& localBlockOrigins, - const vtkm::cont::ArrayHandle& localBlockSizes, - vtkm::cont::LogLevel timingsLogLevel = vtkm::cont::LogLevel::Perf, - vtkm::cont::LogLevel treeLogLevel = vtkm::cont::LogLevel::Info); - ContourTreeUniformDistributed(vtkm::cont::LogLevel timingsLogLevel = vtkm::cont::LogLevel::Perf, vtkm::cont::LogLevel treeLogLevel = vtkm::cont::LogLevel::Info); @@ -248,33 +221,6 @@ private: vtkm::Id NumIterations; }; } // namespace scalar_topology -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::scalar_topology::ContourTreeUniformDistributed.") - ContourTreeUniformDistributed - : public vtkm::filter::scalar_topology::ContourTreeUniformDistributed -{ - using scalar_topology::ContourTreeUniformDistributed::ContourTreeUniformDistributed; - - ContourTreeUniformDistributed(vtkm::Id3 blocksPerDim, - vtkm::Id3, - const vtkm::cont::ArrayHandle& localBlockIndices, - const vtkm::cont::ArrayHandle&, - const vtkm::cont::ArrayHandle&, - bool useBoundaryExtremaOnly = true, - bool useMarchingCubes = false, - bool augmentHierarchicalTree = false, - bool saveDotFiles = false, - vtkm::cont::LogLevel timingsLogLevel = vtkm::cont::LogLevel::Perf, - vtkm::cont::LogLevel treeLogLevel = vtkm::cont::LogLevel::Info) - : vtkm::filter::scalar_topology::ContourTreeUniformDistributed(timingsLogLevel, treeLogLevel) - { - this->SetUseBoundaryExtremaOnly(useBoundaryExtremaOnly); - this->SetUseMarchingCubes(useMarchingCubes); - this->SetAugmentHierarchicalTree(augmentHierarchicalTree); - this->SetSaveDotFiles(saveDotFiles); - this->SetBlockIndices(blocksPerDim, localBlockIndices); - this->SetOutputFieldName("resultData"); - } -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/testing/CMakeLists.txt b/vtkm/filter/testing/CMakeLists.txt index 4a737220b..e7972df48 100644 --- a/vtkm/filter/testing/CMakeLists.txt +++ b/vtkm/filter/testing/CMakeLists.txt @@ -9,7 +9,6 @@ ##============================================================================ set(unit_tests - UnitTestFieldMetadata.cxx UnitTestFieldSelection.cxx UnitTestMapFieldMergeAverage.cxx UnitTestMapFieldPermutation.cxx diff --git a/vtkm/filter/testing/UnitTestFieldMetadata.cxx b/vtkm/filter/testing/UnitTestFieldMetadata.cxx deleted file mode 100644 index 2893716f4..000000000 --- a/vtkm/filter/testing/UnitTestFieldMetadata.cxx +++ /dev/null @@ -1,80 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include -#include - -VTKM_DEPRECATED_SUPPRESS_BEGIN -namespace -{ - -vtkm::cont::Field makePointField() -{ - return vtkm::cont::Field( - "foo", vtkm::cont::Field::Association::Points, vtkm::cont::ArrayHandle()); -} - -void TestFieldTypesUnknown() -{ - vtkm::filter::FieldMetadata defaultMD; - VTKM_TEST_ASSERT(defaultMD.IsPointField() == false, "default is not point or cell"); - VTKM_TEST_ASSERT(defaultMD.IsCellField() == false, "default is not point or cell"); - - //verify the field helper works properly - vtkm::cont::Field field1; - vtkm::filter::FieldMetadata makeMDFromField(field1); - VTKM_TEST_ASSERT(makeMDFromField.IsPointField() == false, "makeMDFromField is not point or cell"); - VTKM_TEST_ASSERT(makeMDFromField.IsCellField() == false, "makeMDFromField is not point or cell"); -} - -void TestFieldTypesPoint() -{ - vtkm::filter::FieldMetadata helperMD(makePointField()); - VTKM_TEST_ASSERT(helperMD.IsPointField() == true, "point should be a point field"); - VTKM_TEST_ASSERT(helperMD.IsCellField() == false, "point can't be a cell field"); - - //verify the field helper works properly - auto field = vtkm::cont::make_FieldPoint( - "pointvar", - vtkm::cont::make_ArrayHandle({ 10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f })); - vtkm::filter::FieldMetadata makeMDFromField(field); - VTKM_TEST_ASSERT(makeMDFromField.IsPointField() == true, "point should be a point field"); - VTKM_TEST_ASSERT(makeMDFromField.IsCellField() == false, "point can't be a cell field"); -} - -void TestFieldTypesCell() -{ - vtkm::filter::FieldMetadata helperMD( - vtkm::cont::make_FieldCell("foo", vtkm::cont::ArrayHandle())); - VTKM_TEST_ASSERT(helperMD.IsPointField() == false, "cell can't be a point field"); - VTKM_TEST_ASSERT(helperMD.IsCellField() == true, "cell should be a cell field"); - - //verify the field helper works properly - auto field = vtkm::cont::make_FieldCell( - "pointvar", - vtkm::cont::make_ArrayHandle({ 10.1f, 20.1f, 30.1f, 40.1f, 50.1f, 60.1f })); - vtkm::filter::FieldMetadata makeMDFromField(field); - VTKM_TEST_ASSERT(makeMDFromField.IsPointField() == false, "cell can't be a point field"); - VTKM_TEST_ASSERT(makeMDFromField.IsCellField() == true, "cell should be a cell field"); -} - -void TestFieldMetadata() -{ - TestFieldTypesUnknown(); - TestFieldTypesPoint(); - TestFieldTypesCell(); -} -} - -int UnitTestFieldMetadata(int argc, char* argv[]) -{ - return vtkm::cont::testing::Testing::Run(TestFieldMetadata, argc, argv); -} -VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/filter/vector_analysis/CrossProduct.h b/vtkm/filter/vector_analysis/CrossProduct.h index 0ca8b25a6..2ee861320 100644 --- a/vtkm/filter/vector_analysis/CrossProduct.h +++ b/vtkm/filter/vector_analysis/CrossProduct.h @@ -123,11 +123,6 @@ private: }; } // namespace vector_analysis -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::vector_analysis::CrossProduct.") CrossProduct - : public vtkm::filter::vector_analysis::CrossProduct -{ - using vector_analysis::CrossProduct::CrossProduct; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/vector_analysis/DotProduct.h b/vtkm/filter/vector_analysis/DotProduct.h index 02325f413..c15573e37 100644 --- a/vtkm/filter/vector_analysis/DotProduct.h +++ b/vtkm/filter/vector_analysis/DotProduct.h @@ -122,11 +122,6 @@ private: vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace vector_analysis -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::vector_analysis::DotProduct.") DotProduct - : public vtkm::filter::vector_analysis::DotProduct -{ - using vector_analysis::DotProduct::DotProduct; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/vector_analysis/Gradient.h b/vtkm/filter/vector_analysis/Gradient.h index e971c2dba..527fe8a8e 100644 --- a/vtkm/filter/vector_analysis/Gradient.h +++ b/vtkm/filter/vector_analysis/Gradient.h @@ -104,11 +104,6 @@ private: }; } // namespace vector_analysis -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::vector_analysis::Gradient.") Gradient - : public vtkm::filter::vector_analysis::Gradient -{ - using vector_analysis::Gradient::Gradient; -}; } // namespace filter } // namespace vtkm::filter diff --git a/vtkm/filter/vector_analysis/SurfaceNormals.h b/vtkm/filter/vector_analysis/SurfaceNormals.h index 821d1f866..d0a34bf1d 100644 --- a/vtkm/filter/vector_analysis/SurfaceNormals.h +++ b/vtkm/filter/vector_analysis/SurfaceNormals.h @@ -108,11 +108,6 @@ private: std::string PointNormalsName; }; } // namespace vector_analysis -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::vector_analysis::SurfaceNormals.") SurfaceNormals - : public vtkm::filter::vector_analysis::SurfaceNormals -{ - using vector_analysis::SurfaceNormals::SurfaceNormals; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/vector_analysis/VectorMagnitude.h b/vtkm/filter/vector_analysis/VectorMagnitude.h index 9de73a729..9d4c0b7c2 100644 --- a/vtkm/filter/vector_analysis/VectorMagnitude.h +++ b/vtkm/filter/vector_analysis/VectorMagnitude.h @@ -29,11 +29,6 @@ private: VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override; }; } // namespace vector_analysis -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::vector_analysis::VectorMagnitude.") VectorMagnitude - : public vtkm::filter::vector_analysis::VectorMagnitude -{ - using vector_analysis::VectorMagnitude::VectorMagnitude; -}; } // namespace filter } // namespace vtkm::filter diff --git a/vtkm/filter/zfp/ZFPCompressor1D.h b/vtkm/filter/zfp/ZFPCompressor1D.h index dbdfbdd16..a02e37cdf 100644 --- a/vtkm/filter/zfp/ZFPCompressor1D.h +++ b/vtkm/filter/zfp/ZFPCompressor1D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPCompressor1D.") ZFPCompressor1D - : public vtkm::filter::zfp::ZFPCompressor1D -{ - using zfp::ZFPCompressor1D::ZFPCompressor1D; -}; } // namespace filter } // namespace vtkm::filter diff --git a/vtkm/filter/zfp/ZFPCompressor2D.h b/vtkm/filter/zfp/ZFPCompressor2D.h index df1e8f7c5..468db08e0 100644 --- a/vtkm/filter/zfp/ZFPCompressor2D.h +++ b/vtkm/filter/zfp/ZFPCompressor2D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPCompressor2D.") ZFPCompressor2D - : public vtkm::filter::zfp::ZFPCompressor2D -{ - using zfp::ZFPCompressor2D::ZFPCompressor2D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/zfp/ZFPCompressor3D.h b/vtkm/filter/zfp/ZFPCompressor3D.h index 2adf3f80f..592849ecd 100644 --- a/vtkm/filter/zfp/ZFPCompressor3D.h +++ b/vtkm/filter/zfp/ZFPCompressor3D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPCompressor3D.") ZFPCompressor3D - : public vtkm::filter::zfp::ZFPCompressor3D -{ - using zfp::ZFPCompressor3D::ZFPCompressor3D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/zfp/ZFPDecompressor1D.h b/vtkm/filter/zfp/ZFPDecompressor1D.h index 3ef5bcb72..4283e4cb9 100644 --- a/vtkm/filter/zfp/ZFPDecompressor1D.h +++ b/vtkm/filter/zfp/ZFPDecompressor1D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPDecompressor1D.") ZFPDecompressor1D - : public vtkm::filter::zfp::ZFPDecompressor1D -{ - using zfp::ZFPDecompressor1D::ZFPDecompressor1D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/zfp/ZFPDecompressor2D.h b/vtkm/filter/zfp/ZFPDecompressor2D.h index 4aaa0f4e5..bda18ed84 100644 --- a/vtkm/filter/zfp/ZFPDecompressor2D.h +++ b/vtkm/filter/zfp/ZFPDecompressor2D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPDecompressor2D.") ZFPDecompressor2D - : public vtkm::filter::zfp::ZFPDecompressor2D -{ - using zfp::ZFPDecompressor2D::ZFPDecompressor2D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/filter/zfp/ZFPDecompressor3D.h b/vtkm/filter/zfp/ZFPDecompressor3D.h index 19c6b05bd..8245e6f34 100644 --- a/vtkm/filter/zfp/ZFPDecompressor3D.h +++ b/vtkm/filter/zfp/ZFPDecompressor3D.h @@ -38,11 +38,6 @@ private: vtkm::Float64 rate = 0; }; } // namespace zfp -class VTKM_DEPRECATED(1.8, "Use vtkm::filter::zfp::ZFPDecompressor3D.") ZFPDecompressor3D - : public vtkm::filter::zfp::ZFPDecompressor3D -{ - using zfp::ZFPDecompressor3D::ZFPDecompressor3D; -}; } // namespace filter } // namespace vtkm diff --git a/vtkm/internal/VariantImpl.h b/vtkm/internal/VariantImpl.h index 09d949b70..1d5a62571 100644 --- a/vtkm/internal/VariantImpl.h +++ b/vtkm/internal/VariantImpl.h @@ -17,7 +17,6 @@ #include -#include #include #include @@ -543,16 +542,6 @@ public: } }; -/// \brief Convert a ListTag to a Variant. -/// -/// Depricated. Use ListAsVariant instead. -/// -template -using ListTagAsVariant VTKM_DEPRECATED( - 1.6, - "vtkm::ListTag is no longer supported. Use vtkm::List instead.") = - vtkm::ListApply; - /// \brief Convert a `List` to a `Variant`. /// template diff --git a/vtkm/io/CMakeLists.txt b/vtkm/io/CMakeLists.txt index 740b46fba..5c6c17f12 100644 --- a/vtkm/io/CMakeLists.txt +++ b/vtkm/io/CMakeLists.txt @@ -89,5 +89,3 @@ if (VTKm_ENABLE_HDF5_IO) endif() add_subdirectory(internal) -add_subdirectory(reader) -add_subdirectory(writer) diff --git a/vtkm/io/reader/BOVDataSetReader.h b/vtkm/io/reader/BOVDataSetReader.h deleted file mode 100644 index 5b19480cf..000000000 --- a/vtkm/io/reader/BOVDataSetReader.h +++ /dev/null @@ -1,40 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_io_reader_BOVDataSetReader_h -#define vtk_m_io_reader_BOVDataSetReader_h - -#include -#include - -namespace vtkm -{ -namespace io -{ -namespace reader -{ - -class VTKM_DEPRECATED(1.6, "Please use vtkm::io::BOVDataSetReader.") BOVDataSetReader - : public io::BOVDataSetReader -{ -public: - BOVDataSetReader(const char* fileName) - : io::BOVDataSetReader(fileName) - { - } - BOVDataSetReader(const std::string& fileName) - : io::BOVDataSetReader(fileName) - { - } -}; -} -} -} // vtkm::io::reader - -#endif // vtk_m_io_reader_BOVReader_h diff --git a/vtkm/io/reader/CMakeLists.txt b/vtkm/io/reader/CMakeLists.txt deleted file mode 100644 index 2128ba0a7..000000000 --- a/vtkm/io/reader/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -##============================================================================ -## Copyright (c) Kitware, Inc. -## All rights reserved. -## See LICENSE.txt for details. -## -## This software is distributed WITHOUT ANY WARRANTY; without even -## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE. See the above copyright notice for more information. -##============================================================================ - -set(headers - BOVDataSetReader.h - VTKDataSetReader.h -) - -vtkm_declare_headers( - ${headers} -) diff --git a/vtkm/io/reader/VTKDataSetReader.h b/vtkm/io/reader/VTKDataSetReader.h deleted file mode 100644 index 0f3f99573..000000000 --- a/vtkm/io/reader/VTKDataSetReader.h +++ /dev/null @@ -1,41 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_io_reader_VTKDataSetReader_h -#define vtk_m_io_reader_VTKDataSetReader_h - -#include -#include - -namespace vtkm -{ -namespace io -{ -namespace reader -{ - -class VTKM_DEPRECATED(1.6, "Please use vtkm::io::VTKDataSetReader.") VTKDataSetReader - : public io::VTKDataSetReader -{ -public: - explicit VTKDataSetReader(const char* fileName) - : io::VTKDataSetReader(fileName) - { - } - - explicit VTKDataSetReader(const std::string& fileName) - : io::VTKDataSetReader(fileName) - { - } -}; -} -} -} // vtkm::io::reader - -#endif // vtk_m_io_reader_VTKReader_h diff --git a/vtkm/io/writer/CMakeLists.txt b/vtkm/io/writer/CMakeLists.txt deleted file mode 100644 index 9d88e46f2..000000000 --- a/vtkm/io/writer/CMakeLists.txt +++ /dev/null @@ -1,17 +0,0 @@ -##============================================================================ -## Copyright (c) Kitware, Inc. -## All rights reserved. -## See LICENSE.txt for details. -## -## This software is distributed WITHOUT ANY WARRANTY; without even -## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -## PURPOSE. See the above copyright notice for more information. -##============================================================================ - -set(headers - VTKDataSetWriter.h -) - -vtkm_declare_headers( - ${headers} -) diff --git a/vtkm/io/writer/VTKDataSetWriter.h b/vtkm/io/writer/VTKDataSetWriter.h deleted file mode 100644 index da8e3aa28..000000000 --- a/vtkm/io/writer/VTKDataSetWriter.h +++ /dev/null @@ -1,36 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_io_writer_DataSetWriter_h -#define vtk_m_io_writer_DataSetWriter_h - -#include -#include - -namespace vtkm -{ -namespace io -{ -namespace writer -{ - -struct VTKM_DEPRECATED(1.6, "Please use vtkm::io::VTKDataSetWriter") VTKDataSetWriter - : vtkm::io::VTKDataSetWriter -{ -public: - VTKDataSetWriter(const std::string& filename) - : vtkm::io::VTKDataSetWriter(filename) - { - } -}; -} -} -} //namespace vtkm::io::writer - -#endif //vtk_m_io_writer_DataSetWriter_h diff --git a/vtkm/rendering/CMakeLists.txt b/vtkm/rendering/CMakeLists.txt index 79f56a11b..e19985206 100644 --- a/vtkm/rendering/CMakeLists.txt +++ b/vtkm/rendering/CMakeLists.txt @@ -24,8 +24,6 @@ set(headers ColorLegendAnnotation.h ConnectivityProxy.h Cylinderizer.h - DecodePNG.h # deprecated - EncodePNG.h # deprecated GlyphType.h LineRenderer.h LineRendererBatcher.h diff --git a/vtkm/rendering/Camera.h b/vtkm/rendering/Camera.h index 10918a351..2e8113db0 100644 --- a/vtkm/rendering/Camera.h +++ b/vtkm/rendering/Camera.h @@ -13,7 +13,6 @@ #include #include -#include #include #include #include @@ -98,9 +97,6 @@ public: TwoD, ThreeD, }; - using ModeEnum VTKM_DEPRECATED(1.8, "Use Camaera::Mode") = Mode; - VTKM_DEPRECATED(1.8, "Use Camera::Mode::TwoD.") static constexpr Mode MODE_2D = Mode::TwoD; - VTKM_DEPRECATED(1.8, "Use Camera::Mode::ThreeD.") static constexpr Mode MODE_3D = Mode::ThreeD; VTKM_CONT Camera(Mode vtype = Camera::Mode::ThreeD) diff --git a/vtkm/rendering/Canvas.h b/vtkm/rendering/Canvas.h index bd54a4f36..6da78559b 100644 --- a/vtkm/rendering/Canvas.h +++ b/vtkm/rendering/Canvas.h @@ -13,7 +13,6 @@ #include -#include #include #include #include @@ -44,17 +43,8 @@ public: virtual vtkm::rendering::Canvas* NewCopy() const; - VTKM_DEPRECATED(1.6, "Initialize() does nothing.") - virtual void Initialize() {} - - VTKM_DEPRECATED(1.6, "Activate() does nothing.") - virtual void Activate() {} - virtual void Clear(); - VTKM_DEPRECATED(1.6, "Finish() does nothing.") - virtual void Finish() {} - virtual void BlendBackground(); VTKM_CONT diff --git a/vtkm/rendering/ConnectivityProxy.h b/vtkm/rendering/ConnectivityProxy.h index de41793d2..6212f0384 100644 --- a/vtkm/rendering/ConnectivityProxy.h +++ b/vtkm/rendering/ConnectivityProxy.h @@ -11,7 +11,6 @@ #define vtk_m_rendering_ConnectivityProxy_h #include -#include #include #include #include @@ -42,13 +41,7 @@ public: { Volume, Energy, - VOLUME_MODE VTKM_DEPRECATED(1.8, "Use Volume.") = Volume, - ENERGY_MODE VTKM_DEPRECATED(1.8, "Use Energy.") = Energy }; - VTKM_DEPRECATED(1.8, "Use ConnectivityProxy::RenderMode::Volume") - static constexpr RenderMode VOLUME_MODE = RenderMode::Volume; - VTKM_DEPRECATED(1.8, "Use ConnectivityProxy::RenderMode::Energy") - static constexpr RenderMode ENERGY_MODE = RenderMode::Energy; void SetRenderMode(RenderMode mode); void SetSampleDistance(const vtkm::Float32&); diff --git a/vtkm/rendering/DecodePNG.h b/vtkm/rendering/DecodePNG.h deleted file mode 100644 index 641382eb7..000000000 --- a/vtkm/rendering/DecodePNG.h +++ /dev/null @@ -1,34 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_rendering_DecodePNG_h -#define vtk_m_rendering_DecodePNG_h -#include -#include -#include - -namespace vtkm -{ -namespace rendering -{ - -VTKM_RENDERING_EXPORT -vtkm::UInt32 DecodePNG(std::vector& out_image, - unsigned long& image_width, - unsigned long& image_height, - const unsigned char* in_png, - std::size_t in_size) VTKM_DEPRECATED(1.6, "Please use vtkm::io::DecodePNG") -{ - return vtkm::io::DecodePNG(out_image, image_width, image_height, in_png, in_size); -} -} -} // vtkm::rendering - - -#endif diff --git a/vtkm/rendering/EncodePNG.h b/vtkm/rendering/EncodePNG.h deleted file mode 100644 index 160ebedda..000000000 --- a/vtkm/rendering/EncodePNG.h +++ /dev/null @@ -1,42 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtk_m_rendering_EncodePNG_h -#define vtk_m_rendering_EncodePNG_h - -#include -#include - -namespace vtkm -{ -namespace rendering -{ - -VTKM_RENDERING_EXPORT -vtkm::UInt32 EncodePNG(std::vector const& image, - unsigned long width, - unsigned long height, - unsigned char* out_png, - std::size_t out_size) VTKM_DEPRECATED(1.6, "Please use vtkm::io::EncodePNG.") -{ - return io::EncodePNG(image, width, height, out_png, out_size); -} - -VTKM_IO_EXPORT -vtkm::UInt32 SavePNG(std::string const& filename, - std::vector const& image, - unsigned long width, - unsigned long height) VTKM_DEPRECATED("Please use SavePNG from vtkm::io") -{ - return io::SavePNG(filename, image, width, height); -} -} -} // vtkm::rendering - -#endif //vtk_m_rendering_EncodePNG_h diff --git a/vtkm/rendering/Mapper.h b/vtkm/rendering/Mapper.h index 5ee3abced..df3c95c69 100644 --- a/vtkm/rendering/Mapper.h +++ b/vtkm/rendering/Mapper.h @@ -10,7 +10,6 @@ #ifndef vtk_m_rendering_Mapper_h #define vtk_m_rendering_Mapper_h -#include #include #include #include @@ -39,12 +38,6 @@ public: virtual void SetActiveColorTable(const vtkm::cont::ColorTable& ct); - VTKM_DEPRECATED(1.6, "StartScene() does nothing") - void StartScene() {} - - VTKM_DEPRECATED(1.6, "EndScene() does nothing") - void EndScene() {} - virtual void SetCanvas(vtkm::rendering::Canvas* canvas) = 0; virtual vtkm::rendering::Canvas* GetCanvas() const = 0; diff --git a/vtkm/rendering/TextAnnotation.h b/vtkm/rendering/TextAnnotation.h index dd2b7ae4f..7dae167e1 100644 --- a/vtkm/rendering/TextAnnotation.h +++ b/vtkm/rendering/TextAnnotation.h @@ -16,8 +16,6 @@ #include #include -#include - namespace vtkm { namespace rendering diff --git a/vtkm/rendering/View.cxx b/vtkm/rendering/View.cxx index e3c775c64..f99e5f87e 100644 --- a/vtkm/rendering/View.cxx +++ b/vtkm/rendering/View.cxx @@ -149,8 +149,6 @@ void View::SetForegroundColor(const vtkm::rendering::Color& color) this->Internal->CanvasPointer->SetForegroundColor(color); } -void View::Initialize() {} - void View::SaveAs(const std::string& fileName) const { this->GetCanvas().SaveAs(fileName); @@ -161,16 +159,6 @@ void View::SetAxisColor(vtkm::rendering::Color c) this->AxisColor = c; } -void View::ClearAnnotations() -{ - this->Internal->TextAnnotations.clear(); -} - -void View::AddAnnotation(std::unique_ptr ann) -{ - this->Internal->TextAnnotations.push_back(std::move(ann)); -} - void View::ClearTextAnnotations() { this->Internal->TextAnnotations.clear(); diff --git a/vtkm/rendering/View.h b/vtkm/rendering/View.h index e8c65b8e8..e964c136d 100644 --- a/vtkm/rendering/View.h +++ b/vtkm/rendering/View.h @@ -12,7 +12,6 @@ #include -#include #include #include #include @@ -93,9 +92,6 @@ public: VTKM_CONT void SetRenderAnnotationsEnabled(bool val) { this->RenderAnnotationsEnabled = val; } VTKM_CONT bool GetRenderAnnotationsEnabled() { return this->RenderAnnotationsEnabled; } - VTKM_DEPRECATED(1.6, "Initialize() does nothing.") - virtual void Initialize(); - virtual void Paint() = 0; virtual void RenderScreenAnnotations() = 0; virtual void RenderWorldAnnotations() = 0; @@ -104,11 +100,6 @@ public: void SaveAs(const std::string& fileName) const; - VTKM_CONT VTKM_DEPRECATED(1.6, "Use ClearTextAnnotations Instead") void ClearAnnotations(); - - VTKM_CONT VTKM_DEPRECATED(1.6, "Use AddTextAnnotation Instead") void AddAnnotation( - std::unique_ptr ann); - VTKM_CONT void SetAxisColor(vtkm::rendering::Color c); diff --git a/vtkm/rendering/raytracing/BoundingVolumeHierarchy.cxx b/vtkm/rendering/raytracing/BoundingVolumeHierarchy.cxx index 2d1314abc..5381ac39f 100644 --- a/vtkm/rendering/raytracing/BoundingVolumeHierarchy.cxx +++ b/vtkm/rendering/raytracing/BoundingVolumeHierarchy.cxx @@ -47,9 +47,6 @@ public: class GatherFloat32; - template - class GatherVecCast; - class CreateLeafs; class BVHData; @@ -118,37 +115,6 @@ public: } }; //class createLeafs -template -class LinearBVHBuilder::GatherVecCast : public vtkm::worklet::WorkletMapField -{ -private: - using Vec4IdArrayHandle = typename vtkm::cont::ArrayHandle; - using Vec4IntArrayHandle = typename vtkm::cont::ArrayHandle; - using PortalConst = typename Vec4IdArrayHandle::ReadPortalType; - using Portal = typename Vec4IntArrayHandle::WritePortalType; - -private: - PortalConst InputPortal; - Portal OutputPortal; - -public: - VTKM_CONT - GatherVecCast(const Vec4IdArrayHandle& inputPortal, - Vec4IntArrayHandle& outputPortal, - const vtkm::Id& size) - : InputPortal(inputPortal.PrepareForInput(DeviceAdapterTag())) - { - this->OutputPortal = outputPortal.PrepareForOutput(size, DeviceAdapterTag()); - } - using ControlSignature = void(FieldIn); - using ExecutionSignature = void(WorkIndex, _1); - VTKM_EXEC - void operator()(const vtkm::Id& outIndex, const vtkm::Id& inIndex) const - { - OutputPortal.Set(outIndex, InputPortal.Get(inIndex)); - } -}; //class GatherVec3Id - class LinearBVHBuilder::BVHData { public: diff --git a/vtkm/rendering/raytracing/Camera.cxx b/vtkm/rendering/raytracing/Camera.cxx index 1f9ef03ef..83d2e229d 100644 --- a/vtkm/rendering/raytracing/Camera.cxx +++ b/vtkm/rendering/raytracing/Camera.cxx @@ -500,20 +500,6 @@ void Camera::SetParameters(const vtkm::rendering::Camera& camera, this->CameraView = camera; } -VTKM_DEPRECATED(1.6, "Use the canvas width and height rather than the canvas itself.") -VTKM_CONT void Camera::SetParameters(const vtkm::rendering::Camera& camera, - vtkm::rendering::CanvasRayTracer& canvas) -{ - this->SetUp(camera.GetViewUp()); - this->SetLookAt(camera.GetLookAt()); - this->SetPosition(camera.GetPosition()); - this->SetZoom(camera.GetZoom()); - this->SetFieldOfView(camera.GetFieldOfView()); - this->SetHeight(vtkm::Int32(canvas.GetHeight())); - this->SetWidth(vtkm::Int32(canvas.GetWidth())); - this->CameraView = camera; -} - VTKM_CONT void Camera::SetHeight(const vtkm::Int32& height) diff --git a/vtkm/testing/CMakeLists.txt b/vtkm/testing/CMakeLists.txt index 3632b4d68..405d9df61 100644 --- a/vtkm/testing/CMakeLists.txt +++ b/vtkm/testing/CMakeLists.txt @@ -23,7 +23,6 @@ if(VTKm_ENABLE_TESTING) #UnitTestFunctionInterface.cxx #FIXME UnitTestHash.cxx UnitTestList.cxx - UnitTestListTag.cxx UnitTestMatrix.cxx UnitTestNewtonsMethod.cxx UnitTestNoAssert.cxx @@ -33,7 +32,6 @@ if(VTKm_ENABLE_TESTING) UnitTestTransform3D.cxx UnitTestTuple.cxx UnitTestTypeList.cxx - UnitTestTypeListTag.cxx UnitTestTypes.cxx UnitTestTypeTraits.cxx UnitTestUnaryPredicates.cxx @@ -48,7 +46,6 @@ if(VTKm_ENABLE_TESTING) # Unit tests that have device-specific code to be tested set(unit_tests_device - UnitTestAlgorithms.cxx UnitTestAtomic.cxx UnitTestGeometry.cxx UnitTestLowerBound.cxx diff --git a/vtkm/testing/UnitTestAlgorithms.cxx b/vtkm/testing/UnitTestAlgorithms.cxx deleted file mode 100644 index c76402047..000000000 --- a/vtkm/testing/UnitTestAlgorithms.cxx +++ /dev/null @@ -1,91 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#include - -VTKM_DEPRECATED_SUPPRESS_BEGIN -#include - -#include -#include - -#include - -#include - -namespace -{ - -using IdArray = vtkm::cont::ArrayHandle; - -struct TestBinarySearch -{ - struct Impl : public vtkm::worklet::WorkletMapField - { - using ControlSignature = void(FieldIn needles, WholeArrayIn haystack, FieldOut results); - using ExecutionSignature = _3(_1, _2); - using InputDomain = _1; - - template - VTKM_EXEC vtkm::Id operator()(vtkm::Id needle, const HaystackPortal& haystack) const - { - return vtkm::BinarySearch(haystack, needle); - } - }; - - static void Run() - { - IdArray needles = vtkm::cont::make_ArrayHandle({ -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 }); - IdArray haystack = - vtkm::cont::make_ArrayHandle({ -3, -2, -2, -2, 0, 0, 1, 1, 1, 4, 4 }); - IdArray results; - - std::vector expectedFound{ - false, true, true, false, true, true, false, false, true, false - }; - - vtkm::cont::Invoker invoke; - invoke(Impl{}, needles, haystack, results); - - // Verify: - auto needlesPortal = needles.ReadPortal(); - auto haystackPortal = haystack.ReadPortal(); - auto resultsPortal = results.ReadPortal(); - for (vtkm::Id i = 0; i < needles.GetNumberOfValues(); ++i) - { - if (expectedFound[static_cast(i)]) - { - const auto resIdx = resultsPortal.Get(i); - const auto expVal = needlesPortal.Get(i); - VTKM_TEST_ASSERT(resIdx >= 0); - VTKM_TEST_ASSERT(haystackPortal.Get(resIdx) == expVal); - } - else - { - VTKM_TEST_ASSERT(resultsPortal.Get(i) == -1); - } - } - } -}; - -void RunAlgorithmsTests() -{ - std::cout << "Testing binary search." << std::endl; - TestBinarySearch::Run(); -} - -} // anon namespace - -VTKM_DEPRECATED_SUPPRESS_END - -int UnitTestAlgorithms(int argc, char* argv[]) -{ - return vtkm::cont::testing::Testing::Run(RunAlgorithmsTests, argc, argv); -} diff --git a/vtkm/testing/UnitTestListTag.cxx b/vtkm/testing/UnitTestListTag.cxx deleted file mode 100644 index d00e9221e..000000000 --- a/vtkm/testing/UnitTestListTag.cxx +++ /dev/null @@ -1,340 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -// ListTag has been depricated. Until it is officially removed, we continue to test it, but -// disable the deprecated warnings while doing so. Once ListTag is officially removed, -// this entire test can be deleted. -#include -VTKM_DEPRECATED_SUPPRESS_BEGIN - -#include - -#include - -#include - -#include -#include - -namespace -{ - -template -struct TestClass -{ -}; - -struct TestListTag1 : vtkm::ListTagBase> -{ -}; -using TestListTagBackward1 = vtkm::List>; - -struct TestListTag2 : vtkm::ListTagBase, TestClass<22>> -{ -}; -using TestListTagBackward2 = vtkm::List, TestClass<22>>; - -struct TestListTag3 : vtkm::ListTagBase, TestClass<32>, TestClass<33>> -{ -}; -using TestListTagBackward3 = vtkm::List, TestClass<32>, TestClass<33>>; - -struct TestListTag4 : vtkm::ListTagBase, TestClass<42>, TestClass<43>, TestClass<44>> -{ -}; -using TestListTagBackward4 = vtkm::List, TestClass<42>, TestClass<43>, TestClass<44>>; - -struct TestListTagJoin : vtkm::ListTagJoin -{ -}; -struct TestListTagJoinBackward : vtkm::ListTagJoin -{ -}; - -struct TestListTagIntersect : vtkm::ListTagIntersect -{ -}; -struct TestListTagIntersectBackward - : vtkm::ListTagIntersect -{ -}; - -struct TestListTagCrossProduct : vtkm::ListCrossProduct -{ -}; -struct TestListTagCrossProductBackward - : vtkm::ListCrossProduct -{ -}; - -struct TestListTagUniversal : vtkm::ListTagUniversal -{ -}; - -struct TestListTagAppend : vtkm::ListTagAppend> -{ -}; -struct TestListTagAppendBackward : vtkm::ListTagAppend> -{ -}; - -struct TestListTagAppendUnique1 : vtkm::ListTagAppendUnique> -{ -}; -struct TestListTagAppendUniqueBackward1 - : vtkm::ListTagAppendUnique> -{ -}; - -struct TestListTagAppendUnique2 : vtkm::ListTagAppendUnique> -{ -}; -struct TestListTagAppendUniqueBackward2 - : vtkm::ListTagAppendUnique> -{ -}; - -template -struct DoubleTransformImpl; -template -struct DoubleTransformImpl> -{ - using type = TestClass<2 * N>; -}; - -template -using DoubleTransform = typename DoubleTransformImpl::type; - -struct TestListTagTransform : vtkm::ListTagTransform -{ -}; -struct TestListTagTransformBackward : vtkm::ListTagTransform -{ -}; - -template -struct EvenPredicate; -template -struct EvenPredicate> : std::integral_constant -{ -}; - -struct TestListTagRemoveIf : vtkm::ListTagRemoveIf -{ -}; -struct TestListTagRemoveIfBackward : vtkm::ListTagRemoveIf -{ -}; - -template -std::pair test_number(vtkm::List, TestClass>) -{ - return std::make_pair(N, M); -} - -template -int test_number(TestClass) -{ - return N; -} - -template -struct MutableFunctor -{ - std::vector FoundTypes; - - template - VTKM_CONT void operator()(U u) - { - this->FoundTypes.push_back(test_number(u)); - } -}; - -template -struct ConstantFunctor -{ - template - VTKM_CONT void operator()(U u, VectorType& vector) const - { - vector.push_back(test_number(u)); - } -}; - -template -void CheckSame(const vtkm::Vec& expected, const std::vector& found) -{ - VTKM_TEST_ASSERT(static_cast(found.size()) == N, "Got wrong number of items."); - - for (vtkm::IdComponent index = 0; index < N; index++) - { - vtkm::UInt32 i = static_cast(index); - VTKM_TEST_ASSERT(expected[index] == found[i], "Got wrong type."); - } -} - -template -void CheckContains(TestClass, ListTag, const std::vector& contents) -{ - bool listContains = vtkm::ListContains>::value; - bool shouldContain = std::find(contents.begin(), contents.end(), N) != contents.end(); - - VTKM_TEST_ASSERT(listContains == shouldContain, "ListContains check failed."); -} - -template -void CheckContains(TestClass, TestListTagUniversal, const std::vector&) -{ - //Use intersect to verify at compile time that ListTag contains TestClass - using intersectWith = vtkm::ListTagBase>; - using intersectResult = vtkm::ListTagIntersect; - constexpr bool intersectContains = (vtkm::ListSize::value != 0); - constexpr bool listContains = vtkm::ListContains>::value; - - VTKM_TEST_ASSERT(intersectContains == listContains, "ListTagIntersect check failed."); -} - -template -void TryList(const vtkm::Vec& expected, ListTag) -{ - VTKM_IS_LIST_TAG(ListTag); - - VTKM_STATIC_ASSERT(vtkm::ListSize::value == N); - - std::cout << " Try mutable for each" << std::endl; - MutableFunctor functor; - vtkm::ListForEach(functor, ListTag()); - CheckSame(expected, functor.FoundTypes); - - std::cout << " Try constant for each" << std::endl; - std::vector foundTypes; - ConstantFunctor cfunc; - vtkm::ListForEach(cfunc, ListTag(), foundTypes); - CheckSame(expected, foundTypes); - - std::cout << " Try checking contents" << std::endl; - CheckContains(TestClass<11>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<21>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<22>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<31>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<32>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<33>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<41>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<42>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<43>(), ListTag(), functor.FoundTypes); - CheckContains(TestClass<44>(), ListTag(), functor.FoundTypes); -} -template -void TryList(const vtkm::Vec, N>& expected, ListTag) -{ - VTKM_IS_LIST_TAG(ListTag); - - std::cout << " Try mutable for each" << std::endl; - MutableFunctor> functor; - vtkm::ListForEach(functor, ListTag()); - CheckSame(expected, functor.FoundTypes); - - std::cout << " Try constant for each" << std::endl; - std::vector> foundTypes; - ConstantFunctor> cfunc; - vtkm::ListForEach(cfunc, ListTag(), foundTypes); - CheckSame(expected, foundTypes); -} - -template -void TryList(const vtkm::Vec&, TestListTagUniversal tag) -{ - VTKM_IS_LIST_TAG(TestListTagUniversal); - - //TestListTagUniversal can't be used with for_each on purpose - - std::vector found; - std::cout << " Try checking contents" << std::endl; - CheckContains(TestClass<11>(), tag, found); - CheckContains(TestClass<21>(), tag, found); - CheckContains(TestClass<22>(), tag, found); - CheckContains(TestClass<31>(), tag, found); - CheckContains(TestClass<32>(), tag, found); - CheckContains(TestClass<33>(), tag, found); - CheckContains(TestClass<41>(), tag, found); - CheckContains(TestClass<42>(), tag, found); - CheckContains(TestClass<43>(), tag, found); - CheckContains(TestClass<44>(), tag, found); -} - -void TestLists() -{ - std::cout << "Valid List Tag Checks" << std::endl; - VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, "Failed list tag check"); - VTKM_TEST_ASSERT(vtkm::internal::ListTagCheck::value, "Failed list tag check"); - VTKM_TEST_ASSERT(!vtkm::internal::ListTagCheck>::value, "Failed list tag check"); - - std::cout << "ListTagEmpty" << std::endl; - TryList(vtkm::Vec(), vtkm::ListTagEmpty()); - - std::cout << "ListTagBase" << std::endl; - TryList(vtkm::Vec(11), TestListTag1()); - - std::cout << "ListTagBase2" << std::endl; - TryList(vtkm::Vec(21, 22), TestListTag2()); - - std::cout << "ListTagBase3" << std::endl; - TryList(vtkm::Vec(31, 32, 33), TestListTag3()); - - std::cout << "ListTagBase4" << std::endl; - TryList(vtkm::Vec(41, 42, 43, 44), TestListTag4()); - - std::cout << "ListTagJoin" << std::endl; - TryList(vtkm::Vec(31, 32, 33, 11), TestListTagJoin()); - TryList(vtkm::Vec(31, 32, 33, 11), TestListTagJoinBackward()); - - std::cout << "ListTagIntersect" << std::endl; - TryList(vtkm::Vec(31, 32, 33), TestListTagIntersect()); - TryList(vtkm::Vec(31, 32, 33), TestListTagIntersectBackward()); - - std::cout << "ListTagCrossProduct" << std::endl; - TryList(vtkm::Vec, 3>({ 31, 11 }, { 32, 11 }, { 33, 11 }), - TestListTagCrossProduct()); - TryList(vtkm::Vec, 3>({ 31, 11 }, { 32, 11 }, { 33, 11 }), - TestListTagCrossProductBackward()); - - std::cout << "ListTagAppend" << std::endl; - TryList(vtkm::Vec(31, 32, 33, 34), TestListTagAppend()); - TryList(vtkm::Vec(31, 32, 33, 34), TestListTagAppendBackward()); - - std::cout << "ListTagAppendUnique1" << std::endl; - TryList(vtkm::Vec(31, 32, 33), TestListTagAppendUnique1()); - TryList(vtkm::Vec(31, 32, 33), TestListTagAppendUniqueBackward1()); - - std::cout << "ListTagAppendUnique2" << std::endl; - TryList(vtkm::Vec(31, 32, 33, 34), TestListTagAppendUnique2()); - TryList(vtkm::Vec(31, 32, 33, 34), TestListTagAppendUniqueBackward2()); - - std::cout << "ListTagTransform" << std::endl; - TryList(vtkm::Vec(82, 84, 86, 88), TestListTagTransform()); - TryList(vtkm::Vec(82, 84, 86, 88), TestListTagTransformBackward()); - - std::cout << "ListTagRemoveIf" << std::endl; - TryList(vtkm::Vec(41, 43), TestListTagRemoveIf()); - TryList(vtkm::Vec(41, 43), TestListTagRemoveIfBackward()); - - - - std::cout << "ListTagUniversal" << std::endl; - TryList(vtkm::Vec(1, 2, 3, 4), TestListTagUniversal()); -} - -} // anonymous namespace - -int UnitTestListTag(int argc, char* argv[]) -{ - return vtkm::testing::Testing::Run(TestLists, argc, argv); -} - -VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/testing/UnitTestTypeListTag.cxx b/vtkm/testing/UnitTestTypeListTag.cxx deleted file mode 100644 index d332a5b0d..000000000 --- a/vtkm/testing/UnitTestTypeListTag.cxx +++ /dev/null @@ -1,305 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -// This tests deprecated code until it is deleted. -#include - -VTKM_DEPRECATED_SUPPRESS_BEGIN - -#include - -#include - -#include - -#include -#include - -namespace -{ - -class TypeSet -{ - using NameSetType = std::set; - NameSetType NameSet; - -public: - template - void AddExpected(T) - { - this->NameSet.insert(vtkm::testing::TypeName::Name()); - } - - template - void Found(T) - { - std::string name = vtkm::testing::TypeName::Name(); - //std::cout << " found " << name << std::endl; - NameSetType::iterator typeLocation = this->NameSet.find(name); - if (typeLocation != this->NameSet.end()) - { - // This type is expected. Remove it to mark it found. - this->NameSet.erase(typeLocation); - } - else - { - std::cout << "**** Did not expect to get type " << name << std::endl; - VTKM_TEST_FAIL("Got unexpected type."); - } - } - - void CheckFound() - { - for (NameSetType::iterator typeP = this->NameSet.begin(); typeP != this->NameSet.end(); typeP++) - { - std::cout << "**** Failed to find " << *typeP << std::endl; - } - VTKM_TEST_ASSERT(this->NameSet.empty(), "List did not call functor on all expected types."); - } -}; - -struct TestFunctor -{ - TypeSet ExpectedTypes; - - TestFunctor(const TypeSet& expectedTypes) - : ExpectedTypes(expectedTypes) - { - } - - template - VTKM_CONT void operator()(T) - { - this->ExpectedTypes.Found(T()); - } -}; - -template -void TryList(const TypeSet& expected, ListTag) -{ - TestFunctor functor(expected); - vtkm::ListForEach(functor, ListTag()); - functor.ExpectedTypes.CheckFound(); -} - -void TestLists() -{ - std::cout << "TypeListTagId" << std::endl; - TypeSet id; - id.AddExpected(vtkm::Id()); - TryList(id, vtkm::TypeListTagId()); - - std::cout << "TypeListTagId2" << std::endl; - TypeSet id2; - id2.AddExpected(vtkm::Id2()); - TryList(id2, vtkm::TypeListTagId2()); - - std::cout << "TypeListTagId3" << std::endl; - TypeSet id3; - id3.AddExpected(vtkm::Id3()); - TryList(id3, vtkm::TypeListTagId3()); - - std::cout << "TypeListTagIndex" << std::endl; - TypeSet index; - index.AddExpected(vtkm::Id()); - index.AddExpected(vtkm::Id2()); - index.AddExpected(vtkm::Id3()); - TryList(index, vtkm::TypeListTagIndex()); - - std::cout << "TypeListTagFieldScalar" << std::endl; - TypeSet scalar; - scalar.AddExpected(vtkm::Float32()); - scalar.AddExpected(vtkm::Float64()); - TryList(scalar, vtkm::TypeListTagFieldScalar()); - - std::cout << "TypeListTagFieldVec2" << std::endl; - TypeSet vec2; - vec2.AddExpected(vtkm::Vec2f_32()); - vec2.AddExpected(vtkm::Vec2f_64()); - TryList(vec2, vtkm::TypeListTagFieldVec2()); - - std::cout << "TypeListTagFieldVec3" << std::endl; - TypeSet vec3; - vec3.AddExpected(vtkm::Vec3f_32()); - vec3.AddExpected(vtkm::Vec3f_64()); - TryList(vec3, vtkm::TypeListTagFieldVec3()); - - std::cout << "TypeListTagFieldVec4" << std::endl; - TypeSet vec4; - vec4.AddExpected(vtkm::Vec4f_32()); - vec4.AddExpected(vtkm::Vec4f_64()); - TryList(vec4, vtkm::TypeListTagFieldVec4()); - - std::cout << "TypeListTagField" << std::endl; - TypeSet field; - field.AddExpected(vtkm::Float32()); - field.AddExpected(vtkm::Float64()); - field.AddExpected(vtkm::Vec2f_32()); - field.AddExpected(vtkm::Vec2f_64()); - field.AddExpected(vtkm::Vec3f_32()); - field.AddExpected(vtkm::Vec3f_64()); - field.AddExpected(vtkm::Vec4f_32()); - field.AddExpected(vtkm::Vec4f_64()); - TryList(field, vtkm::TypeListTagField()); - - std::cout << "TypeListTagCommon" << std::endl; - TypeSet common; - common.AddExpected(vtkm::Float32()); - common.AddExpected(vtkm::Float64()); - common.AddExpected(vtkm::UInt8()); - common.AddExpected(vtkm::Int32()); - common.AddExpected(vtkm::Int64()); - common.AddExpected(vtkm::Vec3f_32()); - common.AddExpected(vtkm::Vec3f_64()); - TryList(common, vtkm::TypeListTagCommon()); - - std::cout << "TypeListTagScalarAll" << std::endl; - TypeSet scalarsAll; - scalarsAll.AddExpected(vtkm::Float32()); - scalarsAll.AddExpected(vtkm::Float64()); - scalarsAll.AddExpected(vtkm::Int8()); - scalarsAll.AddExpected(vtkm::UInt8()); - scalarsAll.AddExpected(vtkm::Int16()); - scalarsAll.AddExpected(vtkm::UInt16()); - scalarsAll.AddExpected(vtkm::Int32()); - scalarsAll.AddExpected(vtkm::UInt32()); - scalarsAll.AddExpected(vtkm::Int64()); - scalarsAll.AddExpected(vtkm::UInt64()); - TryList(scalarsAll, vtkm::TypeListTagScalarAll()); - - std::cout << "TypeListBaseC" << std::endl; - TypeSet baseC; - baseC.AddExpected(vtkm::Float32()); - baseC.AddExpected(vtkm::Float64()); - baseC.AddExpected(vtkm::Int8()); - baseC.AddExpected(vtkm::UInt8()); - baseC.AddExpected(vtkm::Int16()); - baseC.AddExpected(vtkm::UInt16()); - baseC.AddExpected(vtkm::Int32()); - baseC.AddExpected(vtkm::UInt32()); - baseC.AddExpected(vtkm::Int64()); - baseC.AddExpected(vtkm::UInt64()); - // Extra types with same layout as above but considered different by C - baseC.AddExpected(bool()); - baseC.AddExpected(char()); - baseC.AddExpected((signed int)0); - baseC.AddExpected((unsigned int)0); - baseC.AddExpected((signed long)0); - baseC.AddExpected((unsigned long)0); - baseC.AddExpected((signed long long)0); - baseC.AddExpected((unsigned long long)0); - TryList(baseC, vtkm::TypeListBaseC()); - - std::cout << "TypeListTagVecCommon" << std::endl; - TypeSet vecCommon; - vecCommon.AddExpected(vtkm::Vec2f_32()); - vecCommon.AddExpected(vtkm::Vec2f_64()); - vecCommon.AddExpected(vtkm::Vec2ui_8()); - vecCommon.AddExpected(vtkm::Vec2i_32()); - vecCommon.AddExpected(vtkm::Vec2i_64()); - vecCommon.AddExpected(vtkm::Vec3f_32()); - vecCommon.AddExpected(vtkm::Vec3f_64()); - vecCommon.AddExpected(vtkm::Vec3ui_8()); - vecCommon.AddExpected(vtkm::Vec3i_32()); - vecCommon.AddExpected(vtkm::Vec3i_64()); - vecCommon.AddExpected(vtkm::Vec4f_32()); - vecCommon.AddExpected(vtkm::Vec4f_64()); - vecCommon.AddExpected(vtkm::Vec4ui_8()); - vecCommon.AddExpected(vtkm::Vec4i_32()); - vecCommon.AddExpected(vtkm::Vec4i_64()); - TryList(vecCommon, vtkm::TypeListTagVecCommon()); - - std::cout << "TypeListTagVecAll" << std::endl; - TypeSet vecAll; - vecAll.AddExpected(vtkm::Vec2f_32()); - vecAll.AddExpected(vtkm::Vec2f_64()); - vecAll.AddExpected(vtkm::Vec2i_8()); - vecAll.AddExpected(vtkm::Vec2i_16()); - vecAll.AddExpected(vtkm::Vec2i_32()); - vecAll.AddExpected(vtkm::Vec2i_64()); - vecAll.AddExpected(vtkm::Vec2ui_8()); - vecAll.AddExpected(vtkm::Vec2ui_16()); - vecAll.AddExpected(vtkm::Vec2ui_32()); - vecAll.AddExpected(vtkm::Vec2ui_64()); - vecAll.AddExpected(vtkm::Vec3f_32()); - vecAll.AddExpected(vtkm::Vec3f_64()); - vecAll.AddExpected(vtkm::Vec3i_8()); - vecAll.AddExpected(vtkm::Vec3i_16()); - vecAll.AddExpected(vtkm::Vec3i_32()); - vecAll.AddExpected(vtkm::Vec3i_64()); - vecAll.AddExpected(vtkm::Vec3ui_8()); - vecAll.AddExpected(vtkm::Vec3ui_16()); - vecAll.AddExpected(vtkm::Vec3ui_32()); - vecAll.AddExpected(vtkm::Vec3ui_64()); - vecAll.AddExpected(vtkm::Vec4f_32()); - vecAll.AddExpected(vtkm::Vec4f_64()); - vecAll.AddExpected(vtkm::Vec4i_8()); - vecAll.AddExpected(vtkm::Vec4i_16()); - vecAll.AddExpected(vtkm::Vec4i_32()); - vecAll.AddExpected(vtkm::Vec4i_64()); - vecAll.AddExpected(vtkm::Vec4ui_8()); - vecAll.AddExpected(vtkm::Vec4ui_16()); - vecAll.AddExpected(vtkm::Vec4ui_32()); - vecAll.AddExpected(vtkm::Vec4ui_64()); - TryList(vecAll, vtkm::TypeListTagVecAll()); - - std::cout << "TypeListTagAll" << std::endl; - TypeSet all; - all.AddExpected(vtkm::Float32()); - all.AddExpected(vtkm::Float64()); - all.AddExpected(vtkm::Int8()); - all.AddExpected(vtkm::UInt8()); - all.AddExpected(vtkm::Int16()); - all.AddExpected(vtkm::UInt16()); - all.AddExpected(vtkm::Int32()); - all.AddExpected(vtkm::UInt32()); - all.AddExpected(vtkm::Int64()); - all.AddExpected(vtkm::UInt64()); - all.AddExpected(vtkm::Vec2f_32()); - all.AddExpected(vtkm::Vec2f_64()); - all.AddExpected(vtkm::Vec2i_8()); - all.AddExpected(vtkm::Vec2i_16()); - all.AddExpected(vtkm::Vec2i_32()); - all.AddExpected(vtkm::Vec2i_64()); - all.AddExpected(vtkm::Vec2ui_8()); - all.AddExpected(vtkm::Vec2ui_16()); - all.AddExpected(vtkm::Vec2ui_32()); - all.AddExpected(vtkm::Vec2ui_64()); - all.AddExpected(vtkm::Vec3f_32()); - all.AddExpected(vtkm::Vec3f_64()); - all.AddExpected(vtkm::Vec3i_8()); - all.AddExpected(vtkm::Vec3i_16()); - all.AddExpected(vtkm::Vec3i_32()); - all.AddExpected(vtkm::Vec3i_64()); - all.AddExpected(vtkm::Vec3ui_8()); - all.AddExpected(vtkm::Vec3ui_16()); - all.AddExpected(vtkm::Vec3ui_32()); - all.AddExpected(vtkm::Vec3ui_64()); - all.AddExpected(vtkm::Vec4f_32()); - all.AddExpected(vtkm::Vec4f_64()); - all.AddExpected(vtkm::Vec4i_8()); - all.AddExpected(vtkm::Vec4i_16()); - all.AddExpected(vtkm::Vec4i_32()); - all.AddExpected(vtkm::Vec4i_64()); - all.AddExpected(vtkm::Vec4ui_8()); - all.AddExpected(vtkm::Vec4ui_16()); - all.AddExpected(vtkm::Vec4ui_32()); - all.AddExpected(vtkm::Vec4ui_64()); - TryList(all, vtkm::TypeListTagAll()); -} - -} // anonymous namespace - -int UnitTestTypeListTag(int argc, char* argv[]) -{ - return vtkm::testing::Testing::Run(TestLists, argc, argv); -} - -VTKM_DEPRECATED_SUPPRESS_END diff --git a/vtkm/worklet/CMakeLists.txt b/vtkm/worklet/CMakeLists.txt index 48332fd67..a82f03083 100644 --- a/vtkm/worklet/CMakeLists.txt +++ b/vtkm/worklet/CMakeLists.txt @@ -20,7 +20,6 @@ set(headers DispatcherPointNeighborhood.h DispatcherReduceByKey.h FieldStatistics.h - KdTree3D.h # Deprecated KernelSplatter.h Keys.h MaskIndices.h diff --git a/vtkm/worklet/KdTree3D.h b/vtkm/worklet/KdTree3D.h deleted file mode 100644 index e43f065dd..000000000 --- a/vtkm/worklet/KdTree3D.h +++ /dev/null @@ -1,77 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ -#ifndef vtkm_m_worklet_KdTree3D_h -#define vtkm_m_worklet_KdTree3D_h - -#include -#include - -namespace vtkm -{ -namespace worklet -{ - -class VTKM_DEPRECATED(1.7, - "K-D tree recursive searches are not well supported on GPU devices.") KdTree3D -{ -public: - KdTree3D() = default; - - /// \brief Construct a 3D KD-tree for 3D point positions. - /// - /// \tparam CoordType type of the x, y, z component of the point coordinates. - /// \tparam CoordStorageTag - /// \param coords An ArrayHandle of x, y, z coordinates of input points. - /// - template - void Build(const vtkm::cont::ArrayHandle, CoordStorageTag>& coords) - { - vtkm::worklet::spatialstructure::KdTree3DConstruction().Run( - coords, this->PointIds, this->SplitIds); - } - - /// \brief Nearest neighbor search using KD-Tree - /// - /// Parallel search of nearest neighbor for each point in the \c queryPoints in the the set of - /// \c coords. Returns nearest neighbor in \c nearestNeighborId and distance to nearest neighbor - /// in \c distances. - /// - /// \tparam CoordType - /// \tparam CoordStorageTag1 - /// \tparam CoordStorageTag2 - /// \tparam DeviceAdapter - /// \param coords Point coordinates for training data set (haystack) - /// \param queryPoints Point coordinates to query for nearest neighbor (needles). - /// \param nearestNeighborIds Nearest neighbor in the traning data set for each points in the - /// testing set - /// \param distances Distances between query points and their nearest neighbors. - /// \param deviceId Tag for selecting device adapter. - template - void Run(const vtkm::cont::ArrayHandle, CoordStorageTag1>& coords, - const vtkm::cont::ArrayHandle, CoordStorageTag2>& queryPoints, - vtkm::cont::ArrayHandle& nearestNeighborIds, - vtkm::cont::ArrayHandle& distances, - DeviceAdapter deviceId) - { - vtkm::worklet::spatialstructure::KdTree3DNNSearch().Run( - coords, this->PointIds, this->SplitIds, queryPoints, nearestNeighborIds, distances, deviceId); - } - -private: - vtkm::cont::ArrayHandle PointIds; - vtkm::cont::ArrayHandle SplitIds; -}; -} -} // namespace vtkm::worklet - -#endif // vtkm_m_worklet_Kdtree3D_h diff --git a/vtkm/worklet/Keys.h b/vtkm/worklet/Keys.h index 5cc0a61a7..e19562065 100644 --- a/vtkm/worklet/Keys.h +++ b/vtkm/worklet/Keys.h @@ -70,12 +70,6 @@ public: typename vtkm::cont::ArrayHandle::ReadPortalType, typename vtkm::cont::ArrayHandle::ReadPortalType>; - template - struct VTKM_DEPRECATED(1.6, "Replace ExecutionTypes::Lookup with ExecLookup.") ExecutionTypes - { - using Lookup = ExecLookup; - }; - VTKM_CONT ExecLookup PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) const { @@ -84,14 +78,6 @@ public: this->Counts.PrepareForInput(device, token)); } - VTKM_CONT VTKM_DEPRECATED(1.6, - "PrepareForInput now requires a vtkm::cont::Token object.") ExecLookup - PrepareForInput(vtkm::cont::DeviceAdapterId device) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, token); - } - VTKM_CONT bool operator==(const vtkm::worklet::internal::KeysBase& other) const { @@ -193,12 +179,6 @@ public: typename vtkm::cont::ArrayHandle::ReadPortalType, typename vtkm::cont::ArrayHandle::ReadPortalType>; - template - struct VTKM_DEPRECATED(1.6, "Replace ExecutionTypes::Lookup with ExecLookup.") ExecutionTypes - { - using Lookup = ExecLookup; - }; - VTKM_CONT ExecLookup PrepareForInput(vtkm::cont::DeviceAdapterId device, vtkm::cont::Token& token) const { @@ -208,14 +188,6 @@ public: this->Counts.PrepareForInput(device, token)); } - VTKM_CONT VTKM_DEPRECATED(1.6, - "PrepareForInput now requires a vtkm::cont::Token object.") ExecLookup - PrepareForInput(vtkm::cont::DeviceAdapterId device) const - { - vtkm::cont::Token token; - return this->PrepareForInput(device, token); - } - VTKM_CONT bool operator==(const vtkm::worklet::Keys& other) const { diff --git a/vtkm/worklet/WorkletMapTopology.h b/vtkm/worklet/WorkletMapTopology.h index 785c25a8b..1d2c7a244 100644 --- a/vtkm/worklet/WorkletMapTopology.h +++ b/vtkm/worklet/WorkletMapTopology.h @@ -288,12 +288,6 @@ public: using CellIndices = IncidentElementIndices; }; -// Deprecated signatures for legacy support. These will be removed at some -// point. -using WorkletMapCellToPoint VTKM_DEPRECATED(1.5, "Use WorkletVisitPointsWithCells.") = - WorkletVisitPointsWithCells; -using WorkletMapPointToCell VTKM_DEPRECATED(1.5, "Use WorkletVisitCellsWithPoints.") = - WorkletVisitCellsWithPoints; } } // namespace vtkm::worklet diff --git a/vtkm/worklet/spatialstructure/CMakeLists.txt b/vtkm/worklet/spatialstructure/CMakeLists.txt index fa96283cf..9ae236f4b 100644 --- a/vtkm/worklet/spatialstructure/CMakeLists.txt +++ b/vtkm/worklet/spatialstructure/CMakeLists.txt @@ -10,8 +10,6 @@ set(headers BoundingIntervalHierarchy.h - KdTree3DConstruction.h # Deprecated - KdTree3DNNSearch.h # Deprecated ) vtkm_declare_headers(${headers}) diff --git a/vtkm/worklet/spatialstructure/KdTree3DConstruction.h b/vtkm/worklet/spatialstructure/KdTree3DConstruction.h deleted file mode 100644 index b6cd0c793..000000000 --- a/vtkm/worklet/spatialstructure/KdTree3DConstruction.h +++ /dev/null @@ -1,601 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_worklet_KdTree3DConstruction_h -#define vtk_m_worklet_KdTree3DConstruction_h - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace vtkm -{ -namespace worklet -{ -namespace spatialstructure -{ - -class VTKM_DEPRECATED(1.7, "K-D tree recursive searches are not well supported on GPU devices.") - KdTree3DConstruction -{ -public: - ////////// General WORKLET for Kd-tree ////// - class ComputeFlag : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn rank, FieldIn pointCountInSeg, FieldOut flag); - using ExecutionSignature = void(_1, _2, _3); - - VTKM_CONT - ComputeFlag() {} - - template - VTKM_EXEC void operator()(const T& rank, const T& pointCountInSeg, T& flag) const - { - if (static_cast(rank) >= static_cast(pointCountInSeg) / 2.0f) - flag = 1; //right subtree - else - flag = 0; //left subtree - } - }; - - class InverseArray : public vtkm::worklet::WorkletMapField - { //only for 0/1 array - public: - using ControlSignature = void(FieldIn in, FieldOut out); - using ExecutionSignature = void(_1, _2); - - VTKM_CONT - InverseArray() {} - - template - VTKM_EXEC void operator()(const T& in, T& out) const - { - if (in == 0) - out = 1; - else - out = 0; - } - }; - - class SegmentedSplitTransform : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = - void(FieldIn B, FieldIn D, FieldIn F, FieldIn G, FieldIn H, FieldOut I); - using ExecutionSignature = void(_1, _2, _3, _4, _5, _6); - - VTKM_CONT - SegmentedSplitTransform() {} - - template - VTKM_EXEC void operator()(const T& B, const T& D, const T& F, const T& G, const T& H, T& I) - const - { - if (B == 1) - { - I = F + H + D; - } - else - { - I = F + G - 1; - } - } - }; - - class ScatterArray : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn in, FieldIn index, WholeArrayOut out); - using ExecutionSignature = void(_1, _2, _3); - - VTKM_CONT - ScatterArray() {} - - template - VTKM_EXEC void operator()(const T& in, - const T& index, - const OutputArrayPortalType& outputPortal) const - { - outputPortal.Set(index, in); - } - }; - - class NewSegmentId : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn inSegmentId, FieldIn flag, FieldOut outSegmentId); - using ExecutionSignature = void(_1, _2, _3); - - VTKM_CONT - NewSegmentId() {} - - template - VTKM_EXEC void operator()(const T& oldSegId, const T& flag, T& newSegId) const - { - if (flag == 0) - newSegId = oldSegId * 2; - else - newSegId = oldSegId * 2 + 1; - } - }; - - class SaveSplitPointId : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn pointId, - FieldIn flag, - FieldIn oldSplitPointId, - FieldOut newSplitPointId); - using ExecutionSignature = void(_1, _2, _3, _4); - - VTKM_CONT - SaveSplitPointId() {} - - template - VTKM_EXEC void operator()(const T& pointId, - const T& flag, - const T& oldSplitPointId, - T& newSplitPointId) const - { - if (flag == 0) //do not change - newSplitPointId = oldSplitPointId; - else //split point id - newSplitPointId = pointId; - } - }; - - class FindSplitPointId : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn pointId, FieldIn rank, FieldOut splitIdInsegment); - using ExecutionSignature = void(_1, _2, _3); - - VTKM_CONT - FindSplitPointId() {} - - template - VTKM_EXEC void operator()(const T& pointId, const T& rank, T& splitIdInsegment) const - { - if (rank == 0) //do not change - splitIdInsegment = pointId; - else //split point id - splitIdInsegment = -1; //indicate this is not split point - } - }; - - class ArrayAdd : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn inArray0, FieldIn inArray1, FieldOut outArray); - using ExecutionSignature = void(_1, _2, _3); - - VTKM_CONT - ArrayAdd() {} - - template - VTKM_EXEC void operator()(const T& in0, const T& in1, T& out) const - { - out = in0 + in1; - } - }; - - class SeprateVec3AryHandle : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn inVec3, FieldOut out0, FieldOut out1, FieldOut out2); - using ExecutionSignature = void(_1, _2, _3, _4); - - VTKM_CONT - SeprateVec3AryHandle() {} - - template - VTKM_EXEC void operator()(const Vec& inVec3, T& out0, T& out1, T& out2) const - { - out0 = inVec3[0]; - out1 = inVec3[1]; - out2 = inVec3[2]; - } - }; - - ////////// General worklet WRAPPER for Kd-tree ////// - template - vtkm::cont::ArrayHandle ReverseScanInclusiveByKey(vtkm::cont::ArrayHandle& keyHandle, - vtkm::cont::ArrayHandle& dataHandle, - BinaryFunctor binary_functor) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::cont::ArrayHandle resultHandle; - - auto reversedResultHandle = vtkm::cont::make_ArrayHandleReverse(resultHandle); - - Algorithm::ScanInclusiveByKey(vtkm::cont::make_ArrayHandleReverse(keyHandle), - vtkm::cont::make_ArrayHandleReverse(dataHandle), - reversedResultHandle, - binary_functor); - - return resultHandle; - } - - template - vtkm::cont::ArrayHandle Inverse01ArrayWrapper(vtkm::cont::ArrayHandle& inputHandle) - { - vtkm::cont::ArrayHandle InverseHandle; - InverseArray invWorklet; - vtkm::worklet::DispatcherMapField inverseArrayDispatcher(invWorklet); - inverseArrayDispatcher.Invoke(inputHandle, InverseHandle); - return InverseHandle; - } - - template - vtkm::cont::ArrayHandle ScatterArrayWrapper(vtkm::cont::ArrayHandle& inputHandle, - vtkm::cont::ArrayHandle& indexHandle) - { - vtkm::cont::ArrayHandle outputHandle; - outputHandle.Allocate(inputHandle.GetNumberOfValues()); - ScatterArray scatterWorklet; - vtkm::worklet::DispatcherMapField scatterArrayDispatcher(scatterWorklet); - scatterArrayDispatcher.Invoke(inputHandle, indexHandle, outputHandle); - return outputHandle; - } - - template - vtkm::cont::ArrayHandle NewKeyWrapper(vtkm::cont::ArrayHandle& oldSegIdHandle, - vtkm::cont::ArrayHandle& flagHandle) - { - vtkm::cont::ArrayHandle newSegIdHandle; - NewSegmentId newsegidWorklet; - vtkm::worklet::DispatcherMapField newSegIdDispatcher(newsegidWorklet); - newSegIdDispatcher.Invoke(oldSegIdHandle, flagHandle, newSegIdHandle); - return newSegIdHandle; - } - - template - vtkm::cont::ArrayHandle SaveSplitPointIdWrapper(vtkm::cont::ArrayHandle& pointIdHandle, - vtkm::cont::ArrayHandle& flagHandle, - vtkm::cont::ArrayHandle& rankHandle, - vtkm::cont::ArrayHandle& oldSplitIdHandle) - { - vtkm::cont::ArrayHandle splitIdInSegmentHandle; - FindSplitPointId findSplitPointIdWorklet; - vtkm::worklet::DispatcherMapField findSplitPointIdWorkletDispatcher( - findSplitPointIdWorklet); - findSplitPointIdWorkletDispatcher.Invoke(pointIdHandle, rankHandle, splitIdInSegmentHandle); - - vtkm::cont::ArrayHandle splitIdInSegmentByScanHandle = - ReverseScanInclusiveByKey(flagHandle, splitIdInSegmentHandle, vtkm::Maximum()); - - vtkm::cont::ArrayHandle splitIdHandle; - SaveSplitPointId saveSplitPointIdWorklet; - vtkm::worklet::DispatcherMapField saveSplitPointIdWorkletDispatcher( - saveSplitPointIdWorklet); - saveSplitPointIdWorkletDispatcher.Invoke( - splitIdInSegmentByScanHandle, flagHandle, oldSplitIdHandle, splitIdHandle); - - return splitIdHandle; - } - - template - vtkm::cont::ArrayHandle ArrayAddWrapper(vtkm::cont::ArrayHandle& array0Handle, - vtkm::cont::ArrayHandle& array1Handle) - { - vtkm::cont::ArrayHandle resultHandle; - ArrayAdd arrayAddWorklet; - vtkm::worklet::DispatcherMapField arrayAddDispatcher(arrayAddWorklet); - arrayAddDispatcher.Invoke(array0Handle, array1Handle, resultHandle); - return resultHandle; - } - - /////////////////////////////////////////////////// - ////////General Kd tree function ////////////////// - /////////////////////////////////////////////////// - template - vtkm::cont::ArrayHandle ComputeFlagProcedure(vtkm::cont::ArrayHandle& rankHandle, - vtkm::cont::ArrayHandle& segIdHandle) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::cont::ArrayHandle segCountAryHandle; - { - vtkm::cont::ArrayHandle tmpAryHandle; - vtkm::cont::ArrayHandleConstant constHandle(1, rankHandle.GetNumberOfValues()); - Algorithm::ScanInclusiveByKey( - segIdHandle, constHandle, tmpAryHandle, vtkm::Add()); //compute ttl segs in segment - - segCountAryHandle = ReverseScanInclusiveByKey(segIdHandle, tmpAryHandle, vtkm::Maximum()); - } - - vtkm::cont::ArrayHandle flagHandle; - vtkm::worklet::DispatcherMapField computeFlagDispatcher; - computeFlagDispatcher.Invoke(rankHandle, segCountAryHandle, flagHandle); - - return flagHandle; - } - - template - vtkm::cont::ArrayHandle SegmentedSplitProcedure(vtkm::cont::ArrayHandle& A_Handle, - vtkm::cont::ArrayHandle& B_Handle, - vtkm::cont::ArrayHandle& C_Handle) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::cont::ArrayHandle D_Handle; - T initValue = 0; - Algorithm::ScanExclusiveByKey(C_Handle, B_Handle, D_Handle, initValue, vtkm::Add()); - - vtkm::cont::ArrayHandleCounting Ecouting_Handle(0, 1, A_Handle.GetNumberOfValues()); - vtkm::cont::ArrayHandle E_Handle; - Algorithm::Copy(Ecouting_Handle, E_Handle); - - vtkm::cont::ArrayHandle F_Handle; - Algorithm::ScanInclusiveByKey(C_Handle, E_Handle, F_Handle, vtkm::Minimum()); - - vtkm::cont::ArrayHandle InvB_Handle = Inverse01ArrayWrapper(B_Handle); - vtkm::cont::ArrayHandle G_Handle; - Algorithm::ScanInclusiveByKey(C_Handle, InvB_Handle, G_Handle, vtkm::Add()); - - vtkm::cont::ArrayHandle H_Handle = - ReverseScanInclusiveByKey(C_Handle, G_Handle, vtkm::Maximum()); - - vtkm::cont::ArrayHandle I_Handle; - SegmentedSplitTransform sstWorklet; - vtkm::worklet::DispatcherMapField segmentedSplitTransformDispatcher( - sstWorklet); - segmentedSplitTransformDispatcher.Invoke( - B_Handle, D_Handle, F_Handle, G_Handle, H_Handle, I_Handle); - - return ScatterArrayWrapper(A_Handle, I_Handle); - } - - template - void RenumberRanksProcedure(vtkm::cont::ArrayHandle& A_Handle, - vtkm::cont::ArrayHandle& B_Handle, - vtkm::cont::ArrayHandle& C_Handle, - vtkm::cont::ArrayHandle& D_Handle) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::Id nPoints = A_Handle.GetNumberOfValues(); - - vtkm::cont::ArrayHandleCounting Ecouting_Handle(0, 1, nPoints); - vtkm::cont::ArrayHandle E_Handle; - Algorithm::Copy(Ecouting_Handle, E_Handle); - - vtkm::cont::ArrayHandle F_Handle; - Algorithm::ScanInclusiveByKey(D_Handle, E_Handle, F_Handle, vtkm::Minimum()); - - vtkm::cont::ArrayHandle G_Handle; - G_Handle = ArrayAddWrapper(A_Handle, F_Handle); - - vtkm::cont::ArrayHandleConstant HConstant_Handle(1, nPoints); - vtkm::cont::ArrayHandle H_Handle; - Algorithm::Copy(HConstant_Handle, H_Handle); - - vtkm::cont::ArrayHandle I_Handle; - T initValue = 0; - Algorithm::ScanExclusiveByKey(C_Handle, H_Handle, I_Handle, initValue, vtkm::Add()); - - vtkm::cont::ArrayHandle J_Handle; - J_Handle = ScatterArrayWrapper(I_Handle, G_Handle); - - vtkm::cont::ArrayHandle K_Handle; - K_Handle = ScatterArrayWrapper(B_Handle, G_Handle); - - vtkm::cont::ArrayHandle L_Handle; - L_Handle = SegmentedSplitProcedure(J_Handle, K_Handle, D_Handle); - - vtkm::cont::ArrayHandle M_Handle; - Algorithm::ScanInclusiveByKey(C_Handle, E_Handle, M_Handle, vtkm::Minimum()); - - vtkm::cont::ArrayHandle N_Handle; - N_Handle = ArrayAddWrapper(L_Handle, M_Handle); - - A_Handle = ScatterArrayWrapper(I_Handle, N_Handle); - } - - /////////////3D construction ///////////////////// - /// \brief Segmented split for 3D x, y, z coordinates - /// - /// Split \c pointId_Handle, \c X_Handle, \c Y_Handle and \c Z_Handle within each segment - /// as indicated by \c segId_Handle according to flags in \c flag_Handle. - /// - /// \tparam T - /// \param pointId_Handle - /// \param flag_Handle - /// \param segId_Handle - /// \param X_Handle - /// \param Y_Handle - /// \param Z_Handle - template - void SegmentedSplitProcedure3D(vtkm::cont::ArrayHandle& pointId_Handle, - vtkm::cont::ArrayHandle& flag_Handle, - vtkm::cont::ArrayHandle& segId_Handle, - vtkm::cont::ArrayHandle& X_Handle, - vtkm::cont::ArrayHandle& Y_Handle, - vtkm::cont::ArrayHandle& Z_Handle) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::cont::ArrayHandle D_Handle; - T initValue = 0; - Algorithm::ScanExclusiveByKey(segId_Handle, flag_Handle, D_Handle, initValue, vtkm::Add()); - - vtkm::cont::ArrayHandleCounting Ecouting_Handle(0, 1, pointId_Handle.GetNumberOfValues()); - vtkm::cont::ArrayHandle E_Handle; - Algorithm::Copy(Ecouting_Handle, E_Handle); - - vtkm::cont::ArrayHandle F_Handle; - Algorithm::ScanInclusiveByKey(segId_Handle, E_Handle, F_Handle, vtkm::Minimum()); - - vtkm::cont::ArrayHandle InvB_Handle = Inverse01ArrayWrapper(flag_Handle); - vtkm::cont::ArrayHandle G_Handle; - Algorithm::ScanInclusiveByKey(segId_Handle, InvB_Handle, G_Handle, vtkm::Add()); - - vtkm::cont::ArrayHandle H_Handle = - ReverseScanInclusiveByKey(segId_Handle, G_Handle, vtkm::Maximum()); - - vtkm::cont::ArrayHandle I_Handle; - SegmentedSplitTransform sstWorklet; - vtkm::worklet::DispatcherMapField segmentedSplitTransformDispatcher( - sstWorklet); - segmentedSplitTransformDispatcher.Invoke( - flag_Handle, D_Handle, F_Handle, G_Handle, H_Handle, I_Handle); - - pointId_Handle = ScatterArrayWrapper(pointId_Handle, I_Handle); - - flag_Handle = ScatterArrayWrapper(flag_Handle, I_Handle); - - X_Handle = ScatterArrayWrapper(X_Handle, I_Handle); - - Y_Handle = ScatterArrayWrapper(Y_Handle, I_Handle); - - Z_Handle = ScatterArrayWrapper(Z_Handle, I_Handle); - } - - /// \brief Perform one level of KD-Tree construction - /// - /// Construct a level of KD-Tree by segemeted splits (partitioning) of \c pointId_Handle, - /// \c xrank_Handle, \c yrank_Handle and \c zrank_Handle according to the medium element - /// in each segment as indicated by \c segId_Handle alone the axis determined by \c level. - /// The split point of each segment will be updated in \c splitId_Handle. - template - void OneLevelSplit3D(vtkm::cont::ArrayHandle& pointId_Handle, - vtkm::cont::ArrayHandle& xrank_Handle, - vtkm::cont::ArrayHandle& yrank_Handle, - vtkm::cont::ArrayHandle& zrank_Handle, - vtkm::cont::ArrayHandle& segId_Handle, - vtkm::cont::ArrayHandle& splitId_Handle, - vtkm::Int32 level) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::cont::ArrayHandle flag_Handle; - if (level % 3 == 0) - { - flag_Handle = ComputeFlagProcedure(xrank_Handle, segId_Handle); - } - else if (level % 3 == 1) - { - flag_Handle = ComputeFlagProcedure(yrank_Handle, segId_Handle); - } - else - { - flag_Handle = ComputeFlagProcedure(zrank_Handle, segId_Handle); - } - - SegmentedSplitProcedure3D( - pointId_Handle, flag_Handle, segId_Handle, xrank_Handle, yrank_Handle, zrank_Handle); - - vtkm::cont::ArrayHandle segIdOld_Handle; - Algorithm::Copy(segId_Handle, segIdOld_Handle); - segId_Handle = NewKeyWrapper(segIdOld_Handle, flag_Handle); - - RenumberRanksProcedure(xrank_Handle, flag_Handle, segId_Handle, segIdOld_Handle); - RenumberRanksProcedure(yrank_Handle, flag_Handle, segId_Handle, segIdOld_Handle); - RenumberRanksProcedure(zrank_Handle, flag_Handle, segId_Handle, segIdOld_Handle); - - if (level % 3 == 0) - { - splitId_Handle = - SaveSplitPointIdWrapper(pointId_Handle, flag_Handle, xrank_Handle, splitId_Handle); - } - else if (level % 3 == 1) - { - splitId_Handle = - SaveSplitPointIdWrapper(pointId_Handle, flag_Handle, yrank_Handle, splitId_Handle); - } - else - { - splitId_Handle = - SaveSplitPointIdWrapper(pointId_Handle, flag_Handle, zrank_Handle, splitId_Handle); - } - } - - /// \brief Construct KdTree from x y z coordinate vector. - /// - /// This method constructs an array based KD-Tree from x, y, z coordinates of points in \c - /// coordi_Handle. The method rotates between x, y and z axis and splits input points into - /// equal halves with respect to the split axis at each level of construction. The indices to - /// the leaf nodes are returned in \c pointId_Handle and indices to internal nodes (splits) - /// are returned in splitId_handle. - /// - /// \param coordi_Handle (in) x, y, z coordinates of input points - /// \param pointId_Handle (out) returns indices to leaf nodes of the KD-tree - /// \param splitId_Handle (out) returns indices to internal nodes of the KD-tree - // Leaf Node vector and internal node (split) vectpr - template - void Run(const vtkm::cont::ArrayHandle, CoordStorageTag>& coordi_Handle, - vtkm::cont::ArrayHandle& pointId_Handle, - vtkm::cont::ArrayHandle& splitId_Handle) - { - using Algorithm = vtkm::cont::Algorithm; - - vtkm::Id nTrainingPoints = coordi_Handle.GetNumberOfValues(); - vtkm::cont::ArrayHandleCounting counting_Handle(0, 1, nTrainingPoints); - Algorithm::Copy(counting_Handle, pointId_Handle); - vtkm::cont::ArrayHandle xorder_Handle; - Algorithm::Copy(counting_Handle, xorder_Handle); - vtkm::cont::ArrayHandle yorder_Handle; - Algorithm::Copy(counting_Handle, yorder_Handle); - vtkm::cont::ArrayHandle zorder_Handle; - Algorithm::Copy(counting_Handle, zorder_Handle); - - splitId_Handle.Allocate(nTrainingPoints); - - vtkm::cont::ArrayHandle xcoordi_Handle; - vtkm::cont::ArrayHandle ycoordi_Handle; - vtkm::cont::ArrayHandle zcoordi_Handle; - - SeprateVec3AryHandle sepVec3Worklet; - vtkm::worklet::DispatcherMapField sepVec3Dispatcher(sepVec3Worklet); - sepVec3Dispatcher.Invoke(coordi_Handle, xcoordi_Handle, ycoordi_Handle, zcoordi_Handle); - - Algorithm::SortByKey(xcoordi_Handle, xorder_Handle); - vtkm::cont::ArrayHandle xrank_Handle = - ScatterArrayWrapper(pointId_Handle, xorder_Handle); - - Algorithm::SortByKey(ycoordi_Handle, yorder_Handle); - vtkm::cont::ArrayHandle yrank_Handle = - ScatterArrayWrapper(pointId_Handle, yorder_Handle); - - Algorithm::SortByKey(zcoordi_Handle, zorder_Handle); - vtkm::cont::ArrayHandle zrank_Handle = - ScatterArrayWrapper(pointId_Handle, zorder_Handle); - - vtkm::cont::ArrayHandle segId_Handle; - vtkm::cont::ArrayHandleConstant constHandle(0, nTrainingPoints); - Algorithm::Copy(constHandle, segId_Handle); - - ///// build kd tree ///// - vtkm::Int32 maxLevel = static_cast(ceil(vtkm::Log2(nTrainingPoints) + 1)); - for (vtkm::Int32 i = 0; i < maxLevel - 1; i++) - { - OneLevelSplit3D( - pointId_Handle, xrank_Handle, yrank_Handle, zrank_Handle, segId_Handle, splitId_Handle, i); - } - } -}; -} -} -} // namespace vtkm::worklet - -#endif // vtk_m_worklet_KdTree3DConstruction_h diff --git a/vtkm/worklet/spatialstructure/KdTree3DNNSearch.h b/vtkm/worklet/spatialstructure/KdTree3DNNSearch.h deleted file mode 100644 index bf5ecbbe4..000000000 --- a/vtkm/worklet/spatialstructure/KdTree3DNNSearch.h +++ /dev/null @@ -1,226 +0,0 @@ -//============================================================================ -// Copyright (c) Kitware, Inc. -// All rights reserved. -// See LICENSE.txt for details. -// -// This software is distributed WITHOUT ANY WARRANTY; without even -// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -// PURPOSE. See the above copyright notice for more information. -//============================================================================ - -#ifndef vtk_m_worklet_KdTree3DNNSearch_h -#define vtk_m_worklet_KdTree3DNNSearch_h - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifdef VTKM_CUDA -#include -#endif - -namespace vtkm -{ -namespace worklet -{ -namespace spatialstructure -{ - -class VTKM_DEPRECATED(1.7, "K-D tree recursive searches are not well supported on GPU devices.") - KdTree3DNNSearch -{ -public: - class NearestNeighborSearch3DWorklet : public vtkm::worklet::WorkletMapField - { - public: - using ControlSignature = void(FieldIn qcIn, - WholeArrayIn treeIdIn, - WholeArrayIn treeSplitIdIn, - WholeArrayIn treeCoordiIn, - FieldOut nnIdOut, - FieldInOut nnDisOut); - using ExecutionSignature = void(_1, _2, _3, _4, _5, _6); - - VTKM_CONT - NearestNeighborSearch3DWorklet() {} - - template - VTKM_EXEC_CONT void NearestNeighborSearch3D(const CooriVecT& qc, - CooriT& dis, - vtkm::Id& nnpIdx, - vtkm::Int32 level, - vtkm::Id sIdx, - vtkm::Id tIdx, - const IdPortalT& treePortal, - const IdPortalT& splitIdPortal, - const CoordiPortalT& coordiPortal) const - { - CooriT qx = qc[0]; - CooriT qy = qc[1]; - CooriT qz = qc[2]; - - if (tIdx - sIdx == 1) - { ///// leaf node - vtkm::Id leafNodeIdx = treePortal.Get(sIdx); - CooriT leafX = coordiPortal.Get(leafNodeIdx)[0]; - CooriT leafY = coordiPortal.Get(leafNodeIdx)[1]; - CooriT leafZ = coordiPortal.Get(leafNodeIdx)[2]; - CooriT _dis = vtkm::Sqrt((leafX - qx) * (leafX - qx) + (leafY - qy) * (leafY - qy) + - (leafZ - qz) * (leafZ - qz)); - if (_dis < dis) - { - dis = _dis; - nnpIdx = leafNodeIdx; - } - } - else - { //normal Node - vtkm::Id splitNodeLoc = static_cast(vtkm::Ceil(double((sIdx + tIdx)) / 2.0)); - CooriT splitX = coordiPortal.Get(splitIdPortal.Get(splitNodeLoc))[0]; - CooriT splitY = coordiPortal.Get(splitIdPortal.Get(splitNodeLoc))[1]; - CooriT splitZ = coordiPortal.Get(splitIdPortal.Get(splitNodeLoc))[2]; - - CooriT splitAxis; - CooriT queryCoordi; - - if (level % 3 == 0) - { //x axis level - splitAxis = splitX; - queryCoordi = qx; - } - else if (level % 3 == 1) - { - splitAxis = splitY; - queryCoordi = qy; - } - else - { - splitAxis = splitZ; - queryCoordi = qz; - } - - if (queryCoordi <= splitAxis) - { //left tree first - if (queryCoordi - dis <= splitAxis) - NearestNeighborSearch3D(qc, - dis, - nnpIdx, - level + 1, - sIdx, - splitNodeLoc, - treePortal, - splitIdPortal, - coordiPortal); - if (queryCoordi + dis > splitAxis) - NearestNeighborSearch3D(qc, - dis, - nnpIdx, - level + 1, - splitNodeLoc, - tIdx, - treePortal, - splitIdPortal, - coordiPortal); - } - else - { //right tree first - if (queryCoordi + dis > splitAxis) - NearestNeighborSearch3D(qc, - dis, - nnpIdx, - level + 1, - splitNodeLoc, - tIdx, - treePortal, - splitIdPortal, - coordiPortal); - if (queryCoordi - dis <= splitAxis) - NearestNeighborSearch3D(qc, - dis, - nnpIdx, - level + 1, - sIdx, - splitNodeLoc, - treePortal, - splitIdPortal, - coordiPortal); - } - } - } - - template - VTKM_EXEC void operator()(const CoordiVecType& qc, - const IdPortalType& treeIdPortal, - const IdPortalType& treeSplitIdPortal, - const CoordiPortalType& treeCoordiPortal, - IdType& nnId, - CoordiType& nnDis) const - { - NearestNeighborSearch3D(qc, - nnDis, - nnId, - 0, - 0, - treeIdPortal.GetNumberOfValues(), - treeIdPortal, - treeSplitIdPortal, - treeCoordiPortal); - } - }; - - /// \brief Execute the Neaseat Neighbor Search given kdtree and search points - /// - /// Given x, y, z coordinate of of training data points in \c coordi_Handle, indices to KD-tree - /// leaf nodes in \c pointId_Handle and indices to internal nodes in \c splitId_Handle, search - /// for nearest neighbors in the training data points for each of testing points in \c qc_Handle. - /// Returns indices to nearest neighbor in \c nnId_Handle and distance to nearest neighbor in - /// \c nnDis_Handle. - - template - void Run(const vtkm::cont::ArrayHandle, CoordStorageTag1>& coordi_Handle, - const vtkm::cont::ArrayHandle& pointId_Handle, - const vtkm::cont::ArrayHandle& splitId_Handle, - const vtkm::cont::ArrayHandle, CoordStorageTag2>& qc_Handle, - vtkm::cont::ArrayHandle& nnId_Handle, - vtkm::cont::ArrayHandle& nnDis_Handle, - DeviceAdapter) - { - //fill the nnDis_Handle handle array with max values before running - auto intialValue = std::numeric_limits::max(); - vtkm::cont::Algorithm::Copy( - vtkm::cont::make_ArrayHandleConstant(intialValue, qc_Handle.GetNumberOfValues()), - nnDis_Handle); - -//set up stack size for cuda environment -#ifdef VTKM_CUDA - vtkm::cont::cuda::internal::ScopedCudaStackSize stack(16 * 1024); - (void)stack; -#endif - - NearestNeighborSearch3DWorklet nns3dWorklet; - vtkm::worklet::DispatcherMapField nns3DDispatcher(nns3dWorklet); - nns3DDispatcher.Invoke( - qc_Handle, pointId_Handle, splitId_Handle, coordi_Handle, nnId_Handle, nnDis_Handle); - } -}; -} -} -} // namespace vtkm::worklet - -#endif // vtk_m_worklet_KdTree3DNNSearch_h diff --git a/vtkm/worklet/testing/UnitTestKeys.cxx b/vtkm/worklet/testing/UnitTestKeys.cxx index 09004c906..668a130f5 100644 --- a/vtkm/worklet/testing/UnitTestKeys.cxx +++ b/vtkm/worklet/testing/UnitTestKeys.cxx @@ -14,16 +14,6 @@ #include -// Make sure deprecated types still work (while applicable) -VTKM_DEPRECATED_SUPPRESS_BEGIN -VTKM_STATIC_ASSERT((std::is_same::Lookup, - typename vtkm::worklet::internal::KeysBase::ExecLookup>::value)); -VTKM_STATIC_ASSERT((std::is_same::ExecutionTypes< - vtkm::cont::DeviceAdapterTagSerial>::Lookup, - typename vtkm::worklet::Keys::ExecLookup>::value)); -VTKM_DEPRECATED_SUPPRESS_END - namespace {