Commit Graph

11394 Commits

Author SHA1 Message Date
Kenneth Moreland
dde6888b1c WIP: Fix issue with cleanup of CUDA arrays 2024-05-14 11:00:46 -06:00
Kenneth Moreland
0723ab473e Use ArrayHandles for flying edges lookup tables
The previous implementation declared a static array and looked up
values in functions. This leaves the compiler to manage to data.
That can have potential advantages such as putting data in
faster constant data. But it could also cause problems if the
compiler has problems managing all the data.

The switch to ArrayHandles simplifies the implementation for
the compiler by managing these static arrays on the host and
using the existing array management to make sure everything
is correct.
2024-05-14 10:25:25 -06:00
Kenneth Moreland
5677811468 Improve constexpr behavior of Vec classes
The implementation of `Vec` made it difficult to use within a `constexpr`
function. For example, the following would not compile.

``` cpp
constexpr vtkm::UInt8 OctFlip(vtkm::UInt8 value)
{
  vtkm::Vec<vtkm::UInt8, 8> flips = { 0, 6, 2, 6, 1, 5, 3, 7 };
  return flips[value];
}
```

The problem was that `flips` could not be initialized in a `constexpr`
function because the constructer was not `constexpr`.

This change fixes this problem by _removing_ the constructor that takes a
`std::initializer_list`. The problem with `std::initializer_list` is that
it cannot be used to directly initialize an array and the loop to do the
initialization cannot be used in a `constexpr`.

With the removal of this constructor, construction with a braced list
should go to the constructor that takes a variadic number of parameters.

Note that it is possible that some initialization of `vtkm::Vec` could
break. You can no longer construct an `std::initializer_list` and pass it
to a `vtkm::Vec` constructor. This seems like a less likely case and can be
gotten around by just copying the data yourself. It is also possible that
putting a braced list in parentheses will stop working. This can be fixed
by just deleting the parentheses.
2024-05-14 06:47:03 -06:00
Kenneth Moreland
b04e2ff3b8 Merge topic 'benchmark-deprecation-warning'
c72256e55 Fix deprecation warning from Google benchmark

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3220
2024-05-13 13:51:49 -04:00
Jefferson Amstutz
78033fde56 Merge topic 'anari_unstructured_volumes'
232d9dde9 fix ANARIMapperVolume usage edge cases (empty actor is valid)
ea3020383 minor cleanups
86e6e6e65 support unstructured cell (point-centered only)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3210
2024-05-13 10:56:55 -04:00
Kenneth Moreland
c72256e555 Fix deprecation warning from Google benchmark
The warning is that asking not to optimize a const variable does not
always work. Fix by simply not declaring the variable as const.
2024-05-13 08:20:44 -06:00
Jefferson Amstutz
232d9dde9c fix ANARIMapperVolume usage edge cases (empty actor is valid) 2024-05-13 08:40:49 -05:00
Jefferson Amstutz
ea30203836 minor cleanups 2024-05-13 08:40:49 -05:00
Qi Wu
86e6e6e65b support unstructured cell (point-centered only) 2024-05-13 08:40:49 -05:00
Gunther Weber
9c8d89c70b Merge topic 'distributed-contour-tree-fixes'
124c58eb4 Minor fixes for distributed contour tree example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3217
2024-05-10 20:30:14 -04:00
Gunther H. Weber
124c58eb48 Minor fixes for distributed contour tree example 2024-05-10 15:09:03 -07:00
Kenneth Moreland
255d977bc3 Merge branch 'release-2.1' 2024-05-07 13:08:00 -04:00
Kenneth Moreland
bf0390b8e1 Merge topic 'intel-finites'
b93ee30ab Enable non-finite values with Intel compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !3213
2024-05-07 13:08:00 -04:00
Kenneth Moreland
d26ac66dcb Merge topic 'intel-finites' into release-2.1
b93ee30ab Enable non-finite values with Intel compiler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !3213
2024-05-07 13:08:00 -04:00
Kenneth Moreland
e70f0cb61d Merge branch 'release-2.1' 2024-05-03 13:06:32 -04:00
Kenneth Moreland
72c17927d3 Merge topic 'extract-geometry-permutation'
49518e505 Fix bug with ExtractGeometry filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3215
2024-05-03 13:06:32 -04:00
Kenneth Moreland
5634a09b95 Merge topic 'extract-geometry-permutation' into release-2.1
49518e505 Fix bug with ExtractGeometry filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3215
2024-05-03 13:06:31 -04:00
Kenneth Moreland
49518e5054 Fix bug with ExtractGeometry filter
The `ExtractGeometry` filter was outputing datasets containing
`CellSetPermutation` as the representation for the cells. Although this is
technically correct and a very fast implementation, it is essentially
useless. The problem is that any downstream processing will have to know
that the data has a `CellSetPermutation`. None do (because the permutation
can be on any other cell set type, which creates an explosion of possible
cell types).

Like was done with `Threshold` a while ago, this problem is fixed by deep
copying the result into a `CellSetExplicit`. This behavior is consistent
with VTK.
2024-05-03 09:22:56 -04:00
Kenneth Moreland
cd8afa9f7f Merge topic 'fix-openmp-exported-target'
e40cdbc0f Ensure OpenMP is imported
88b9a2f42 Update OpenMP code for consistency
ba75296f6 Use target `OpenMP::OpenMP_CXX` for exported targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3212
2024-04-25 09:52:39 -04:00
Kenneth Moreland
b93ee30ab5 Enable non-finite values with Intel compiler
The Intel compiler by default turns on an optimization that assumes that
all floating point values are finite. This breaks any ligitimate uses of
non-finite values including checking values with functions like `isnan`
and `isinf`. Turn off this feature for the intel compiler.
2024-04-25 09:38:15 -04:00
Yohann Vautrin
e40cdbc0f9 Ensure OpenMP is imported 2024-04-23 18:03:24 -04:00
Yohann Vautrin
88b9a2f42f Update OpenMP code for consistency
Calls to `set_property` are replaced by equivalents calls for
readability. Order of operations is changed for consistency with the
code for TBB.
2024-04-23 16:01:50 -04:00
Yohann Vautrin
ba75296f65 Use target OpenMP::OpenMP_CXX for exported targets
Using `${OpenMP_CXX_LIBRARIES}` results in paths to certain libraries
being hard-coded in VTKmTargets.cmake, which can lead to issues in some
cases (e.g.: when VTK is built by the CI system for MSYS2).
2024-04-23 16:01:10 -04:00
Dave Pugmire
6e8308f2bb Merge topic 'uniformbin_locator_bincheck'
b6c69774f Add comment addressing the missing else
7fb1821b7 Fix issue (findBinIdx won't fail if point outside dataset).
699646675 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into uniformbin_locator_bincheck
c06173274 Add helper methods. Check the binIdx FIRST.
9fb58dcf1 Optimize cellID bin check.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3130
2024-04-01 15:41:11 -04:00
Dave Pugmire
b6c69774fc Add comment addressing the missing else 2024-04-01 14:54:57 -04:00
Dave Pugmire
7fb1821b7c Fix issue (findBinIdx won't fail if point outside dataset). 2024-03-28 15:31:34 -04:00
Dave Pugmire
6996466752 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into uniformbin_locator_bincheck 2024-03-28 12:45:20 -04:00
Spiros Tsalikis
bdb79bc51d Merge topic 'atomic-order'
fc3845ec8 AtomicArrayExecutionObject: Allow order of atomic operations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3208
2024-03-25 09:17:32 -04:00
Spiros Tsalikis
fc3845ec89 AtomicArrayExecutionObject: Allow order of atomic operations 2024-03-22 15:02:55 -04:00
Kenneth Moreland
427c8135c0 Merge topic 'guide-cells'
282aa8295 Add guide chapter on working with cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3206
2024-03-14 13:11:46 -04:00
Jefferson Amstutz
930ef173e1 Merge topic 'anari_volume_fix'
b7ef24678 fix assumption that ANARIMapperVolume only consumed point data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3207
2024-03-13 17:13:43 -04:00
Jefferson Amstutz
b7ef246789 fix assumption that ANARIMapperVolume only consumed point data 2024-03-13 13:41:05 -05:00
Kenneth Moreland
282aa82957 Add guide chapter on working with cells 2024-03-13 09:18:33 -04:00
Kenneth Moreland
35f5abcc17 Merge topic 'mesh-info-constructors'
28683930e Updated constructors for mesh info classes to conform with other filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3122
2024-03-08 07:02:04 -05:00
Kenneth Moreland
28683930e3 Updated constructors for mesh info classes to conform with other filters
The `CellMeasures` and `MeshQuality` filters had constructors that took the
metric that the filter should generate. However, this is different than the
iterface of the rest of the filters. To make the interface more consistent,
these filters now have a default (no argument) constructor, and the metric
to compute is selected via a method. This makes it more clear what is being
done.

In addition, the documentation for these two classes is updated.
2024-03-07 20:47:09 -05:00
Jefferson Amstutz
3b598ff884 Merge topic 'anari_attribute_names'
14deacbdd add attribute names via USD extension

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3205
2024-03-05 09:00:37 -05:00
Jefferson Amstutz
14deacbdd8 add attribute names via USD extension 2024-03-04 14:33:41 -06:00
Jefferson Amstutz
c90fb4bc22 Merge topic 'anari_volume_parameter_fix'
149e7f9e1 set spatial field parameter on volumes with the correct name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3204
2024-03-04 11:43:58 -05:00
Kenneth Moreland
e326515452 Merge topic 'guide-filters'
2fe05097e Add continued filter implementation chapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3200
2024-02-29 06:55:56 -05:00
Kenneth Moreland
2fe05097eb Add continued filter implementation chapter 2024-02-28 12:51:07 -05:00
Jefferson Amstutz
149e7f9e1b set spatial field parameter on volumes with the correct name 2024-02-28 10:31:31 -06:00
Zhe Wang
65a3118d0a Merge topic 'long_cuda_compiling_issue'
59c545c15 add test and fix cuda long compiling issue

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhi.yenpure@kitware.com>
Merge-request: !3188
2024-02-23 11:35:27 -05:00
Kenneth Moreland
7cc490d94a Merge topic 'fix-filter-deprecation'
8ec6fc256 Fix deprecation warning in example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3203
2024-02-22 06:46:48 -05:00
Kenneth Moreland
d9b095a0b3 Merge topic 'nested-script-strings'
e1557f080 Fix issue with nested script strings in CI reproduce script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3202
2024-02-22 06:46:21 -05:00
Kenneth Moreland
99b8b06a2f Merge topic 'fix-math-doxygen'
108176774 Fix doxygen warnings for math functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3201
2024-02-22 06:45:55 -05:00
Kenneth Moreland
8ec6fc2562 Fix deprecation warning in example
One of the examples still had a deprecation warning from !3195.
2024-02-21 17:15:32 -05:00
Kenneth Moreland
e1557f080b Fix issue with nested script strings in CI reproduce script
The `reproduce_ci_env.py` script reads in the yaml for the GitLab
runners and replicates the runs using Docker. Through a quirk of the
implemenation of MR !3191, some of the scripts, which are expected to be
a list of command strings, get defined as a list of lists. This is fixed
by flattening this list of commands.
2024-02-21 16:43:59 -05:00
Kenneth Moreland
108176774f Fix doxygen warnings for math functions
Doxygen was having trouble with `@copydoc` when copying documentation of
templated functions. The doxygen comments in `Math.h` is restructured to
not need `@copydoc`, and the documentation is generated correctly.
2024-02-21 16:31:36 -05:00
Kenneth Moreland
d8a7a9326c Merge topic 'guide-math'
e9ba5bf8c Add math section to users guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3198
2024-02-20 15:43:25 -05:00
Kenneth Moreland
e9ba5bf8c7 Add math section to users guide 2024-02-20 11:03:04 +09:00