vtk-m2/vtkm/filter
Kenneth Moreland d1a4aecc59 Improvements to moving data into ArrayHandle
We have made several improvements to adding data into an `ArrayHandle`.

## Moving data from an `std::vector`

For numerous reasons, it is convenient to define data in a `std::vector`
and then wrap that into an `ArrayHandle`. It is often the case that an
`std::vector` is filled and then becomes unused once it is converted to an
`ArrayHandle`. In this case, what we really want is to pass the data off to
the `ArrayHandle` so that the `ArrayHandle` is now managing the data and
not the `std::vector`.

C++11 has a mechanism to do this: move semantics. You can now pass
variables to functions as an "rvalue" (right-hand value). When something is
passed as an rvalue, it can pull state out of that variable and move it
somewhere else. `std::vector` implements this movement so that an rvalue
can be moved to another `std::vector` without actually copying the data.
`make_ArrayHandle` now also takes advantage of this feature to move rvalue
`std::vector`s.

There is a special form of `make_ArrayHandle` named `make_ArrayHandleMove`
that takes an rvalue. There is also a special overload of
`make_ArrayHandle` itself that handles an rvalue `vector`. (However, using
the explicit move version is better if you want to make sure the data is
actually moved.)

## Make `ArrayHandle` from initalizer list

A common use case for using `std::vector` (particularly in our unit tests)
is to quickly add an initalizer list into an `ArrayHandle`. Now you can
by simply passing an initializer list to `make_ArrayHandle`.

## Deprecated `make_ArrayHandle` with default shallow copy

For historical reasons, passing an `std::vector` or a pointer to
`make_ArrayHandle` does a shallow copy (i.e. `CopyFlag` defaults to `Off`).
Although more efficient, this mode is inherintly unsafe, and making it the
default is asking for trouble.

To combat this, calling `make_ArrayHandle` without a copy flag is
deprecated. In this way, if you wish to do the faster but more unsafe
creation of an `ArrayHandle` you should explicitly express that.

This requried quite a few changes through the VTK-m source (particularly in
the tests).

## Similar changes to `Field`

`vtkm::cont::Field` has a `make_Field` helper function that is similar to
`make_ArrayHandle`. It also features the ability to create fields from
`std::vector`s and C arrays. It also likewise had the same unsafe behavior
by default of not copying from the source of the arrays.

That behavior has similarly been depreciated. You now have to specify a
copy flag.

The ability to construct a `Field` from an initializer list of values has
also been added.
2020-07-23 10:53:38 -06:00
..
internal CreateResult is now part of vtkm::filter instead of being inside internals 2019-08-09 12:44:43 -04:00
testing Improvements to moving data into ArrayHandle 2020-07-23 10:53:38 -06:00
CellAverage.cxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
CellAverage.h VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
CellAverage.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
CellMeasures.h Support coordinates of both float32 and float64 2020-07-14 08:53:01 -06:00
CellMeasures.hxx Support coordinates of both float32 and float64 2020-07-14 08:53:01 -06:00
CellSetConnectivity.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
CellSetConnectivity.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
CleanGrid.cxx Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
CleanGrid.h Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
CleanGrid.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
ClipWithField.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ClipWithField.h CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
ClipWithField.hxx CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
ClipWithImplicitFunction.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ClipWithImplicitFunction.h CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
ClipWithImplicitFunction.hxx CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
CMakeLists.txt fix cuda compile, export function. 2020-06-19 10:57:30 -04:00
ComputeMoments.h Correct field types for ComputeMoments filter 2020-05-18 18:39:22 -06:00
ComputeMoments.hxx Merge topic 'realRadiusFix' 2019-09-18 16:36:43 -04:00
Contour.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Contour.h Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Contour.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
ContourInteger.cxx Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
ContourScalar.cxx Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
ContourTreeUniform.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
ContourTreeUniform.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
ContourTreeUniformAugmented.h Add BRACT for distributed contour tree computation 2020-06-12 11:50:01 -06:00
ContourTreeUniformAugmented.hxx Add BRACT for distributed contour tree computation 2020-06-12 11:50:01 -06:00
ContourTreeUniformDistributed.h Add BRACT for distributed contour tree computation 2020-06-12 11:50:01 -06:00
ContourTreeUniformDistributed.hxx Add BRACT for distributed contour tree computation 2020-06-12 11:50:01 -06:00
CoordinateSystemTransform.h Output CoordinateSystemTransforms results in Coordinates 2020-03-05 15:21:47 -05:00
CoordinateSystemTransform.hxx Output CoordinateSystemTransforms results in Coordinates 2020-03-05 15:21:47 -05:00
CreateResult.h Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet 2019-09-02 09:04:51 -04:00
CrossProduct.h Fix gaps in type support 2020-03-19 17:07:11 -06:00
CrossProduct.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
DotProduct.h Fix gaps in type support 2020-03-19 17:07:11 -06:00
DotProduct.hxx Fix gaps in type support 2020-03-19 17:07:11 -06:00
Entropy.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
Entropy.hxx Use new ways to get array portal in control environment 2020-02-26 13:10:46 -07:00
ExternalFaces.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ExternalFaces.h Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
ExternalFaces.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
ExtractGeometry.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ExtractGeometry.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ExtractGeometry.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ExtractPoints.h Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
ExtractPoints.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ExtractStructured.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
ExtractStructured.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ExtractStructured.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
FieldMetadata.h Remove multiple vtkm::cont::CellSet from vtkm::cont::DataSet 2019-09-02 09:04:51 -04:00
FieldSelection.h Do not rely on implict copy constructors when destructor defined 2020-03-18 14:53:14 -06:00
FieldToColors.h conslidate the license statement 2019-04-17 10:57:13 -06:00
FieldToColors.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
Filter.h Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
Filter.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
FilterCell.h Correct improper cellset indexing 2019-08-21 15:16:26 -04:00
FilterDataSet.h vtkm::filter::Filter passes filter policies by value 2019-09-17 13:50:58 -04:00
FilterDataSet.hxx Fix policy use in FilterDataSet::MapFieldOntoOutput 2019-09-19 10:59:19 -05:00
FilterDataSetWithField.h vtkm::filter::Filter passes filter policies by value 2019-09-17 13:50:58 -04:00
FilterDataSetWithField.hxx Deprecate ListTag operations 2019-12-05 11:27:31 -05:00
FilterField.h vtkm::filter::Filter passes filter policies by value 2019-09-17 13:50:58 -04:00
FilterField.hxx Deprecate ListTag operations 2019-12-05 11:27:31 -05:00
FilterTraits.h Remove some commented out code 2019-12-10 15:29:46 -07:00
GhostCellClassify.h Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
GhostCellClassify.hxx Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
GhostCellRemove.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
GhostCellRemove.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Gradient.h Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
Gradient.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
GradientScalar.cxx Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
GradientUniformPoints.cxx Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
GradientVector.cxx Improve parallelization when compiling filter tests 2020-03-26 13:40:47 -04:00
Histogram.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
Histogram.hxx Have filter specify its own field types 2020-04-28 10:31:44 -06:00
ImageConnectivity.h ImageConnectivity didn't support multiple TU's compiling it 2020-02-21 13:01:51 -05:00
ImageConnectivity.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
ImageMedian.h filter::ImageMedian can be used in multiple compilation units 2020-05-20 08:44:45 -04:00
ImageMedian.hxx restore comment, add needed #include 2020-07-21 18:21:44 -06:00
Lagrangian.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Lagrangian.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
LagrangianStructures.h Deprecate DataSetFieldAdd. 2020-05-27 15:27:47 -04:00
LagrangianStructures.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
MapFieldMergeAverage.cxx Add MapFieldPermutation function 2020-05-21 08:34:28 -06:00
MapFieldMergeAverage.h Add MapFieldPermutation function 2020-05-21 08:34:28 -06:00
MapFieldPermutation.cxx Enable setting invalid value in probe filter 2020-06-03 15:29:37 -06:00
MapFieldPermutation.h Use a worklet to permute fields rather than ArrayHandlePermutation 2020-05-21 08:34:30 -06:00
Mask.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Mask.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
MaskPoints.h Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
MaskPoints.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
MeshQuality.h United We Stand 2020-06-05 16:09:10 -06:00
MeshQuality.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
NDEntropy.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
NDEntropy.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
NDHistogram.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
NDHistogram.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ParticleAdvection.h Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
ParticleAdvection.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
Pathline.h Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
Pathline.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
PointAverage.cxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
PointAverage.h Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
PointAverage.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
PointElevation.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
PointElevation.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
PointTransform.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
PointTransform.hxx Make PointTransform actually transform the points 2019-08-26 12:29:24 -06:00
PolicyBase.h Rename IsInValidArrayHandle to IsInvalidArrayHandle 2020-06-17 15:38:19 -06:00
PolicyDefault.h conslidate the license statement 2019-04-17 10:57:13 -06:00
PolicyExtrude.h Remove instances of ListTag in favor of List 2019-12-06 21:32:36 -07:00
Probe.h Enable setting invalid value in probe filter 2020-06-03 15:29:37 -06:00
Probe.hxx Enable setting invalid value in probe filter 2020-06-03 15:29:37 -06:00
SplitSharpEdges.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
SplitSharpEdges.hxx CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
Streamline.h Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
Streamline.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
StreamSurface.h Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
StreamSurface.hxx Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
SurfaceNormals.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
SurfaceNormals.hxx CoordinateSystem data is VariantArrayHandle 2020-07-14 08:50:39 -06:00
Tetrahedralize.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Tetrahedralize.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Threshold.cxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Threshold.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Threshold.hxx Deprecate Execute with policy 2020-05-18 12:38:41 -06:00
ThresholdPoints.h Convert CleanGrid (and dependents) to use precompiled field map 2020-05-21 08:34:29 -06:00
ThresholdPoints.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Triangulate.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Triangulate.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
Tube.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
Tube.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
VectorMagnitude.cxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
VectorMagnitude.h Update lists in TypeListTag.h 2019-12-05 11:05:19 -07:00
VectorMagnitude.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
VertexClustering.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
VertexClustering.hxx Properly handle global (whole mesh) fields in data set filters 2020-05-21 08:34:34 -06:00
WarpScalar.h Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
WarpScalar.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
WarpVector.h Convert uses of ListTagBase to List 2019-12-06 15:37:46 -07:00
WarpVector.hxx VTK-m filters now have a consistent set of header guards 2019-10-08 10:39:59 -04:00
ZFPCompressor1D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPCompressor1D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPCompressor2D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPCompressor2D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPCompressor3D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPCompressor3D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor1D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor1D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor2D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor2D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor3D.h Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00
ZFPDecompressor3D.hxx Convert filters to use precompiled field map functions where applicable 2020-05-21 08:34:32 -06:00