Commit Graph

8699 Commits

Author SHA1 Message Date
Kenneth Moreland
cc5b9a016f Add casts to FunctorsGeneral.h
If you are using the classes in `FunctorsGeneral.h`, you specify both
the result type and the type of the operands. Presumably you are already
comfortable with any type conversions. So let them keep.
2021-03-03 09:39:51 -07:00
Kenneth Moreland
d9c988b200 Allow for different types in basic type operators
The basic type operators in `Types.h` (i.e. `vtkm::Add`,
`vtkm::Subtract`, `vtkm::Multiply` and `vtkm::Divide`) required the same
type for both arguments. This caused problems when used with `Reduce`
and the initial value type did not match exactly.

Use some tricks from `BinaryOperators.h` to be flexible about using
different types.
2021-03-03 09:39:45 -07:00
Kenneth Moreland
58bd890c9c Merge topic 'variant-no-ref'
878a5e5ae Disallow references in Variant

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2428
2021-03-02 13:53:40 -05:00
Kenneth Moreland
6c8fcda5d5 Merge topic 'safer-is-trivial'
80c1f0a97 Be more conservative about is_trivial support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !2427
2021-03-02 10:59:52 -05:00
Kenneth Moreland
878a5e5ae2 Disallow references in Variant
I have run into strange problems with reference types sneaking into
templates. Reference types can cause weird errors when passing things
across hosts and devices, and it's best not to let them sneak into an
object like Varient where they become more difficult to check for.
2021-03-01 16:09:19 -07:00
Kenneth Moreland
80c1f0a974 Be more conservative about is_trivial support
`std::is_trivial` is part of the C++14 specification. However, we have
encountered multiple compilers that purport to implement C++14 but do
not implement `std::is_trivial` and the like checks correctly.

To avoid such issues, only use `std::is_trivial` on compilers that we
have tested to support it.
2021-03-01 15:12:27 -07:00
Gunther Weber
8e70a7c55b Merge topic 'fix-distributed-contour-tree-hang'
e4a46f339 Removed two TODO comments after verifying parameters
3ef95ded2 Port bug fix from distributed to augmented contour tree filter
70f7337f6 Fix hang in distributed contour tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2424
2021-03-01 13:55:16 -05:00
Gunther H. Weber
e4a46f3392 Removed two TODO comments after verifying parameters 2021-02-26 17:01:14 -08:00
Gunther H. Weber
3ef95ded23 Port bug fix from distributed to augmented contour tree filter 2021-02-26 15:23:44 -08:00
Gunther H. Weber
70f7337f64 Fix hang in distributed contour tree
Pass division vector to DIY RegularDecomposer to ensure its decomposition matches the one in the partitioned data set.
2021-02-26 15:23:44 -08:00
Matt Larsen
f1cb6d83c2 Merge topic 'missing_headers2'
1c060d9c5 more missing sstream headers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !2423
2021-02-26 17:16:08 -05:00
mclarsen
1c060d9c50 more missing sstream headers 2021-02-26 13:49:42 -08: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
Matt Larsen
00762fe582 Merge topic 'missing_sstream_header'
5be6fb0c5 add another missing header
572840f49 add another missing header
ffb0548b9 adding missing header

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2422
2021-02-26 12:15:29 -05:00
mclarsen
5be6fb0c50 add another missing header 2021-02-26 07:35:26 -08:00
mclarsen
572840f492 add another missing header 2021-02-26 07:29:18 -08:00
mclarsen
ffb0548b92 adding missing header 2021-02-26 07:17:52 -08:00
Kenneth Moreland
662998f194 Remove make_ImplicitFunctionFunctor functions
They were meant to replace `make_ImplicitFunction*Handle` classes, but
they don't really provide any interesting functionality and are not
backward compatible in any case. So just get rid of one more thing we
don't need to support.
2021-02-25 14:05:02 -07:00
Kenneth Moreland
27cc99acb4 Add documentation for Multiplexer and General implicit functions 2021-02-25 14:00:20 -07:00
Kenneth Moreland
6a445ebcf0 Do not return a reference from ImplicitFunction::PrepareForExecution
This can cause many troubles when passing around in a Variant
or across devices.
2021-02-25 13:49:04 -07:00
Kenneth Moreland
1aa0714aec Merge topic 'summit-errors'
aa5c9dba2 Remove problematic lambda functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2418
2021-02-25 11:41:51 -05:00
Matt Larsen
c8b24bd3e7 Merge topic 'i_was_wrong'
96223a955 i was wrong about the ray direction

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2421
2021-02-24 15:40:24 -05:00
Matt Larsen
96223a955e i was wrong about the ray direction 2021-02-24 09:36:20 -08: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
Matt Larsen
32b87b8b00 Merge topic 'the_robot_made_me_do_this_to_fix_things'
b9326c208 force update the images
b4877cf73 fix conversion warning
cac09110d fix rendering depths and divide by zero

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2419
2021-02-24 10:22:06 -05:00
mclarsen
b9326c2087 force update the images 2021-02-23 16:36:29 -08:00
mclarsen
b4877cf730 fix conversion warning 2021-02-23 14:52:35 -08:00
mclarsen
cac09110d8 fix rendering depths and divide by zero 2021-02-23 14:36:58 -08:00
Nickolas Davis
21eac99c74 Merge topic 'regression-test-debug'
bd72d7247 improve regression test error output when args aren't set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2417
2021-02-22 20:10:07 -05:00
nadavi
bd72d72471 improve regression test error output when args aren't set 2021-02-22 23:36:30 +00:00
Kenneth Moreland
096e7457c3 Fix CUDA issues 2021-02-22 06:40:03 -07:00
Kenneth Moreland
8c66237364 Suppress deprecation warnings in deprecated class
The implementation of a deprecated class should not give deprecation
warnings from its own implementation.
2021-02-22 06:40:03 -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
Kenneth Moreland
180d11e7f2 Add ImplicitFunctionGeneral 2021-02-22 06:40:02 -07:00
Kenneth Moreland
5ab9ddb637 Update ImplicitFunction tests to use non-virtual objects
There is still a test for the deprecated functionality (for now). The
deprecated test only happens if deprecated virtuals are still compiled,
and warnings are suppressed for this part of the code.
2021-02-22 06:40:02 -07:00
Kenneth Moreland
0cddbef0b9 Deprecated virutal methods in ImplicitFunctions
The `ImplicitFunction` classes are now trivial classes that can be
passed among host and devices. Because of this, we now need to know the
type of the `ImplicitFunction` in order to use it.

The old functionality still exists (when virtual methods are still being
compiled), but will give deprecation warnings. It is also not possible
to get a pointer from `ImplicitFunctionHandle` and cast it back to the
original data type (because the type changed). This is a weird testing
feature that makes little sense in practice.

Also unsupported in the deprecated classes is the ability to change
the object and have those changes reflected in the handle. This is
unfortunate, but it would have been difficult to implement this
feature that is going away and only appears to be used in some of
the tests.
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 Weber
e3851ce236 Merge topic 'contour-tree-array-decorator'
ebb265ce0 Add missing VTKM_EXEC_CONT declarations to functor
10ea36bb9 Pick one approach of using array handle decorator for contour tree
585f0ccb1 Two versions for replacing array transform with array decorator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2412
2021-02-21 21:56:32 -05:00
Gunther H. Weber
ebb265ce03 Add missing VTKM_EXEC_CONT declarations to functor 2021-02-18 16:53:50 -08:00
Kenneth Moreland
ee6aaee181 Merge topic 'point-locator-deprecated-features'
1822792b8 Support deprecated behavior of point locator pointers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2411
2021-02-18 15:13:23 -05:00
Kenneth Moreland
1822792b85 Support deprecated behavior of point locator pointers
`PointLocator`s have changed from being virtual objects to being trivial
objects. Part of this change means that when a worklet gets the
execution object for a point locator, it gets the actual object (or a
reference to it) instead of a pointer to an object. This means that the
new code uses the `.` operator to access the locator's features instead
of the `->` operator.

To support code still using the deprecated functionality, added a
specific `->` operator to the locator execution object to make it behave
as if it were a pointer. However, this operator is marked deprecated to
warn the user that they should modify their code to use the `.` instead.
2021-02-18 13:11:54 -07: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
Nickolas Davis
8e757e58ad Merge topic 'point-locator-virtual-removal'
f70ecd435 implement PointLocator without virtual methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2403
2021-02-17 15:53:32 -05:00
Kenneth Moreland
75597e240b Merge topic 'array-range-compute-unknown'
04f020ae6 Update Field to use new ArrayRangeCompute features
2a41428fe Add implementation of ArrayRangeCompute for UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2409
2021-02-17 15:43:53 -05:00
Kenneth Moreland
b9de2c2f92 Merge topic 'array-handle-offsets-to-num-components'
b9430c52e Create ArrayHandleOffsetsToNumComponents

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robertjmaynard@gmail.com>
Merge-request: !2299
2021-02-17 15:43:11 -05:00
Kenneth Moreland
b9430c52e6 Create ArrayHandleOffsetsToNumComponents
This is a fancy array that takes an array of offsets and converts it to
an array of the number of components for each packed entry.

This replaces the use of `ArrayHandleDecorator` in `CellSetExplicit`.
The two implementation should do the same thing, but the new
`ArrayHandleOffsetsToNumComponents` should be less complex for
compilers.
2021-02-17 10:44:47 -07:00
nadavi
f70ecd4354 implement PointLocator without virtual methods 2021-02-17 17:16:17 +00:00
Kenneth Moreland
04f020ae65 Update Field to use new ArrayRangeCompute features
Reduces the amount of code that has to be generated. Also improves the
number of arrays supported and has better support for deprecated
versions of `GetRange`.
2021-02-17 09:18:36 -07:00