Commit Graph

8224 Commits

Author SHA1 Message Date
Kenneth Moreland
e9410f27cb Add constexpr to GetNumberOfBuffers
This should always be a constant value.
2020-11-17 12:25:11 -07:00
Kenneth Moreland
07d6c06c73 Convert ArrayHandleCartesianProduct to new buffer-style array 2020-11-17 12:17:28 -07:00
Nick Thompson
2bc6717063 Merge topic 'demangle_unknown_arrayhandle'
64ff68421 Use TypeToString to demangle symbol in UnknownArrayHandle.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2315
2020-11-17 13:07:11 -05:00
Nick Thompson
64ff684218 Use TypeToString to demangle symbol in UnknownArrayHandle. 2020-11-16 14:58:52 -05:00
Kenneth Moreland
f85e27c7f1 Merge topic 'all-basic-types'
d82fc92a1 Fix for serializable type names that change base C types
88eed2bbe Make sure all C scalar types are in TypeListScalarAll

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2312
2020-11-16 10:18:25 -05:00
Kenneth Moreland
d82fc92a10 Fix for serializable type names that change base C types
MR !2311 fixed an issue where some base C types were not recognized by
`SerializableTypeString`. However, the fix was such that different types
with the same layout had the same string. For example `char` and
`signed char` both were given the string `I8`. That meant that the
serialization/deseralization would work, but the deserialization could
change the type. That could cause problems if two arrays were expected
to have the same type but did not.

This change undoes much of MR !2311 and redoes it so that the types are
correct.
2020-11-12 16:59:56 -07:00
Kenneth Moreland
88eed2bbeb Make sure all C scalar types are in TypeListScalarAll
C++ template considers some types different even though they have the
exact same format. For example `int`, `long`, and `long long` all match
different types even though they all represent either signed 32-bit ints
or signed 64-bit ints.

List all these possible types in
`TypeListScalarAll`.
2020-11-12 16:18:56 -07:00
Kenneth Moreland
60f19f3f9e Merge topic 'serialization-fixes'
ec4a434dc Include all int types in SerializableTypeString
d9fe6a546 Fix ArrayHandleCast serializable type name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2311
2020-11-11 15:13:06 -05:00
Vicente Bolea
9a15735541 Merge topic 'fix-578-reduce-compilation-memory-usage'
f3db116c6 Clip: Split instantiations of its derivated filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2303
2020-11-11 12:23:43 -05:00
Vicente Adolfo Bolea Sanchez
f3db116c64 Clip: Split instantiations of its derivated filters
- It explicitly instantiate its concrete templates to
  the supported types.
- It disables implicit template instantations for the
  the supported types.
- Also fix small typo in Contour impl include guards

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-11-11 11:14:10 -05:00
Kenneth Moreland
ec4a434dcf Include all int types in SerializableTypeString
Previously, `SerializableTypeString` was specialized only for the VTK-m
defined int types (`Int8`, `UInt8`, `Int16`, etc.). You would think this
would cover all the base int types, but in fact C++ defines multiple int
types that have the exact same bit layout. These duplicates will not
match each other when matching template specializations. For example,
`char` is either the same as `signed char` or `unsigned char`, but will
match neither. Likewise, `long` is the same as either `int` or `long
long`, but all these types will match different template
specializations.

Now all integer types are covered.
2020-11-11 08:07:14 -07:00
Kenneth Moreland
d9fe6a546f Fix ArrayHandleCast serializable type name
The specialization for SerializableTypeString for ArrayHandleCast tried
to get the serialization for the base type and the storage tag. This is
wrong since the storage tag itself is not seralizable nor has a type
string. Instead, just record the type name for the sub ArrayHandle
itself.
2020-11-11 07:48:24 -07:00
Kenneth Moreland
785837e19a Merge topic 'simplify-buffer-metadata'
339a461f5 Avoid warning about uninitialized member
2f04dc3ae Simplify creating metadata in Buffer objects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2310
2020-11-11 09:46:50 -05:00
Kenneth Moreland
339a461f5c Avoid warning about uninitialized member 2020-11-10 16:39:57 -07:00
Kenneth Moreland
2f04dc3aef Simplify creating metadata in Buffer objects
Previously you had to create a special virtual object to place in the
`Buffer`'s metadata. This added a lot of difficulty that is probably
unnecessary.

Instead, just have `Buffer` hold an arbitrary object and some simple
functions to copy and delete it. There may be issues with type safety
across translation units, but we'll deal with that when/if we run into
it.
2020-11-10 16:22:05 -07:00
Kenneth Moreland
132a07225d Merge topic 'precompiled-field-get-range'
a88e0d914 Reintroduce ArrayRangeCompute.hxx as deprecated
7d681fb58 Deprecate templated versions of Field::GetRange

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2296
2020-11-10 13:49:45 -05:00
Kenneth Moreland
a88e0d9149 Reintroduce ArrayRangeCompute.hxx as deprecated
ArrayRangeCompute.hxx was removed, but other code may be including it.
The file was replaced. It now just includes its replacement
(ArrayRangeComputeTemplate.h) and forces a deprecation warning.
2020-11-10 09:58:50 -07:00
Kenneth Moreland
917ad80a85 Merge topic 'arrayhandlediscard-use-buffer'
cc729f422 Convert ArrayHandleDiscard to new buffer-style arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2309
2020-11-10 09:46:08 -05:00
Kenneth Moreland
8d73a86623 Merge topic 'separate-cont-exec-variant'
e3dfa4891 Do not attempt to move non-trivial objects in Variant
8e11b3ecd Remove ArrayPortalCheck
21db210a7 Make separate exec and cont versions of Variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2274
2020-11-10 09:33:13 -05:00
Kenneth Moreland
b082e6a749 Merge topic 'arrayhandlereverse-use-buffer'
8dfc68201 Convert ArrayHandleReverse to new buffer-style arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2308
2020-11-10 09:31:48 -05:00
Kenneth Moreland
cc729f422b Convert ArrayHandleDiscard to new buffer-style arrays 2020-11-09 15:45:45 -07:00
Kenneth Moreland
8dfc682014 Convert ArrayHandleReverse to new buffer-style arrays 2020-11-09 14:22:52 -07:00
Kenneth Moreland
e3dfa48910 Do not attempt to move non-trivial objects in Variant
The `Variant` class has separate implementations for its move and copy
constructors/assignment operators depending on whether the classes it
holds can be trivially moved. If the objects are trivial, Variant is
trivial as well. However, in the case where the objects are not trivial,
special construction and copying needs to be done.

Previously, the non-trivial `Variant` defined a move constructor that
did a byte copy of the contained object and reset the right hand side
object so that it did not attempt to destroy the object. That usually
works because it guarantees that only one version of the `Variant` will
attempt to destroy the object and its resources should be cleaned up
correctly.

But C++ is a funny language that lets you do weird things. Turns out
there are cases where moving the location of memory for an object
without calling the proper copy method can invalidate the object. For
example, if the object holds a pointer to one of its own members, that
pointer will become invalid. Also, if it points to something that points
back, then the object will need to update those pointers when it is
moved. GCC's version of `std::string` seems to be a type like this.

Solve the problem by simply deleting the move constructors. The copy
constructors and destructor will be called instead to properly manage
the object. A test for these conditions is added to `UnitTestVariant`.
2020-11-09 12:48:10 -07:00
Kenneth Moreland
8e11b3ecd1 Remove ArrayPortalCheck
This portal only works on the control environment, which means it cannot
work with the new `ArrayHandle` type. Recent changes to
`ArrayHandleMultiplexer` also do not allow this, so just remove it
rather than try to fix it.
2020-11-09 12:48:10 -07:00
Kenneth Moreland
21db210a73 Make separate exec and cont versions of Variant
The `Variant` class is templated to hold objects of other types.
Depending on whether those objects of are meant to be used in the
control or execution side, the methods on `Variant` might need to be
declared with (or without) special modifiers. We can sometimes try to
compile the `Variant` methods for both host and device and ask the
device compiler to ignore incompatibilities, but that does not always
work.

To get around that, create two different implementations of `Variant`.
Their API and implementation is exactly the same except one declares its
methods with `VTKM_CONT` and the other its methods `VTKM_EXEC`.
2020-11-09 12:48:10 -07:00
Kenneth Moreland
7d681fb585 Deprecate templated versions of Field::GetRange
Instead, always use precompiled versions of range computing. This means
you won't be able to specify the type. Currently, types are limited to
scalars vecs up to size 4.

The main motivation for this change is to allow you to include Field.h
with a non-device compiler. This is an important feature for our
customers.

I plan in the future to implement a mechanism to pull out a component of
most ArrayHandle's as a single array. This would enable us to support a
precompiled version that can compute the range of arbitrarily sized
Vecs.
2020-11-09 12:28:29 -07:00
Dave Pugmire
c8c92ffdc4 Merge topic 'AMR-streamline-tests'
f4fdc5e18 MPI testing update.
c0e07e845 remove print statements.
ed790afd8 debug for dashboards
b57ffb30a Add parallel AMR streamline test.
f93ddfee9 Re-enable the other SL tests.
6663d348b Add tests for AMR-like grids for streamline

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !2307
2020-11-05 21:44:45 -05:00
Dave Pugmire
f4fdc5e183 MPI testing update. 2020-11-05 16:04:48 -05:00
Dave Pugmire
c0e07e845f remove print statements. 2020-11-05 16:01:55 -05:00
Dave Pugmire
ed790afd8d debug for dashboards 2020-11-05 15:49:38 -05:00
Dave Pugmire
b57ffb30ae Add parallel AMR streamline test. 2020-11-05 15:34:11 -05:00
Dave Pugmire
f93ddfee9d Re-enable the other SL tests. 2020-11-05 14:30:54 -05:00
Dave Pugmire
6663d348b7 Add tests for AMR-like grids for streamline 2020-11-05 14:25:58 -05:00
Dave Pugmire
85128cfa2e Merge topic 'ghost_streamlines'
02f73fce1 Compiler warnings.
f876a2cee Structured ONLY in LS filter.
451720167 Fix testing for both SL and PA
fb72ab097 Add tests for all datasetypes for 3D
699dbae5c compile warning and fix to PA test.
4d6776cd1 Update filter test to use all data types.
c0189982a Messed up the merge.
a7f049ac1 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into ghost_streamlines
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2293
2020-11-04 07:59:55 -05:00
Dave Pugmire
02f73fce1b Compiler warnings. 2020-11-02 21:39:24 -05:00
Dave Pugmire
f876a2ceec Structured ONLY in LS filter. 2020-11-02 17:44:18 -05:00
Dave Pugmire
4517201676 Fix testing for both SL and PA 2020-11-02 17:35:13 -05:00
Dave Pugmire
fb72ab097b Add tests for all datasetypes for 3D 2020-11-02 17:23:42 -05:00
Dave Pugmire
699dbae5ca compile warning and fix to PA test. 2020-11-02 17:16:37 -05:00
Dave Pugmire
4d6776cd16 Update filter test to use all data types. 2020-11-02 17:07:22 -05:00
Dave Pugmire
c0189982ac Messed up the merge. 2020-11-02 16:31:23 -05:00
Dave Pugmire
a7f049ac1a Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into ghost_streamlines 2020-11-02 16:28:57 -05:00
Dave Pugmire
0bd0b0c5a7 Remove PA tests (moved into SL) 2020-11-02 16:26:14 -05:00
Dave Pugmire
467ad88d06 Move PA tests into Streamline 2020-11-02 16:25:38 -05:00
Robert Maynard
67541f5ea5 Merge topic 'update_thirdparty_for_hip_support'
19216a3bd Merge branch 'upstream-lcl' into update_thirdparty_for_hip_support
5f0d04ad3 lcl 2020-10-28 (b7fe5404)
913787f3a Merge branch 'upstream-diy' into update_thirdparty_for_hip_support
25fed44bd diy 2020-10-26 (538957e7)
7c40254d3 diy: update for corrections to allow HIP compilation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2304
2020-10-29 15:44:43 -04:00
Kenneth Moreland
7d77676599 Merge topic 'more-tbb-device-log'
7a12c5e52 Add missing logging for some TBB device algorithms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2306
2020-10-29 14:07:14 -04:00
Robert Maynard
77a979ff2b Merge topic 'corrections_for_swap_and_math_for_hip'
0b2ddb83b UnitTestBounds custom compile flags expressed via generator expression
1ed5dfca0 vtkm/Math frexp(float) version works now with HIP
ff381bf8b vtkm/Swap works with hip

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2301
2020-10-29 10:55:55 -04:00
Kenneth Moreland
7a12c5e524 Add missing logging for some TBB device algorithms
Some of the algorithms listed near the end of
DeviceAdapterAlgorithmTBB.h were missing the entry in the performance
log letting us know it was called.
2020-10-28 18:28:27 -06:00
Robert Maynard
19216a3bd6 Merge branch 'upstream-lcl' into update_thirdparty_for_hip_support
* upstream-lcl:
  lcl 2020-10-28 (b7fe5404)
2020-10-28 14:21:28 -04:00
Lightweight Cell Library Upstream
5f0d04ad37 lcl 2020-10-28 (b7fe5404)
Code extracted from:

    https://gitlab.kitware.com/vtk/lcl.git

at commit b7fe5404f330425e44116f3e9ead66f3a30f83a7 (master).
2020-10-28 14:21:28 -04:00