Commit Graph

8224 Commits

Author SHA1 Message Date
Kenneth Moreland
06579aac8c Merge topic 'replace-variantarrayhandle-impl'
386301719 Test UnknownArrayHandle behavior on special arrays
872da1f8e Suppress unnecessary deprecation warnings on VS
bb443bbc2 Replace the implementation of VariantArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2255
2020-09-05 00:32:16 -04:00
Vicente Bolea
8c5fca6d2c Merge topic 'adding-vtkm-vec'
fb919e048 vtkm::Vec: added unrolled arithmetic operators overload

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2252
2020-09-04 12:21:45 -04:00
Vicente Adolfo Bolea Sanchez
fb919e048e vtkm::Vec: added unrolled arithmetic operators overload
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-09-03 16:10:15 -04:00
Kenneth Moreland
3863017190 Test UnknownArrayHandle behavior on special arrays
`UnknownArrayHandle` has special behavior when putting in or getting out
an `ArrayHandleMultiplexer` or an `ArrayHandleCast`. When putting in
either of these, `UnknownArrayHandle` gets the actual array stored in
the multiplexer and cast so that you can later retrieve the base array.
Likewise, when you get the array out with `AsArrayHandle`, you can give
it an `ArrayHandleCast` or `ArrayHandleMultiplexer`, and you will get
the base array placed inside of it.
2020-09-03 09:13:01 -06:00
Kenneth Moreland
872da1f8e6 Suppress unnecessary deprecation warnings on VS
The Visual Studio compiler has an annoying habit where if you use a
templated class or method with a deprecated class as a template
parameter, you will get a deprecation warning where that class is used
in the templated thing. Thus, if you want to suppress the warning, you
have to supress every instance of the template, not just where the
template is declared.

This is annoying behavior that is thankfully not replicated in other
compilers.
2020-09-02 16:48:11 -06:00
Kenneth Moreland
bb443bbc24 Replace the implementation of VariantArrayHandle
The implementation of `VariantArrayHandle` has been changed to be a
relatively trivial subclass of `UnknownArrayHandle`.

The advantage of this change is twofold. First, it removes
`VariantArrayHandle`'s dependence on `ArrayHandleVirtual`, which gets us
much closer to deprecating that class. Second, it ensures that
`UnknownArrayHandle` is a reasonable replacement for
`VariantArrayHandle`, so we can move forward with replacing that.
2020-09-02 15:02:44 -06:00
Kenneth Moreland
278ab6c504 Merge topic 'vtk-files-no-cells'
66a4a23eb Fix issue of getting pointer from std::vector of size 0
3f8da6e7e Fix some debugging code that should not have been there
52cecefba Fix crash when loading poly data with no cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2254
2020-09-02 14:46:43 -04:00
Kenneth Moreland
66a4a23ebf Fix issue of getting pointer from std::vector of size 0
C++11 introduced the `std::vector::data()` method. In addition to being
more syntatically pleasing, it should correctly handle the condition
when the `std::vector` is size 0 and therefore has no real pointer.
(Expressions like `&v[0]` are undefined when the `vector` is empty.)
2020-09-02 12:04:34 -06:00
Kenneth Moreland
3f8da6e7e1 Fix some debugging code that should not have been there 2020-09-01 14:21:09 -06:00
Kenneth Moreland
52cecefba0 Fix crash when loading poly data with no cells 2020-09-01 14:20:11 -06:00
Kenneth Moreland
3e398bbb3d Merge topic 'reverse-arrayhandle-deepcopy-pattern'
5250c28ff Swap call pattern of ArrayHandle::DeepCopy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <alliepiper16@gmail.com>
Merge-request: !2253
2020-09-01 15:04:40 -04:00
Kenneth Moreland
5250c28ff2 Swap call pattern of ArrayHandle::DeepCopy
The new method `ArrayHandle::DeepCopy` had the pattern such that the
data in the `this` array was pushed to the provided destination array.
However, this is the opposite pattern used in the equivalent method in
VTK, which takes the data from the provided array and copies it to
`this` array.

So, swap the pattern to match that of VTK. Also, make the method name
more descriptive by renaming it to `DeepCopyFrom`. Hopefully, users will
read that to mean given the `ArrayHandle`, you copy data from the other
provided `ArrayHandle`.
2020-09-01 10:08:06 -06:00
Ben Boeckel
05ec03b3b5 Merge topic 'fix-filtercell-replacement'
aa6eb01df ComputeMoments: use FilterField instead of FilterCell

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2251
2020-09-01 09:57:44 -04:00
Ben Boeckel
aa6eb01dfe ComputeMoments: use FilterField instead of FilterCell 2020-08-31 16:51:12 -04:00
Li-Ta Lo
e17345a81f Merge branch 'master' into concurrent_union_find 2020-08-31 14:34:29 -06:00
Kenneth Moreland
c079433b42 Merge topic 'unknown-array-handle'
c79daa5c2 Suggested changes to comments
fca25fa3c Enable serialization of UnknownArrayHandle and UncertainArrayHandle
94aa6449b Add UncertainArrayHandle
e47cedd97 Add UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2202
2020-08-31 14:55:24 -04:00
Kenneth Moreland
c79daa5c2f Suggested changes to comments 2020-08-31 09:51:53 -06:00
Kenneth Moreland
fca25fa3c7 Enable serialization of UnknownArrayHandle and UncertainArrayHandle
Because UnknownArrayHandle is not typed, we can compile into vtkm_cont
the ability to serialize many types.
2020-08-31 09:46:57 -06:00
Kenneth Moreland
94aa6449b9 Add UncertainArrayHandle 2020-08-31 09:46:57 -06:00
Kenneth Moreland
e47cedd972 Add UnknownArrayHandle 2020-08-31 09:46:56 -06:00
Li-Ta Lo
945e9cf328 some more comments 2020-08-31 09:23:03 -06:00
Ben Boeckel
ede0c179b7 Merge topic 'vtkmdiy-install-destination'
f4df3fe00 vtkmdiy: forward the bin install directory to diy
a4b4b1a2c Merge branch 'upstream-diy' into HEAD
db483b3e2 diy 2020-08-26 (c9efaac9)
acde82a36 diy: update for install destination fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2244
2020-08-28 14:29:11 -04:00
Li-Ta Lo
7533538e17 restore CI config files, minor clean up for UnionFind 2020-08-28 10:48:14 -06:00
Li-Ta Lo
31322cd2e1 use CompareAndSwap for setting root 2020-08-28 10:33:24 -06:00
Li-Ta Lo
51a55dd12f disable CI test on all platforms except ubuntu1804_gcc7 2020-08-28 09:10:28 -06:00
Li-Ta Lo
4cd320c284 put finding and setting root in a loop 2020-08-28 08:53:56 -06:00
Li-Ta Lo
f91fb35d7f added more data race analysis, change GraphGraft to use AtomicArray 2020-08-28 00:04:50 -06:00
Li-Ta Lo
e5f8219477 try fixing CUDA compiler error 2020-08-27 22:35:27 -06:00
Li-Ta Lo
fc754b329f deduplicate UnionFind 2020-08-27 20:07:32 -06:00
Kenneth Moreland
9c7001a63b Merge topic 'array-copy-dont-replace-buffers'
2877aab21 Fix problem with ArrayCopy of two of the same arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2250
2020-08-27 21:27:01 -04:00
Li-Ta Lo
af53fb736f Add unit test for graph connectivity with data from the ECL_CC paper 2020-08-27 17:37:08 -06:00
Kenneth Moreland
2877aab21a Fix problem with ArrayCopy of two of the same arrays
A recent modification to `ArrayCopy` created a fast path for when
copying arrays of the same type. This fast path just deep copies the
buffers. The issue was that the buffer copy was creating new buffers
instead of updating the existing buffers. The passed in `ArrayHandle`
would get updated to the new buffers, but any other `ArrayHandle`s
sharing those buffers would still have the old versions. That would lead
to unexpected errors in code like this.

```cpp
vtkm::cont::ArrayHandle<T> outArray1;
vtkm::cont::ArrayHandle<T> outArray2 = outArray1;

vtkm::cont::ArrayCopy(inArray, outArray2);
```

If `inArray` was a different type than `outArray2`, then the data for
both `outArray1` and `outArray2` would be updated (which is the expected
behavior for something considered a "pointer"). However, if `inArray`
was the same type as `outArray2`, then the fast path would change
`outArray2` but leave `outArray1` the same.

This behavior has been corrected so that, in this case, the data of
`outArray1` always follows that of `outArray2`.
2020-08-27 17:28:54 -06:00
Kenneth Moreland
e55da0f1a4 Merge topic 'sort-not-stable'
d938226cd Fix tests that relied on stable sort

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2249
2020-08-27 17:37:09 -04:00
Kenneth Moreland
d938226cd3 Fix tests that relied on stable sort
The parallel sorts in the device adapter are documented to not be
stable. Up until recently, the sorts for all the supported devices
happened to be stable (or at least provided a stable sort where needed).
However, the recent Kokkos adapter provides a sort that is no stable.
This broke some tests that relied on stable sorts when they should not
have.

Fix the tests that relied on stable sort to check the results.
2020-08-27 14:50:51 -06:00
Li-Ta Lo
17047f456d more comments on things to do 2020-08-27 11:46:31 -06:00
Li-Ta Lo
727e0cb268 single pass algorithm for both Image and Graph connectivity 2020-08-27 11:22:48 -06:00
Li-Ta Lo
19be36ee7a implemented single pass algorithm for image connectivity 2020-08-27 11:03:45 -06:00
Li-Ta Lo
0902cbbad3 save before change to single pass algorithm 2020-08-27 10:17:02 -06:00
Kenneth Moreland
9e9210ac75 Merge topic 'kokkos-warnings'
80cf0b365 Fix more signed/unsigned vtkm::Id/std::size_t warnings in kokkos adapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2247
2020-08-27 10:13:17 -04:00
Kenneth Moreland
80cf0b3658 Fix more signed/unsigned vtkm::Id/std::size_t warnings in kokkos adapter 2020-08-27 07:59:03 -06:00
Robert Maynard
faa845d56e Merge topic 'reenable_tests_mistakenly_disabled'
769d6468f Correct a mistake where the kokkos MR merged disabled worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2243
2020-08-27 07:56:37 -04:00
Kenneth Moreland
d9b8a620a1 Merge topic 'array-copy-overloads'
3143c7105 Add tests for Buffer::DeepCopy
8298d33f5 Fix issues with ArrayCopy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2241
2020-08-26 16:06:11 -04:00
Kenneth Moreland
ef236dc1e5 Merge topic 'stateless-storage'
0cc0f3f96 Make Storage class completely stateless

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2238
2020-08-26 15:58:31 -04:00
Dave Pugmire
ca57b05264 Merge topic 'renameParticleTypes'
d64deb00f rename vtkm::Massless to Particle
596ec20e9 Change particle type in examples
855e973a2 Rename the Particle classes.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2239
2020-08-26 15:16:58 -04:00
Kenneth Moreland
3143c71058 Add tests for Buffer::DeepCopy
Tests for regression of deadlock found with copying an empty `Buffer` as
well as testing other `DeepCopy` behavior.
2020-08-26 12:45:19 -06:00
Ben Boeckel
f4df3fe007 vtkmdiy: forward the bin install directory to diy 2020-08-26 14:18:33 -04:00
Diy Upstream
db483b3e27 diy 2020-08-26 (c9efaac9)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit c9efaac980f80be866585a3412cad6bc8a89409b (for/vtk-m-20200826-master).
2020-08-26 14:18:31 -04:00
Ben Boeckel
a4b4b1a2c9 Merge branch 'upstream-diy' into HEAD
# By Diy Upstream
* upstream-diy:
  diy 2020-08-26 (c9efaac9)
2020-08-26 14:18:31 -04:00
Ben Boeckel
acde82a366 diy: update for install destination fix 2020-08-26 14:17:59 -04:00
Robert Maynard
4752fb2afe Merge topic 'kokkos_warnings'
9aa3b9df0 DeviceAdapterAlgorithmKokkos correct signed/unsigned warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2242
2020-08-26 14:15:58 -04:00