VTK-m merge requestshttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests2023-04-03T15:30:41-04:00https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2980Update probe filter to interpolate any field type2023-04-03T15:30:41-04:00Kenneth MorelandUpdate probe filter to interpolate any field typePreviously, the probe filter only worked on certain `Vec` sizes and
converted many types to floating point.
This change uses the extract component feature to pull data from any
array at its natural component type.
The bad part of this ...Previously, the probe filter only worked on certain `Vec` sizes and
converted many types to floating point.
This change uses the extract component feature to pull data from any
array at its natural component type.
The bad part of this change is that it has to call the worklet
separately for each component in the field. That adds overhead and
probably lowers the cache efficiency. It was implemented this way
because the cell interpolation function does not work with the
recombined vecs returned from extract array.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2979Change CellAverage and PointAverage to work on fields of any type2023-04-03T15:30:41-04:00Kenneth MorelandChange CellAverage and PointAverage to work on fields of any typeThe previous versions of these filters used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change u...The previous versions of these filters used a float fallback
to handle most array types. The problem with this approach other than
converting field types perhaps unexpectantly is that it does not work
with every `Vec` size. This change uses the extract by component feature
of `UnknownArrayHandle` to handle every array type.
To implement this change the `CellAverage` worklet had to be changed to
handle recombined vecs. This change resulted in a feature degridation
where it can no longer be compiled for inputs of incompatible `Vec`
sizes. This feature dates back to when worklets like this were exposed
in the interface. This worklet class is now hidden away from the exposed
interface, so this degredation should not affect end users. There are
some unit tests that use this worklet to test other features, and these
had to be updated.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2978Handle more field types in density estimation filters2023-04-03T15:30:41-04:00Kenneth MorelandHandle more field types in density estimation filtershttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2977Map fields of any type in MIRFilter2023-04-03T15:30:41-04:00Kenneth MorelandMap fields of any type in MIRFilterUse the ability to extract array components to handle any array in the
map field.Use the ability to extract array components to handle any array in the
map field.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2976Clean up point mapping in CleanGrid2023-04-03T15:30:41-04:00Kenneth MorelandClean up point mapping in CleanGridUse the `MapFieldPermutation` function when mapping point coordinates
for points that are removed. (This function was already being used for
the rest of the fields.) Also remove some unneeded code in the
`CleanGrid` worklets.Use the `MapFieldPermutation` function when mapping point coordinates
for points that are removed. (This function was already being used for
the rest of the fields.) Also remove some unneeded code in the
`CleanGrid` worklets.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2975initial implementation of ANARI interop support2023-09-27T10:24:00-04:00Jefferson Amstutzjamstutz@nvidia.cominitial implementation of ANARI interop supporthttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2974Add abort execution feature2023-04-03T15:30:45-04:00Sujin PhilipAdd abort execution featureInitial changes to add support for aborting execution.
backport: releaseInitial changes to add support for aborting execution.
backport: releaseSujin PhilipSujin Philiphttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2973Update contour filter's field map to work on any field type2023-04-03T15:30:41-04:00Kenneth MorelandUpdate contour filter's field map to work on any field typeUse the extract component functionality to get data from any type of
array. This prevents converting fields to `vtkm::DefaultFloat` and
supports any size `Vec` in the component.Use the extract component functionality to get data from any type of
array. This prevents converting fields to `vtkm::DefaultFloat` and
supports any size `Vec` in the component.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2971Refactor RuntimeDeviceTracker2023-04-03T15:30:45-04:00Sujin PhilipRefactor RuntimeDeviceTrackerSimplifies the code by using modern C++ features
backport: releaseSimplifies the code by using modern C++ features
backport: releaseSujin PhilipSujin Philiphttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2970Enable floating point exceptions on apple2023-04-03T15:30:44-04:00Kenneth MorelandEnable floating point exceptions on appleClang for apple does not support `fpenableexcept`, so make a special way
to turn them on to help developers debug code. This code is based on the
suggestions at:
https://stackoverflow.com/questions/37819235/how-do-you- enable-floating-p...Clang for apple does not support `fpenableexcept`, so make a special way
to turn them on to help developers debug code. This code is based on the
suggestions at:
https://stackoverflow.com/questions/37819235/how-do-you- enable-floating-point-exceptions-for-clang-in-os-x
https://stackoverflow.com/questions/71821666/trapping-floating-point-exceptions-and-signal-handling-on-apple-silicon
This code is actually disabled because it does not work on all known
platforms (most notably one of the dashboard machines). However, I
would like to keep the code there to assist debugging.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2969Update clip filter's field map to work on any field type2023-04-03T15:30:42-04:00Kenneth MorelandUpdate clip filter's field map to work on any field typeThe previous implementation of the map field in the clip filters
(`ClipWithField` and `ClipWithImplicitFunction`) checked for common field
types and interpolated those. If the field value type did not match, it
would either convert the f...The previous implementation of the map field in the clip filters
(`ClipWithField` and `ClipWithImplicitFunction`) checked for common field
types and interpolated those. If the field value type did not match, it
would either convert the field to floats (which is at odds with what VTK
does) or fail outright if the `Vec` length is not supported.
The map field function for clip has been changed to support all possible
types. It does this by using the extract component functionality to get
data from any type of array.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2968Fix performanceTest remote fetching2023-04-03T15:30:44-04:00Vicente Boleavicente.bolea@kitware.comFix performanceTest remote fetchingIt has been reported that the PerformanceTest fails to fetch the latest master commit when the CI runs from Fork (which can be the case for a VTK-m non-dev submitting a MR in this repo).
This MR fixes this by always fetching from the m...It has been reported that the PerformanceTest fails to fetch the latest master commit when the CI runs from Fork (which can be the case for a VTK-m non-dev submitting a MR in this repo).
This MR fixes this by always fetching from the main repo, represented as a remote named upstream.
This MR also ensures that the Fetch step of the Performance test is ran just once in the ctest invocation, as opposed to the current behavior that runs it before every performanceTest instance. This will also ease issues with the Kitware Gitlab erroring when doing the same git clone repeatedly.Vicente Boleavicente.bolea@kitware.comVicente Boleavicente.bolea@kitware.comhttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2967Use Kokkos 3.7.1 in the CI builds2023-04-03T15:30:44-04:00Kenneth MorelandUse Kokkos 3.7.1 in the CI buildsThis was recommended to us by the Kokkos team.This was recommended to us by the Kokkos team.Vicente Boleavicente.bolea@kitware.comVicente Boleavicente.bolea@kitware.comhttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2964Add ability to resize strided arrays from ArrayExtractComponent2023-04-19T15:33:53-04:00Kenneth MorelandAdd ability to resize strided arrays from ArrayExtractComponentPreviously, it was not possible to resize an `ArrayHandleStride` because
the operation is a bit ambiguous. The actual array is likely to be padded
by some amount, and there could be an unknown amount of space skipped at
the beginning.
H...Previously, it was not possible to resize an `ArrayHandleStride` because
the operation is a bit ambiguous. The actual array is likely to be padded
by some amount, and there could be an unknown amount of space skipped at
the beginning.
However, there is a good reason to want to resize `ArrayHandleStride`. This
is the array used to implement the `ArrayExtractComponent` feature, and
this in turn is used when extracting arrays from an `UnknownArrayHandle`
whether independent or as an `ArrayHandleRecombineVec`.
The problem really happens when you create an array of an unknown type in
an `UnknownArrayHandle` (such as with `NewInstance`) and then use that as
an output to a worklet. Sure, you could use `ArrayHandle::Allocate` to
resize before getting the array, but that is awkward for programers.
Instead, allow the extracted arrays to be resized as normal output arrays
would be.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2963Support using arrays with dynamic Vec-likes as output arrays2023-04-03T15:30:41-04:00Kenneth MorelandSupport using arrays with dynamic Vec-likes as output arraysWhen you use an `ArrayHandle` as an output array in a worklet (for example,
as a `FieldOut`), the fetch operation does not read values from the array
during the `Load`. Instead, it just constructs a new object. This makes
sense as an out...When you use an `ArrayHandle` as an output array in a worklet (for example,
as a `FieldOut`), the fetch operation does not read values from the array
during the `Load`. Instead, it just constructs a new object. This makes
sense as an output array is expected to have garbage in it anyway.
This is a problem for some special arrays that contain `Vec`-like objects
that are sized dynamically. For example, if you use an
`ArrayHandleGroupVecVariable`, each entry is a dynamically sized `Vec`. The
array is referenced by creating a special version of `Vec` that holds a
reference to the array portal and an index. Components are retrieved and
set by accessing the memory in the array portal. This allows us to have a
dynamically sized `Vec` in the execution environment without having to
allocate within the worklet.
The problem comes when we want to use one of these arrays with `Vec`-like
objects for an output. The typical fetch fails because you cannot construct
one of these `Vec`-like objects without an array portal to bind it to. In
these cases, we need the fetch to create the `Vec`-like object by reading
it from the array. Even though the data will be garbage, you get the
necessary buffer into the array (and nothing more).
Previously, the problem was fixed by creating partial specializations of
the `Fetch` for these `ArrayHandle`s. This worked OK as long as you were
using the array directly. However, the approach failed if the `ArrayHandle`
was wrapped in another `ArrayHandle` (for example, if an `ArrayHandleView`
was applied to an `ArrayHandleGroupVecVariable`).
To get around this problem and simplify things, the basic `Fetch` for
direct output arrays is changed to handle all cases where the values in the
`ArrayHandle` cannot be directly constructed. A compile-time check of the
array's value type is checked with `std::is_default_constructible`. If it
can be constructed, then the array is not accessed. If it cannot be
constructed, then it grabs a value out of the array.https://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2962Adding composite filter2023-04-03T15:30:41-04:00Zhe Wanggodenwangzhe@gmail.comAdding composite filterThis filter tries to wrap the existing `make_ArrayHandleCompositeVector` into a filter. The composite filter will be used by vtkh and simplifies its code [here](https://github.com/Alpine-DAV/ascent/blob/develop/src/libs/vtkh/filters/Comp...This filter tries to wrap the existing `make_ArrayHandleCompositeVector` into a filter. The composite filter will be used by vtkh and simplifies its code [here](https://github.com/Alpine-DAV/ascent/blob/develop/src/libs/vtkh/filters/CompositeVector.cpp). More discussion and background information can be found [here](https://github.com/Alpine-DAV/ascent/issues/974).Zhe Wanggodenwangzhe@gmail.comZhe Wanggodenwangzhe@gmail.comhttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2961Resolve sprintf warning2023-04-03T15:30:44-04:00Kenneth MorelandResolve sprintf warningThe latest verson of Xcode clang warns about using sprintf because of
its inherent vulnerability. Change it to snprintf.
Backport: releaseThe latest verson of Xcode clang warns about using sprintf because of
its inherent vulnerability. Change it to snprintf.
Backport: releasehttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2960Fix compile issues when using cuda 122023-07-10T11:56:51-04:00Sujin PhilipFix compile issues when using cuda 12CUDA 12 adds a `cub::Swap` function that creates ambiguity with `vtkm::Swap`.
This happens when a function from the `cub` namespace is called with an object
of a class defined in the `vtkm` namespace as an argument. If that function
has ...CUDA 12 adds a `cub::Swap` function that creates ambiguity with `vtkm::Swap`.
This happens when a function from the `cub` namespace is called with an object
of a class defined in the `vtkm` namespace as an argument. If that function
has an unqualified call to `Swap`, it results in ADL being used, causing the
templated functions `cub::Swap` and `vtkm::Swap` to conflict.Sujin PhilipSujin Philiphttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2959Clarify field index ordering in Doxygen2023-04-03T15:30:44-04:00Kenneth MorelandClarify field index ordering in DoxygenThe fields in a `DataSet` are indexed from `0` to `GetNumberOfFields() - 1`.
It is natural to assume that the fields will be indexed in the order that
they are added, but they are not. Rather, the indexing is arbitrary and can
change any...The fields in a `DataSet` are indexed from `0` to `GetNumberOfFields() - 1`.
It is natural to assume that the fields will be indexed in the order that
they are added, but they are not. Rather, the indexing is arbitrary and can
change any time a field is added to the dataset.
To make this more clear, Doxygen documentation is added to the `DataSet`
methods to inform users to not make any assumptions about the order of
field indexing.
Backport: releasehttps://gitlab.kitware.com/vtk/vtk-m/-/merge_requests/2958Add cmake flag to override default ctest timeouts2023-04-03T15:30:43-04:00Mark BolstadAdd cmake flag to override default ctest timeoutsThe current ctest timeout in VTK-m are fine for the CI, but are too long for develoment when a test is hanging on a queued node. This commit allows a developer to turn off the majority of the hard coded timeout values which allows them t...The current ctest timeout in VTK-m are fine for the CI, but are too long for develoment when a test is hanging on a queued node. This commit allows a developer to turn off the majority of the hard coded timeout values which allows them to set them at the ctest command-line.