Commit Graph

8137 Commits

Author SHA1 Message Date
Kenneth Moreland
e9ba5bf8c7 Add math section to users guide 2024-02-20 11:03:04 +09:00
Kenneth Moreland
af28ec2766 Merge topic 'hints'
c44f68649 Add hints to device adapter scheduler

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !3189
2024-02-17 07:47:19 -05:00
Kenneth Moreland
eba02710de Merge topic 'deprecate-filter-field'
a17ebdf52 Deprecated `vtkm::filter::FilterField`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3195
2024-02-14 19:05:25 -05:00
Kenneth Moreland
46508487a0 Fix doxygen warnings with worklet base classes
Some versions of doxygen have issues with documenting `typedef`s (or the
equivalent `using`). This was causing warnings with doxygen and failing
to create some of the documentation. This fixes the problem by moving the
documentation to the classes things are defined to.
2024-02-12 15:37:40 +09:00
Kenneth Moreland
a17ebdf52a Deprecated vtkm::filter::FilterField
The original design of the filter base class required several specialized
base classes to control what information was pulled from the input
`DataSet` and provided to the derived class. Since the filter base class was
redesigned, the derived classes all get a `DataSet` and pull their own
information from it. Thus, most specialized filter base classes became
unnecessary and removed.

The one substantial exception was the `FilterField`. This filter base class
managed input and output arrays. This was kept separate from the base
`Filter` because not all filters need the ability to select this
information.

That said, this separation has not been particularly helpful. There are
several other features of `Filter` that does not apply to all subclasses.
Furthermore, there are several derived filters that are using `FilterField`
merely to pick a single part, like selecting a coordinate system, and
ignoring the rest of the abilities.

Thus, it makes more sense to deprecate `FilterField` and have these classes
inherit directly from `Filter`.
2024-02-12 08:13:19 +09:00
Kenneth Moreland
c44f686496 Add hints to device adapter scheduler
The `DeviceAdapter` provides an abstract interface to the accelerator
devices worklets and other algorithms run on. As such, the programmer has
less control about how the device launches each worklet. Each device
adapter has its own configuration parameters and other ways to attempt to
optimize how things are run, but these are always a universal set of
options that are applied to everything run on the device. There is no way
to specify launch parameters for a particular worklet.

To provide this information, VTK-m now supports `Hint`s to the device
adapter. The `DeviceAdapterAlgorithm::Schedule` method takes a templated
argument that is of the type `HintList`. This object contains a template
list of `Hint` types that provide suggestions on how to launch the parallel
execution. The device adapter will pick out hints that pertain to it and
adjust its launching accordingly.

These are called hints rather than, say, directives, because they don't
force the device adapter to do anything. The device adapter is free to
ignore any (and all) hints. The point is that the device adapter can take
into account the information to try to optimize for itself.

A provided hint can be tied to specific device adapters. In this way, an
worklet can further optimize itself. If multiple hints match a device
adapter, the last one in the list will be selected.

The `Worklet` base now has an internal type named `Hints` that points to a
`HintList` that is applied when the worklet is scheduled. Derived worklet
classes can provide hints by simply defining their own `Hints` type.
2024-02-09 10:42:23 -05:00
Kenneth Moreland
fa2eb79b07 Merge topic 'guide-worklet-types'
3b1bfa0cd Add reference documentation for Worklet types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3184
2024-02-08 16:05:26 -05:00
Jefferson Amstutz
9d1c86c3c3 Merge topic 'anari_sdk_upgrade'
f4a781769 update baseline images
ea6136ede better strategy for collecting incoming ANARI-SDK namespaces
383ec8399 update image name
24da5da20 update minimum ANARI-SDK version required

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3180
2024-02-08 14:55:46 -05:00
Jefferson Amstutz
ea6136ede6 better strategy for collecting incoming ANARI-SDK namespaces 2024-02-08 11:04:15 -06:00
Jefferson Amstutz
24da5da202 update minimum ANARI-SDK version required 2024-02-08 11:04:15 -06:00
Kenneth Moreland
b4ba836890 Reduce doxygen warnings 2024-02-08 10:57:11 -05:00
Kenneth Moreland
9c42db5c71 Fix sphinx/breathe warning about function reference
The breathe parser was having trouble with using `{}` inside of a
declspec for the return value. Replace this with parenthesis, which
cannot be confused with the openning of the function.
2024-02-08 10:39:46 -05:00
Kenneth Moreland
723c9ed2f0 Support Fill for ArrayHandleStride
Previously, if you called `Fill` on an `ArrayHandleStride`, you would get
an exception that said the feature was not supported. It turns out that
filling values is very useful in situations where, for example, you need to
initialize an array when processing an unknown type (and thus dealing with
extracted components).

This implementation of `Fill` first attempts to call `Fill` on the
contained array. This only works if the stride is set to 1. If this does
not work, then the code leverages the precompiled `ArrayCopy`. It does this
by first creating a new `ArrayHandleStride` containing the fill value and a
modulo of 1 so that value is constantly repeated. It then reconstructs an
`ArrayHandleStride` for itself with a modified size and offset to match the
start and end indices.

Referencing the `ArrayCopy` was tricky because it kept creating circular
dependencies among `ArrayHandleStride`, `ArrayExtractComponent`, and
`UnknownArrayHandle`. These dependencies were broken by having
`ArrayHandleStride` directly use the internal `ArrayCopyUnknown` function
and to use a forward declaration of `UnknownArrayHandle` rather than
including its header.
2024-02-02 13:50:21 -05:00
Kenneth Moreland
3b1bfa0cdd Add reference documentation for Worklet types 2024-01-29 12:26:08 -05:00
Kenneth Moreland
d77c5812c3 Deprecate the GetCounts() method in Keys objects
The `vtkm::worklet::Keys` object held a `SortedValuesMap` array, an
`Offsets` array, a `Counts` array, and (optionally) a `UniqueKeys` array.
Of these, the `Counts` array is redundant because the counts are trivially
computed by subtracting adjacent entries in the offsets array. This pattern
shows up a lot in VTK-m, and most places we have moved to removing the
counts and just using the offsets.

This change removes the `Count` array from the `Keys` object. Where the
count is needed internally, adjacent offsets are subtracted. The deprecated
`GetCounts` method is implemented by copying values into a new array.
2024-01-25 16:13:54 -05:00
Kenneth Moreland
8ac9f6a5c0 Deprecate boundary condition in neighborhood worklets
This feature was introduced but is never used anywhere. It is up to the
worklet subclass to determine what to do with the boundaries with the
`BoundaryState` object.

In the future we may have a neighborhood worklet of compile-fixed sized
for better memory access efficiency. If that is the case, we can
reintroduce this idea. We can decide on the right implementation if that
design ever comes to pass.
2024-01-19 08:43:50 -05:00
Roxana Bujack
982c5bbb93 Merge topic 'partitionedRendering'
e243e51c1 revert superfluous corners distance
53ab4d41e next round of changes
d9875a41d fix typos
60fdcbaf7 add this->
4fabc168e add this->
7c61aaca0 add this->
cec1091b0 remove compiler warning
ac152d25d ensure presen ghost array if extractor is called from other than vtkm actor
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3149
2024-01-05 11:37:23 -05:00
Roxana Bujack
e243e51c1b revert superfluous corners distance 2024-01-04 14:13:01 -07:00
Kenneth Moreland
b1b6cb65c0 Add documentation of logging 2024-01-04 15:25:07 -05:00
Roxana Bujack
53ab4d41e4 next round of changes 2024-01-03 16:23:16 -07:00
Kenneth Moreland
d9875a41dc fix typos 2024-01-03 17:43:46 -05:00
Kenneth Moreland
60fdcbaf70 add this-> 2024-01-03 17:43:26 -05:00
Kenneth Moreland
4fabc168ef add this-> 2024-01-03 17:42:59 -05:00
Kenneth Moreland
7c61aaca01 add this-> 2024-01-03 17:42:38 -05:00
Roxana Bujack
cec1091b0f remove compiler warning 2024-01-02 14:21:30 -07:00
Roxana Bujack
ac152d25d9 ensure presen ghost array if extractor is called from other than vtkm actor 2024-01-02 12:04:41 -07:00
Kenneth Moreland
974e964920 Merge topic 'contour-int-isovalue'
8fc341e71 Allow floating-point isovalues for contours of integer fields

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3169
2024-01-02 11:28:56 -05:00
Roxana Bujack
753df58857 use cellset and not field as basis for ghost array 2023-12-21 08:49:57 -07:00
Roxana Bujack
c78cb8069c allow wireframer to have ghost array 2023-12-20 14:32:55 -07:00
Roxana Bujack
b90c062e35 remove ghosted triangles in parallel 2023-12-20 12:55:19 -07:00
Roxana Bujack
6666fd4ca2 combine changes from this branch and master 2023-12-19 13:18:06 -05:00
Kenneth Moreland
f1e3bed044 Add advanced types chapter to user's guide 2023-12-18 14:22:40 -07:00
Kenneth Moreland
05f9da459c Merge topic 'type-order'
23fbedf54 Order the VTK scalar types to favor used types
053237e90 Favor base types used by VTK-m when making new basic array

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !3171
2023-12-18 13:57:31 -05:00
Kenneth Moreland
23fbedf54d Order the VTK scalar types to favor used types
Reorder the `VTKScalarTypes` to put the repeated types at the bottom.
This will avoid using types like `long` that are essentially the same as
other types (e.g. `long long`) but will still be considered different.
This causes problems when checking against some VTK types (such as
`vtkIdType`).
2023-12-17 22:56:09 -07:00
Kenneth Moreland
053237e900 Favor base types used by VTK-m when making new basic array
When calling `NewInstanceBasic` on an `UnknownArrayHandle`, all C base
types will be tried. In some cases, multiple type will match the same
array. When this happens, favor types used by VTK-m (e.g. `long long`
over `long`).
2023-12-17 22:49:54 -07:00
Kenneth Moreland
8fc341e716 Allow floating-point isovalues for contours of integer fields
The flying edges version of the contouring filter converted the isovalues
provided into the same type as the field. This is fine for a floating point
field, but for an integer field the isovalue was truncated to the nearest
integer.

This is problematic because it is common to provide a fractional isovalue
(usually N + 0.5) for integer fields to avoid degenerate cases of the
contour intersecting vertices. It also means the behavior changes between
an integer type that is directly supported (like a `signed char`) or an
integer type that is not directly supported and converted to a floating
point field (like potentially a `char`).

This change updates the worklets to allow the isovalue to have a different
type than the field and to always use a floating point type for the
isovalue.
2023-12-15 16:26:17 -07:00
Vicente Adolfo Bolea Sanchez
6664fd1e5a cmake: VTKm_ENABLE_KOKKOS_THRUST disabled by default 2023-12-15 13:07:20 -05:00
Kenneth Moreland
82c1d27e9e Merge topic 'guide-developing'
cba1068be Update the developing algorithms section of the user's guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3156
2023-12-13 18:18:32 -05:00
Jefferson Amstutz
2de1a462a0 support more volume types via array element conversion + ensure scalar data 2023-12-11 11:16:12 -06:00
Kenneth Moreland
cba1068bec Update the developing algorithms section of the user's guide 2023-12-08 08:50:18 -05:00
Mark Bolstad
4676d07f09 Fix error under CUDA with private class declarations
nvcc doesn't like the couple of places that we have Impl classes hiding behind a
private declaration. So for VTKM_CUDA only, ifdef the private declaration out
2023-12-05 10:03:40 -07:00
Ben Boeckel
2134955065 Merge topic 'loguru-install-interface'
14a276401 loguru: do not declare an install interface

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !3163
2023-12-04 12:44:14 -05:00
Ben Boeckel
14a276401b loguru: do not declare an install interface
The headers are not installed, so there's nothing to refer to.
2023-12-04 11:34:19 -05:00
Ben Boeckel
a5994a8129 Merge topic 'clang-tidy-fixes'
1541cfa8a clang-tidy: fix `bugprone-incorrect-roundings` lints
0ce73eb68 clang-tidy: fix `readability-avoid-const-params-in-decls` lints
e07fb9fec clang-tidy: fix `performance-move-const-arg` lints
5aad5ca37 clang-tidy: fix `modernize-redundant-void-arg` lints
6c00a8755 clang-tidy: fix `readability-redundant-access-specifiers` lints
219f44c25 clang-tidy: fix `readability-const-return-type` lints
b99920d47 Oscillator: use a type of the right size for `oIdx`
13e935c35 clang-tidy: fix `readability-redundant-member-init` lints
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !3053
2023-12-04 10:42:50 -05:00
Kenneth Moreland
5d0bf1d866 Merge topic 'document-merge-data-sets'
45ad2fb50 Add documentation of MergeDataSets filter to user's guide

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3161
2023-12-01 19:17:29 -05:00
Ben Boeckel
1541cfa8a6 clang-tidy: fix bugprone-incorrect-roundings lints
Adding `0.5` is not correct in all cases. Namely, adding `0.5` will
cause the value immediately before it to be rounded to `1` due to the
"round to nearest even" rule. Trust the standard library to get this
right.
2023-12-01 07:01:11 -05:00
Ben Boeckel
0ce73eb680 clang-tidy: fix readability-avoid-const-params-in-decls lints 2023-12-01 07:01:11 -05:00
Ben Boeckel
e07fb9fec3 clang-tidy: fix performance-move-const-arg lints 2023-12-01 07:01:11 -05:00
Ben Boeckel
5aad5ca37e clang-tidy: fix modernize-redundant-void-arg lints 2023-12-01 07:01:11 -05:00
Ben Boeckel
6c00a87554 clang-tidy: fix readability-redundant-access-specifiers lints 2023-12-01 07:01:11 -05:00