Commit Graph

2146 Commits

Author SHA1 Message Date
Kenneth Moreland
cb3bb43ff9 Completely deprecate virtual methods
Deprecate `VirtualObjectHandle` and all other classes that are used to
implement objects with virtual methods in the execution environment.

Additionally, the code is updated so that if the
`VTKm_NO_DEPRECATED_VIRTUAL` flag is set none of the code is compiled at
all. This opens us up to opportunities that do not work with virtual
methods such as backends that do not support virtual methods and dynamic
libraries for CUDA.
2021-04-28 07:28:32 -06:00
Nick Thompson
25c14a7ea9 Fix uninitialized variable warning on gcc-10.3 2021-04-21 16:31:31 +00:00
Nick Thompson
021c3ff86d Print additional information on failure to facilitate debugging. 2021-04-13 09:08:52 -04:00
Nick Thompson
b0c2bc9d61 Ignore computationTime. 2021-04-12 18:51:52 -04:00
Nick Thompson
dc89c79fdc Remove unused variable. 2021-04-12 18:51:52 -04:00
Nick Thompson
be2ad7dd4b Speed up bounding interval hierarchy test. 2021-04-12 18:51:52 -04:00
Nick Thompson
1b11348cc3 Reduce data size to operate on in unit tests. 2021-04-12 18:51:52 -04:00
Nick Thompson
33993db2df Reduce runtime of unit tests. 2021-04-12 18:51:51 -04:00
Kenneth Moreland
68f39b86a8 Deprecate VariantArrayHandle
`VaraintArrayHandle` has been replaced by `UnknownArrayHandle` and
`UncertainArrayHandle`. Officially make it deprecated and point users to
the new implementations.
2021-04-07 16:12:38 -06:00
Li-Ta Lo
f2a4361c03 Merge topic 'alpine_sampling_2d'
ed8d2fb35 Merge branch 'master' into alpine_sampling_2d
93b8ee97d Pasing range explicitly to NDHistogram worklet for ALPINE 2D sampling milestone

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2257
2021-04-07 16:10:09 -04:00
Kenneth Moreland
294a30fd7e Check that all execution objects are trivially copyable
When the dispatcher does it's "transport" phase, it returns an
"execution object", but this object is held in the control environment
(on the host) although it may point to resources in the execution
environment (on the device). For this object to get from host to device,
it must be trivially copyable. If it is not, compile and/or runtime
errors could occur. So force this condition with a static assert.
2021-04-02 07:37:26 -06:00
Abhishek Yenpure
b316cf58fc Fix compiler warnings 2021-03-24 15:51:26 -07:00
Subhashis Hazarika
ed8d2fb356 Merge branch 'master' into alpine_sampling_2d 2021-03-24 14:08:10 -06:00
Abhishek Yenpure
5f7287bc1b Removing virtuals from particle advection
-- Removing virtuals from CellInterpolationHelpers
2021-03-23 22:27:28 -07:00
Abhishek Yenpure
2897b7a118 Fix missing include 2021-03-22 23:53:05 -07:00
Abhishek Yenpure
4c781374c2 Removing virtuals v1
-- Remove virtuals from Integrators, Fields, Particles
-- Remaining virtuals are in the CellInterpolationHelpers
2021-03-22 23:00:36 -07:00
Kenneth Moreland
91fc69fd06 Merge topic 'implicit-functions-no-virtual'
662998f19 Remove make_ImplicitFunctionFunctor functions
27cc99acb Add documentation for Multiplexer and General implicit functions
6a445ebcf Do not return a reference from ImplicitFunction::PrepareForExecution
b0fcab5d7 Do not capture references to execution objects
096e7457c Fix CUDA issues
8c6623736 Suppress deprecation warnings in deprecated class
a6725b3ac Remove use of deprecated ImplicitFunctions with virtual methods
180d11e7f Add ImplicitFunctionGeneral
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2413
2021-02-26 15:19:30 -05:00
Kenneth Moreland
b0fcab5d7f Do not capture references to execution objects
It is possible for a transport to return a reference to an object.
At some point, however, the object has to be potentially copied
to a different memory space to be used in the execution environment.
This was getting fouled up because the reference type was being
captured. Instead, remove any references from the object.
2021-02-24 11:58:18 -05:00
Kenneth Moreland
aa5c9dba28 Remove problematic lambda functions
The GCC 7 compiler on summit was failing to compile all of the
code. The problematic parts involved using lambda functions.
I think the problem is that the compiler has a bug where it
has a problem resolving the type of variables captured by
reference. The problem seems similar to this bug reported
to Kokkos:

https://github.com/kokkos/kokkos-kernels/issues/349

Solved the problem by removing the lambdas with either a
named method or just inline code.

I suspect the problem arose (without anyone's knowledge) with
MR !2331, which moved VTK-m to C++14. This GCC error seems to
happen with C++14 but not C++11. (The features of lambdas changed
between these two versions of C++.)
2021-02-24 09:52:59 -07:00
Kenneth Moreland
a6725b3acd Remove use of deprecated ImplicitFunctions with virtual methods
Unfortunately, this introduces a backward-incompatible change with the
filters that use ImplicitFunctions. Before, they would get an
ImplicitFunctionHandle. This class is deprecated, and there is no easy
way to get back the actual type of implicit function stored in it.
2021-02-22 06:40:02 -07:00
Gunther Weber
561db99b30 Merge topic 'debug/ctwarp3d'
7a14ea0ef Use Float64 instead of FloatDefault in TreeCompiler
96424c833 Fix bad ordering of args for CountLinkComponentsIn2DSlice in IsNecessary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2414
2021-02-21 21:57:38 -05:00
Gunther H. Weber
ebb265ce03 Add missing VTKM_EXEC_CONT declarations to functor 2021-02-18 16:53:50 -08:00
Gunther H. Weber
10ea36bb95 Pick one approach of using array handle decorator for contour tree 2021-02-18 11:55:04 -08:00
Gunther H. Weber
585f0ccb18 Two versions for replacing array transform with array decorator 2021-02-17 19:17:31 -08:00
Gunther H. Weber
7a14ea0efa Use Float64 instead of FloatDefault in TreeCompiler 2021-02-16 20:32:39 -08:00
Kenneth Moreland
2399741a97 Change Probe filter to use CellLocatorChooser
There was some compile errors with CUDA and the CellLocatorGeneral.
Apparently it added enough to the CUDA kernel to cause issues with
constant memory.
2021-02-15 12:39:12 -07:00
Kenneth Moreland
23c823d4b4 Fix compile errors and warnings related to new CellLocator structure 2021-02-15 12:39:11 -07:00
Kenneth Moreland
0a5f5d55c9 Remove virtual methods from cell locators
Deprecated the `CellLocator` class and made all methods of the
other `CellLocator` classes non-virtual. General locators can
still use the `CellLocatorGeneral` class, but this class now
only works with a predefined set of locators. (The functionality
to provide a function to select a locator has been removed.)
2021-02-15 12:39:11 -07:00
Oliver Ruebel
96424c8331 Fix bad ordering of args for CountLinkComponentsIn2DSlice in IsNecessary 2021-02-15 04:17:04 -08:00
Kenneth Moreland
05fc1747e0 Make deprecated tags more descriptive
Also, test to make sure that the deprecated types are still valid.
2021-02-09 09:45:41 -07:00
Kenneth Moreland
f4bc3002bb Fix compiler error with constexpr method
The `GetMaxNumberOfNeighbours` of the `MeshStructure*` classes was
declared `constexpr`. This was causing some compiler errors.

I think the problem is actually a bug with GCC (https://gcc.gnu.org/
bugzilla/show_bug.cgi?id=66297). Whether it is a compiler bug or not,
there does not seem to be a large value to declaring this method
`constexpr`, so I just removed the keyword.
2021-02-08 17:21:53 -07:00
Kenneth Moreland
4d8f05baef Update CellSetExtrude to not specify exec types by device
Somewhere during this edit I removed a header file that didn't strictly
need to be there. This caused me to have to add

```cpp
```

in several places in the code.
2021-02-08 16:57:16 -07:00
Kenneth Moreland
c55d15f397 Deprecate ArrayHandle::ExecutionTypes
The newer version of `ArrayHandle` no longer supports different types of
portals for different devices. Thus, the `ReadPortalType` and
`WritePortalType` are sufficient for all types of portals across all
devices.

This significantly simplifies supporting execution objects on devices,
and thus this change also includes many changes to various execution
objects to remove their dependence on the device adapter tag.
2021-02-08 12:17:37 -07:00
dpugmire
aa713b565f Support for dist-memory pathlines. 2021-02-05 09:40:50 -05:00
Kenneth Moreland
1faed3712e Remove the use of ResetTypes for ArrayCopy
It used to be the case where you needed to call `ResetTypes` on a
`VariantArrayHandle` before using `ArrayCopy` to limit the types it gets
compiled for. However, there is now a general form for
`UnknownArrayHandle`, so `ResetTypes` no longer does anything useful in
this case. Remove the use of that.
2021-02-02 17:34:08 -07:00
Kenneth Moreland
26ea2ab420 Break circular dependency of ArrayCopy.h and UnknownArrayHandle.h
The circular dependency came from UnknownArrayHandle.h needing
VTKmDefaultTypes.h, which needed all the cell set types. Some of those
cell sets used ArrayCopy in templated functions. Changed those functions
to directly deep copy the ArrayHandle.
2021-02-02 17:33:08 -07:00
Oliver Ruebel
cea1173233 Reverse error check in ContourTreeMaker 2021-02-02 13:46:01 -08:00
Oliver Ruebel
5005b5d44a Updated ContourTreeMesh::DebugPrint / ContourTreeMaker::DebugPrintt to use per-call build guards 2021-02-02 13:44:50 -08:00
Gunther Weber
8ebd889732 Merge topic 'add-contour-tree-unit-tests'
c59d8b25b Use test_equal_ArrayHandles instead of custom functions ArraysEqual
06ab386a0 Added test for combinining contour tree meshes
3d5adf335 Re-enabled tests with external files (and added required files to Git LFS)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2344
2021-02-01 16:55:29 -05:00
Kenneth Moreland
76634d167e Merge topic 'deprecate-arrayhandle-shrink'
34412ff29 Deprecate ArrayHandle::Shrink
eb90a6080 Update documentation for Storage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2392
2021-02-01 16:07:22 -05:00
Kenneth Moreland
34412ff298 Deprecate ArrayHandle::Shrink
This method has been subsumed by Allocate with vtkm::CopyFlag::On.
2021-02-01 08:07:40 -07:00
Gunther H. Weber
c59d8b25b1 Use test_equal_ArrayHandles instead of custom functions ArraysEqual 2021-01-29 11:33:25 -08:00
Gunther H. Weber
06ab386a03 Added test for combinining contour tree meshes 2021-01-29 09:45:13 -08:00
Gunther H. Weber
239adf5980 Fix typos in functor names for contour tree 2021-01-28 14:29:45 -08:00
Gunther H. Weber
0183db6854 Split array access into separate lines and add VTKM_ASSERT 2021-01-27 19:31:56 -08:00
Kenneth Moreland
8b133288ce Fix deprecation warnings
There was an error that caused deprecation warnings in VTK-m to be
suppressed, which meant that many uses of deprecated features went
unnoticed. This fixes those deprecation warnings.

The majority of the warnings were caused by the use of the deprecated
`Cast`, `CopyTo`, and `ResetTypes` methods of `UnknownArrayHandle` (or
`VariantArrayHandle`). Both `Cast` and `CopyTo` have been subsumed by
`AsArrayHandle` (to make the functionality more clear). `ResetTypes` now
requires a second template argument to define the storage types to try.

Also fixed some issues with `SerializableField` being deprecated.
This class is no longer necessary because `Field` can now be directly
serialized.
2021-01-26 07:56:39 -07:00
Kenneth Moreland
11a4c9867e Change Field to hold UnknownArrayHandle rather than VariantArrayHandle
The `VariantArrayHandle` will soon be deprecated for its replacement of
`UnknownArrayHandle`. Thus, `Field` and related classes should start
using the new `UnknownArrayHandle`.
2021-01-14 17:01:22 -07:00
Kenneth Moreland
a6edc832da Merge topic 'soa-array-default'
cecd81d5d Add types appropriate for Ascent
865855ea0 Add changelog for making ArrayHandleSOA a default array
50ff9c22a Add support of `ArrayHandleSOA` as a default storage type
bc09a9cd1 Add precompiled versions of `ArrayRangeCompute` for `ArrayHandleSOA`
77f9ae653 Support `ArrayHandleSOA` only for `Vec` value types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2349
2021-01-14 12:40:58 -05: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
Robert Maynard
ebf648906f FlyingEdges uses optimized Y axis algorithm for Kokkos device 2021-01-07 13:46:42 -05:00