Commit Graph

8092 Commits

Author SHA1 Message Date
Kenneth Moreland
11996f133f Remove virtual methods from ColorTable
Virtual methods are being deprecated, so remove their use from the
ColorTable classes. Instead of using a virtual method to look up a value
in the ColorTable, we essentially use a switch statement. This change
also simplified the code quite a bit.

The execution object used to use pointers to handle the virtual objects.
That is no longer necessary, so a simple `vtkm::exec::ColorTable` is
returned for execution objects. (Note that this `ColorTable` contains
pointers that are specific for the particular device.) This is a non-
backward compabible change. However, the only place (outside of the
`ColorTable` implementation itself) was a single worklet for converting
scalars to colors (`vtkm::worklet::colorconversion::TransferFunction`).
This is unlikely to affect anyone.

I also "fixed" some names in enum structs. There has been some
inconsistencies in VTK-m on whether items in an enum struct are
capitolized or camel case. We seem to moving toward camel case, so
deprecate some old names.
2020-09-14 13:26:16 -06:00
Ben Boeckel
c0caf4fa95 Merge topic 'warnings-from-vtk'
482266b44 Particle: explicitly make the copy ctor and assignment op
1037aa756 AssignerPartitionedDataSet: mark dtor as override

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2259
2020-09-14 13:16:18 -04:00
Kenneth Moreland
0e6529eb34 Merge topic 'unknownarray-variable-vec'
9b62c9eef Enable storing variable-sized Vecs in UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2260
2020-09-14 13:06:17 -04:00
Ben Boeckel
482266b442 Particle: explicitly make the copy ctor and assignment op
They are disabled because we have a custom destructor.
2020-09-14 10:47:42 -04:00
Kenneth Moreland
9b62c9eef1 Enable storing variable-sized Vecs in UnknownArrayHandle
One of the features of `UnknownArrayHandle` is that it allows you to
query how many `Vec` components each value has without resolve the type
of the array. The functionality to implement this failed if you tried to
store an `ArrayHandle` that stored `Vec`-like objects with `Vec` sizes
that varied from value to value (i.e. an `ArrayHandleGroupVecVariable`).

Storing such an array in `UnknownArrayHandle` might not be the best
idea, but it should probably work. This change allows you to store such
an array. If you try to query the number of components, you will get 0.
2020-09-14 08:39:27 -06:00
Kenneth Moreland
fbb69b7655 Merge topic 'deprecate-arrayhandlevirtual'
e706880d7 Fix unnecessary deprecation warnings in visual studio
f7cc03107 Fix deprecated warnings
b27e4c7ea Ignore files for deprecated virtual classes for SourceInInstall test
284774cf4 Turn on "no virtual" option on some CI builds
cd08fd499 Add changelog for removing virtual methods
63ef84ed7 Optionally remove all use of ArrayHandleVirtual
e11f612ad Deprecate ArrayHandleVirtual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2256
2020-09-10 14:32:40 -04:00
Kenneth Moreland
6c383b0a73 Merge topic 'unknown-array-dynamic-transfer'
78c7909c8 Enable automatic transformation of Unknown/UncertainArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2258
2020-09-10 12:41:50 -04:00
Ben Boeckel
1037aa756e AssignerPartitionedDataSet: mark dtor as override 2020-09-10 10:03:18 -04:00
Nickolas Davis
02db46b20f Merge topic 'ipx-iris-fix-warnings'
843307bcf fix floating point casting warning in worklet test
18263a37a update float casting to not have warnings on iris
89cf93a66 fix OpenMP PRAGMA warnings for auto-associated looping variable types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2245
2020-09-09 11:34:28 -04:00
Kenneth Moreland
78c7909c84 Enable automatic transformation of Unknown/UncertainArrayHandle 2020-09-09 07:03:34 -06:00
Kenneth Moreland
e706880d7b Fix unnecessary deprecation warnings in visual studio
When using a deprecated `ArrayHandle`, you should get the warning when
you declare it, not when it's used in a templated class or method.
2020-09-09 06:13:08 -06:00
Kenneth Moreland
f7cc03107d Fix deprecated warnings
Supress the deprecated class warnings for the implementation of
deprecated features.
2020-09-09 06:13:07 -06:00
Kenneth Moreland
b27e4c7ea6 Ignore files for deprecated virtual classes for SourceInInstall test
If `VTKm_NO_DEPRECATED_VIRTUAL` is on, then these classes are not
installed. Thus, add exceptions for these files to avoid test failures.

We could get fancier by only checking if `VTKm_NO_DEPRECATED_VIRTUAL` is
off, but that seems heavy-handed to make a regression test for something
that will go away.

These exceptions should be removed once the files are removed.
2020-09-09 06:13:07 -06:00
Kenneth Moreland
284774cf43 Turn on "no virtual" option on some CI builds
Make sure that the `VTKm_NO_DEPRECATED_VIRTUAL` CMake option is building
correctly by adding it to some of the CI builds.
2020-09-09 06:12:58 -06:00
nadavi
843307bcf7 fix floating point casting warning in worklet test 2020-09-08 17:47:53 +00:00
nadavi
18263a37ac update float casting to not have warnings on iris 2020-09-08 17:47:53 +00:00
nadavi
89cf93a66b fix OpenMP PRAGMA warnings for auto-associated looping variable types 2020-09-08 17:47:53 +00:00
Kenneth Moreland
cd08fd4995 Add changelog for removing virtual methods
The changelog is not quite accurate because it is claiming that all
virtual methods are removed when that is not quite the case.
Hopefully soon the changelog text will be accurate.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
63ef84ed78 Optionally remove all use of ArrayHandleVirtual
As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
e11f612add Deprecate ArrayHandleVirtual
Virtual methods in the execution environment are going away the next
major release of VTK-m, so deprecate their use in preparation for that.
2020-09-04 22:52:45 -06:00
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