Commit Graph

8657 Commits

Author SHA1 Message Date
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
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
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
Kenneth Moreland
2a41428fe4 Add implementation of ArrayRangeCompute for UnknownArrayHandle
This allows you to easily compute the range of any ArrayHandle, even if
you don't know the type.

A unit test for ArrayRangeCompute was also added.
2021-02-17 09:18:31 -07:00
Kenneth Moreland
3aa2c7521a Merge topic 'cell-locators-not-virtual'
047d79672 Fix CUDA compilation error with Lagrangian filter
aec9890e9 Remove check for CellLocator.h in SourceInInstall test
2399741a9 Change Probe filter to use CellLocatorChooser
e61c54f87 Add CellLocatorChooser
23c823d4b Fix compile errors and warnings related to new CellLocator structure
47429a316 Fix export issues with CellLocatorBase
8922f600e Use GNU attributes for deprecated
0a5f5d55c Remove virtual methods from cell locators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2271
2021-02-16 19:16:01 -05:00
Kenneth Moreland
047d79672a Fix CUDA compilation error with Lagrangian filter
CUDA architecture has a limited amount of memory available for
constants. The CUDA compiler uses this space to hold constants for some
optimizations. However, for large kernels, the number of constants
needed might be larger than the constant space available. For these
conditions, you have to disable this form of optimization with the `-
Xptxas --disable-optimizer-constants` flags.

Currently, the only file that seems to have this issue is the test for
the Lagrangian filter. Someone should take a closer look to see if this
filter in particular is making unnecessarily large worklet/kernel. (In
particular, why does the Lagrangian filter have a larger kernel than the
streamline and stream surface filters?)

If this occurance happens more often, we might need to add some ways to
configure it in the build.
2021-02-16 13:25:11 -07:00
Kenneth Moreland
30ca88bca2 Merge topic 'fix-findmpi'
78e7645fc cmake: Fix FindMPI getting consumed by newer CMake versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2407
2021-02-16 15:07:45 -05:00
Kenneth Moreland
aec9890e96 Remove check for CellLocator.h in SourceInInstall test
The CellLocator.h header file is deprecated and not installed if virtual
methods are turned off. So just avoid checking it.
2021-02-16 13:04:08 -07:00
Chuck Atkins
78e7645fcb cmake: Fix FindMPI getting consumed by newer CMake versions 2021-02-16 10:34:48 -05: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
e61c54f873 Add CellLocatorChooser
`CellLocatorChooser` allows you to select a cell locator at compile
time. Unlike `CellLocatorGeneral`, you have to deduce what cell set
types you might have, but you don't have to have a large switch
statement in the middle of your worklet.
2021-02-15 12:39:11 -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
47429a3164 Fix export issues with CellLocatorBase 2021-02-15 12:39:11 -07:00
Kenneth Moreland
8922f600e1 Use GNU attributes for deprecated
There appears to be a bug in GCC where if you mixed C++ attributes like
`[[deprecated]]` with GNU attributes like `__attribute__(())`, you will
get a compile error. This can be a problem when using attributes to both
set the export (i.e. visibility) of an item and deprecating the same
item.

This problem has been encountered before. Commit
34b0bba84207a89e8fddfe62e7a1ff30b1b53a18 fixed the problem by using
`[[gnu::visibility()]]` instead of `__attribute__()` in the export
macros. This works fine for export macros defined by VTK-m headers such
as `VTKM_ALWAYS_EXPORT`. Unfortunately, we have little control over the
export macros that CMake automatically creates. Rather than rewrite the
CMake export code, we go the other way and use `__attribute__()` for all
exports _and_ the depreciated attribute.
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
Kenneth Moreland
34b6bea013 Merge topic 'device-free-execwholearray'
0797359c5 Make ExecutionWholeArray objects not depend on device type
0bee74438 Support DeviceAdapterId in deprecated ArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nick Thompson <nathompson7@protonmail.com>
Merge-request: !2405
2021-02-12 20:00:11 -05:00
Kenneth Moreland
d8dc8f98d8 Merge topic 'ah-xgc-updates'
40185ee44 attempting to fix various build and linking errors
5336fea02 add XGC storage tags to DefaultTypesVTK
a5689ec84 testing array range for xgc coords
e73a0bccb update ArrayRangeCompute to handle ArrayHandleXGC*
46155daaa removing ArrayHandleExtrude*
a9711bffb update XGC ArrayHandles to new buffer style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2359
2021-02-11 13:05:48 -05:00
Caitlin Ross
40185ee440 attempting to fix various build and linking errors 2021-02-10 15:20:35 -05:00
Caitlin Ross
5336fea028 add XGC storage tags to DefaultTypesVTK 2021-02-10 15:20:35 -05:00
Caitlin Ross
a5689ec84d testing array range for xgc coords 2021-02-10 15:20:35 -05:00
Caitlin Ross
e73a0bccb8 update ArrayRangeCompute to handle ArrayHandleXGC* 2021-02-10 15:20:35 -05:00
Caitlin Ross
46155daaa2 removing ArrayHandleExtrude* 2021-02-10 15:20:35 -05:00
Caitlin Ross
a9711bffb7 update XGC ArrayHandles to new buffer style 2021-02-10 10:18:53 -05:00
Kenneth Moreland
0797359c57 Make ExecutionWholeArray objects not depend on device type
With recent changes to `Arrayhandle`, the type for the associated array
portal is now the same across all devices. This means that almost all
exec objects no longer need to be specialized on the device types. Thus,
clean up the whole array exec objects to no longer need to be templated
on device.
2021-02-09 19:16:51 -07:00
Kenneth Moreland
0bee744384 Support DeviceAdapterId in deprecated ArrayHandle
The original `ArrayHandle` design had the `PrepareFor*` methods
templated on the device adapter tag. This is no longer necessary (at
least for any existing `ArrayHandle`), so support calling `PrepareFor*`
with a `DeviceAdapterId` that is resolved at runtime.
2021-02-09 19:16:51 -07:00
Kenneth Moreland
6ddb311cd3 Merge topic 'device-free-locators'
c62e38bab Make locator exec objects not depend on device type

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nick Thompson <nathompson7@protonmail.com>
Merge-request: !2404
2021-02-09 21:16:17 -05:00
Kenneth Moreland
c62e38bab6 Make locator exec objects not depend on device type
With recent changes to `ArrayHandle`, the type for the associated array
portal is now the same across all devices. This means that almost all
exec objects no longer need to be specialized on the device types. Thus,
clean up the locator exec objects to no longer need to be templated on
device.
2021-02-09 17:20:57 -07:00
Kenneth Moreland
6232670049 Merge topic 'deprecate-executiontypes'
05fc1747e Make deprecated tags more descriptive
b92566cdd Convert `std::endl` to `'\n'`
b8b958a98 Get rid of CellSetStructured.hxx
f4bc3002b Fix compiler error with `constexpr` method
4d8f05bae Update CellSetExtrude to not specify exec types by device
3962e73b0 Fix issues with class specialization
c55d15f39 Deprecate ArrayHandle::ExecutionTypes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2401
2021-02-09 13:33:08 -05: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
b92566cdd1 Convert std::endl to '\n'
Using `std::endl` has a side effect of flushing the stream, which can
have unintended performance consequences.
2021-02-09 08:53:46 -07:00
Nick Thompson
f4a3538a6f Merge topic 'fix_matrix'
e4241aa53 Make matrix unit tests less verbose.
bba3d29c2 Remove UB from Matrix.h, and replace by quiet NaNs.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2402
2021-02-08 21:01:18 -05:00
Kenneth Moreland
b8b958a98b Get rid of CellSetStructured.hxx
One of the MSVC builds was giving template resolution problems for one
of the methods declared non-inline for no discernable reason. It sounds
like a compiler bug. Rather than try to  work around the issue, just
move the declaration inline.

In fact, all the methods are really small (only 1 or 2 lines). Just
delete the .hxx file and simplify things.
2021-02-08 18:43:31 -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
3962e73b06 Fix issues with class specialization
C++ has some weird rules about specializing subclasses.
2021-02-08 14:31:45 -07:00
Nick Thompson
e4241aa530 Make matrix unit tests less verbose. 2021-02-08 16:18:13 -05:00
Nick Thompson
bba3d29c2a Remove UB from Matrix.h, and replace by quiet NaNs. 2021-02-08 15:40:23 -05: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
Vicente Bolea
5cc292080d Merge topic 'refactor-use-cpp14'
02f97325c Merge branch 'upstream-lcl' into refactor-use-cpp14
282bf6b8c lcl 2021-02-08 (6fe1a2d8)
bbe36d8c3 cmake: set c++14 as minimum c++ rev

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2331
2021-02-08 13:15:26 -05:00
Vicente Adolfo Bolea Sanchez
02f97325c4 Merge branch 'upstream-lcl' into refactor-use-cpp14
# By Lightweight Cell Library Upstream
* upstream-lcl:
  lcl 2021-02-08 (6fe1a2d8)
2021-02-08 17:13:10 +01:00
Lightweight Cell Library Upstream
282bf6b8c7 lcl 2021-02-08 (6fe1a2d8)
Code extracted from:

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

at commit 6fe1a2d8983bcd00fe59ee6049a32d24fdc797af (master).
2021-02-08 17:13:10 +01:00
Vicente Adolfo Bolea Sanchez
bbe36d8c33 cmake: set c++14 as minimum c++ rev
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-02-08 17:13:05 +01:00
Dave Pugmire
037bd24e7f Merge topic 'parallel_pathline2'
fcd0986c5 Merge branch 'parallel_pathline2' of https://gitlab.kitware.com/dpugmire/vtk-m into parallel_pathline2
ed7358ed2 Kick the dashboard.
6367e4680 Bug fix when pathline rank has 0 ds.
6608a38ee Debugging the dashboard
b4768f06b Bug fix. Must copy particles.
4773b51ca Debug test fail...
982b693ab Forgot to add hxx file.
aa713b565 Support for dist-memory pathlines.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2399
2021-02-05 21:56:41 -05:00