Commit Graph

9 Commits

Author SHA1 Message Date
Kenneth Moreland
99e613d377 Avoid conversion warnings in RecombineVec copy
Unfortunately, there is no way to specify when copying `RecombineVec`s
whether we wish to allow precision loss in conversions. Because
sometimes we need them, disable the warnings.
2021-02-03 10:06:12 -07:00
Kenneth Moreland
7a3f20560a Merge topic 'switch-to-new-arrayhandle'
3228752b2 Fix error message when using deprecated storage
5ef4e7eee Make new style of ArrayHandle the expected style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2375
2021-01-14 10:14:20 -05:00
Kenneth Moreland
9ed68f5a42 Add default copy constructor for RecombineVec
Some compilers complain if the copy constructor is not explicitly
specified.
2021-01-13 09:19:34 -07:00
Kenneth Moreland
ab9c0f7248 Add arithmetic assignment operators to RecombineVec
`RecombineVec` is the class used as the value type for
`ArrayHandleRecombineVec`. It is a `Vec`-like object, but has several
limitations (including arithmetic operators like `+` won't work).
Arithmetic assignment operators are useful so you don't have to create
impossible intermediate values.
2021-01-13 09:19:34 -07:00
Kenneth Moreland
06c59fed13 Update MapFieldMergeAverage/Permuation to use new CastAndCall
These functions now use
`UnknownArrayHandle::CastAndCallWithExtractedArray` to reduce the number
of times the worklet is run.
2021-01-13 09:19:33 -07:00
Kenneth Moreland
5ef4e7eeee Make new style of ArrayHandle the expected style
What was previously declared as `ArrayHandleNewStyle` is now just the
implementation of `ArrayHandle`. The old implementation of `ArrayHandle`
has been moved to `ArrayHandleDeprecated`, and `ArrayHandle`s still
using this implementation must declare `VTKM_ARRAY_HANDLE_DEPRECATED` to
use it.
2021-01-12 07:17:53 -07:00
Kenneth Moreland
f941cb607c Move Fetch specializations to vtkm/exec/arg
Some of the special `ArrayHandle`s require specialized versions of
`vtkm::exec::arg::Fetch`. The specializations were not put in the
respective vtkm/exec/arg/Fetch*.h header files because the definition of
the `ArrayHandle`s was not available there. The implementation was in
the ArrayHandle*.h files, but it is hard to find the specialization
there.

Instead, make a secondary header file in vtkm/exec/arg that implements
the Fetch specialization and include it from the ArrayHandle*.h file.
That way, the basic Fetch does not have to include odd `ArrayHandle`
types but the `Fetch` implemenations are still all located together.
2021-01-11 10:47:58 -07:00
Kenneth Moreland
9833f3d0da Fix issue with using recombined vec as an output array
`ArrayHandleRecombineVec` is used when calling
`ExtractArrayFromComponents` from `UnkownArrayHandle`. It needs special
handling with the `Fetch` for an output array.
2021-01-04 14:21:32 -07:00
Kenneth Moreland
755af739e3 Add ArrayHandleRecombineVec
The primary purpose of `ArrayHandleRecombineVec` is to take arrays
returned from `ArrayExtractComponent` and recombine them again into a
single `ArrayHandle` that has `Vec` values.
2021-01-04 11:55:02 -07:00