Commit Graph

6172 Commits

Author SHA1 Message Date
Nick Thompson
0019c0b3af Missing include file. 2020-11-20 13:46:59 -05:00
Nick Thompson
db00f356b0 Merge remote-tracking branch 'origin/master' into more_digits 2020-11-20 13:03:38 -05:00
Nick Thompson
3a9e97bb88 Write more digits in VTKDataSetWriter.cxx. 2020-11-20 11:39:30 -05:00
Vicente Adolfo Bolea Sanchez
5ddfb719a3 ClipWithField: Use primive types in instantiations
`vtkm::[U]Int*` types depending of each platform/arch would translate to
different integer types. We cannot make a generalization with this.

A simple way to handle this is to simply use primitive types, such as
char, signed char, long..., instead of vtkm::[U]Int*. This makes sure
that every primitive type is actually instantiated.

We could potentially use this in other filters instantiation file.

This error has been reported in VTK when being build with vtkm.
2020-11-19 19:14:16 -05:00
Robert Maynard
1c7fbc70c3 Merge topic 'remove_filter_hxx_usages'
7eaedfe84 Reduce compiler memory usage by removing auto hxx inclusion

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2313
2020-11-19 10:59:43 -05:00
Robert Maynard
7eaedfe84b Reduce compiler memory usage by removing auto hxx inclusion
A large portion of the VTK-m filters are now compiled into the
vtkm_filter library. These pre-built filters now don't include
the respective hxx file to remove the amount of template
instantiation users do.

To verify that this removal reduces compiler memory ( and maybe time)
I profiled the compiler while it building filter tests in debug mode.
Here is a selection of results:

```
CleanGrid           10.25s => 9.01s,  901MB => 795MB
ExternalFaces       13.40s => 5.96s, 1122MB => 744MB
ExtractStructured    4.69s => 4.75s,  492MB => 492MB
GradientExplicit    22.97s => 5.88s, 1296MB => 740MB
```
2020-11-19 09:59:25 -05:00
Kenneth Moreland
5e3ae70a6b Merge topic 'arrayhandlegroupvec-use-buffer'
41784b31f Allow ArrayHandleGroupVec with odd component array size
d472e05ea Convert ArrayHandleGroupVec to new buffer-style array

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2317
2020-11-18 17:36:46 -05:00
Nick Thompson
0ac1b816c8 Merge topic 'less_verbose_tests_2'
275abf2f2 Revert change the removes printing of seed.
3b2c10339 Less verbose unit tests.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2321
2020-11-18 15:12:32 -05:00
Kenneth Moreland
41784b31ff Allow ArrayHandleGroupVec with odd component array size
The array given to `ArrayHandleGroupVec` should really have a number of
values that divides evenly among the `Vec`s. Previously, if this was not
the case, an error exception was thrown. These changes allow this
condition. Extra components are dropped and a warning is logged.
2020-11-18 11:15:50 -07:00
Nick Thompson
275abf2f2d Revert change the removes printing of seed. 2020-11-18 11:03:19 -05:00
Kenneth Moreland
8d3f376646 CreateBuffers improvements suggested by Rob Maynard 2020-11-18 08:25:53 -07:00
Nick Thompson
3b2c103397 Less verbose unit tests. 2020-11-18 08:35:37 -05:00
Kenneth Moreland
c072e4ed29 Add a CreateBuffers helper function
Most `ArrayHandle` implementations must create an
`std::vector<vtkm::cont::internal::Buffer>` object. It is most helpful
to create it in the constructor when initializing the superclass (so the
superclass does not have to create it's own). Added a `CreateBuffers`
convenience function to make it easy to build these vectors.
2020-11-17 16:20:15 -07:00
Kenneth Moreland
d472e05eae Convert ArrayHandleGroupVec to new buffer-style array 2020-11-17 12:36:05 -07:00
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
64ff684218 Use TypeToString to demangle symbol in UnknownArrayHandle. 2020-11-16 14:58:52 -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
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
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
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
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