Commit Graph

7054 Commits

Author SHA1 Message Date
Li-Ta Lo
c212946dbf move OscillatorSource out of Oscillator 2021-10-12 13:24:55 -06:00
Li-Ta Lo
29e459062c move OscillatorSource worklet to be within Oscillator.cxx 2021-10-12 13:11:47 -06:00
Li-Ta Lo
6ffb75c5a5 use pimpl pattern for osc worklet 2021-10-12 12:17:58 -06:00
Kenneth Moreland
8f1c453c0b Support writing binary files to legacy VTK files
The legacy VTK file writer writes out in ASCII. This is helpful when a
human is trying to read the file. However, if you have more than a
trivial amount of data, the file can get impractically large. To get
around this, `VTKDataSetWriter` now has a flag that allows you to write
the data in binary format.
2021-10-11 13:08:59 -06:00
Kenneth Moreland
b4bb02830a Merge topic 'variant-get-unsupported-type'
e9da34310 Handle `Variant::Get` for types not supported by the `Variant`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2596
2021-10-08 08:31:32 -04:00
Kenneth Moreland
9ff36b954a Merge topic 'single-type-reverse-connection'
c699a1708 Fix performance issue with CellSetSingleType reverse connections

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2597
2021-10-05 17:02:28 -04:00
Kenneth Moreland
c699a17087 Fix performance issue with CellSetSingleType reverse connections
When building the reverse connections (visit points with cells) for
`CellSetSingleType`, the fast path for building these was not built due
to a templating error.
2021-10-05 12:53:57 -06:00
Kenneth Moreland
ae3c7c096b Merge topic 'source-field-names'
03a4750a3 Change Oscillator output field name to oscillating
a3462b41c Change Wavelet output field name to RTData
ea1a55359 Name tangle source fields appropriately
a68422d45 Add GenerateIds filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2595
2021-10-05 10:59:48 -04:00
Jieyang Chen
723e133055 Merge topic 'hip-support'
a157c0e84 Add changes for supporting Kokkos/HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2554
2021-10-05 10:42:55 -04:00
Kenneth Moreland
03a4750a3f Change Oscillator output field name to oscillating 2021-10-05 08:20:27 -06:00
Kenneth Moreland
d2c296aa00 Merge topic 'unknownarray-copy-methods'
d1160638b Add copy methods to `UnknownArrayHandle`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2590
2021-10-05 10:15:45 -04:00
Kenneth Moreland
a3462b41ce Change Wavelet output field name to RTData
This matches the output field name in VTK and ParaView for the
equivalent source. This change allows this source to be used as a drop-
in replacement for the VTK source (which could be very useful).
2021-10-04 13:44:27 -06:00
Kenneth Moreland
ea1a55359f Name tangle source fields appropriately
The `Tangle` source would create a point field generically named
`nodevar`. This name was not indicitive of the data or its source. Thus,
the output point field has been renamed `tangle`.

The `Tangle` source was also creating a cell field (named `cellvar`).
This field was really just a mirror of the cell indices (counting from 0
on up). This field has been removed from the input. If you want such a
field, you can now use the `GenerateIds` filter to add it to any data
set.
2021-10-04 13:44:27 -06:00
Kenneth Moreland
a68422d454 Add GenerateIds filter
This filter adds a pair of fields to a `DataSet` which mirror the
indices of the points and cells, respectively. These fields are useful
for tracking the provenance of the elements of a `DataSet` as it gets
manipulated by the filters. It is also convenient for adding indices to
operations designed for fields and for testing purposes.
2021-10-04 13:44:18 -06:00
Kenneth Moreland
e9da343109 Handle Variant::Get for types not supported by the Variant
Previously, if you called `Get` on a `Variant` with a type that is not
in the list of types supported by the `Variant`, that would attempt to
look up the type at index `-1` and could spin the compiler into an
endless loop.

Instead, check for the case where you are attempting to get a type from
the `Variant` not listed in its templat arguments. In this case, instead
of producing a compiler error, produce a runtime error. Although this
increases the possibility that a bad compile path is being generated, it
simplifies creating templated code that produces cases we don't care
about.
2021-10-04 10:19:25 -06:00
Manish Mathai
b7470b0afc Remove leftover debug statement 2021-10-03 02:13:59 -04:00
Manish Mathai
8f025a2c56 Batch text and line annotation rendering
This commit makes `LineRenderer` and `TextRenderer` to batch line and
text rendering. Batching them has shown a significant speedup,
especially when usin CUDA.
2021-10-02 14:13:14 -07:00
Jieyang Chen
a157c0e846 Add changes for supporting Kokkos/HIP
Some of the unit tests for serial and kokkos are disable for hipcc to
properly compile.
VTKM_MATH_ASSERT and VTKM_TEST_ASSERT fail to compile with HIP in
execution environment so they are disabled with building with HIP.
Kokkos::finalize is causing error so it is temporarily disabled.
2021-10-01 15:27:00 -04:00
Vicente Adolfo Bolea Sanchez
557124f6fc testing/Testing.h when VTKm_ENABLE_TESTING_LIBRARY 2021-10-01 13:17:16 -04:00
Vicente Adolfo Bolea Sanchez
b83b4f8880 CMake: adds VTKm_ENABLE_TESTING_LIB 2021-09-28 16:58:18 -04:00
Vicente Adolfo Bolea Sanchez
46b0268825 CI: add ubuntu2004 with tbb 2020 build 2021-09-28 19:46:11 +00:00
Kenneth Moreland
d1160638b7 Add copy methods to UnknownArrayHandle
`vtkm::cont::UnknownArrayHandle` now provides a set of method that
allows you to copy data from one `UnknownArrayHandle` to another. The
first method, `DeepCopyFrom`, takes a source `UnknownArrayHandle` and
deep copies the data to the called one. If the `UnknownArrayHandle`
already points to a real `ArrayHandle`, the data is copied into that
`ArrayHandle`. If the `UnknownArrayHandle` does not point to an existing
`ArrayHandle`, then a new `ArrayHandleBasic` with the same value type as
the source is created and copied into.

The second method, `CopyShallowIfPossibleFrom` behaves similarly to
`DeepCopyFrom` except that it will perform a shallow copy if possible.
That is, if the target `UnknownArrayHandle` points to an `ArrayHandle`
of the same type as the source `UnknownArrayHandle`, then a shallow copy
occurs and the underlying `ArrayHandle` will point to the source. If the
types differ, then a deep copy is performed. If the target
`UnknownArrayHandle` does not point to an `ArrayHandle`, then the
behavior is the same as the `=` operator.

One of the intentions of these new methods is to allow you to copy
arrays without using a device compiler (e.g. `nvcc`). Calling
`ArrayCopy` requires you to include the `ArrayCopy.h` header file, and
that in turn requires device adapter algorithms. These methods insulate
you from these.
2021-09-28 10:46:58 -06:00
Kenneth Moreland
b4df612c37 Check indices with CellSetExtrude reverse look up
Previously, the check for visit points with cells for `CellSetExtrude`
only looked at the count of incident cells. This expands the check to
make sure that it actually returns the expected cells.
2021-09-27 13:49:26 -06:00
Kenneth Moreland
36352912bc Support scatter/mask for CellSetExtrude
Scheduling topology map workets for `CellSetExtrude` always worked, but
the there were indexing problems when a `Scatter` or a `Mask` was used.
This has been corrected, and now `Scatter`s and `Mask`s are supported on
topology maps on `CellSetExtrude`.
2021-09-27 13:27:02 -06:00
Kenneth Moreland
2abeec79de Merge topic 'reverseconnection-precompiled'
050f47f86 Suppress deprecation warning for CellSetSingleType::GetCellShape
e74c0732c Compile reverse connectivity builder into vtkm_cont library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2578
2021-09-27 09:30:18 -04:00
Kenneth Moreland
f768fb11bc Merge topic 'scan-extended'
35b646011 Clarify ScanExtended

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2582
2021-09-24 16:42:04 -04:00
Abhishek Yenpure
a11d9ad108 removing print statements 2021-09-23 10:22:33 -07:00
Abhishek Yenpure
e28476df51 Assigning default associativity for velocity field 2021-09-23 10:12:47 -07:00
Abhishek Yenpure
53167f076a Fix Field constructors 2021-09-23 09:21:31 -07:00
Abhishek Yenpure
e6fa5fd4b9 Fixing Field class 2021-09-23 09:19:44 -07:00
Abhishek Yenpure
cf012b61e4 Changes for supporting cell centered velocity fields
- Changing the Field class for handling field associativity
- Changing Streamline filter to handle cell fields
2021-09-23 08:32:47 -07:00
Vicente Adolfo Bolea Sanchez
11bf684f3c CI: updates kokkos version 2021-09-20 18:23:16 -04:00
Nickolas Davis
c5569012e2 Merge topic 'tbb-runtime-device-config'
166e76f66 implement tbb runtime device configuration testing
9baa7cd9f Implement tbb runtime device configuration and update vtkm to use it

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2574
2021-09-20 15:35:41 -04:00
Nickolas Davis
166e76f66a implement tbb runtime device configuration testing 2021-09-20 10:25:03 -06:00
Nickolas Davis
9baa7cd9fa Implement tbb runtime device configuration and update vtkm to use it 2021-09-20 10:24:23 -06:00
Kenneth Moreland
050f47f862 Suppress deprecation warning for CellSetSingleType::GetCellShape
The superclass method `CellSetExplicit::GetCellShape()` is marked
deprecated because it is a slow way to access the cell shape. However,
this deprecation is causing a warning with MSVC when implementing the
subclass `CellSetSingleType`'s override of that method (which is not
slow). Suppress this warning.
2021-09-17 09:48:26 -06:00
Kenneth Moreland
e74c0732c5 Compile reverse connectivity builder into vtkm_cont library
Because `CellSetExplicit` is a templated class, the implementation of
most of its features is part of the header files. One of the things that
was included was the code to build the reverse connectivity links. That
is, it figured out which cells were incident on each point using the
standard connections of which points comprise which cells.

Of course, building these links is non-trivial, and it used multiple
DPPs to engage the device. It meant that header had to include the
device adapter algorithms and therefore required a device compiler. We
want to minimize this where possible.

To get around this issue, a non-templated function was added to find the
reverse connections of a `CellSetExplicit`. It does this by passing in
`UnknownArrayHandle`s for the input arrays. (The output visit-points-
with-cells arrays are standard across all template instances.) The
implementation first iterates over all `CellSetExplicit` versions in
`VTKM_DEFAULT_CELL_SETS` and attempts to retrieve arrays of those types.
In the unlikely event that none of these arrays work, it copies the data
to `ArrayHandle<vtkm::Id>` and uses those.
2021-09-17 09:48:21 -06:00
Kenneth Moreland
585ac97043 Merge topic 'consolidate-count-to-offset'
4c6522de2 Precompile ConvertNumComponentsToOffsets
b1343474c Consolidate count-to-offset algorithms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2580
2021-09-17 11:44:34 -04:00
Kenneth Moreland
35b6460110 Clarify ScanExtended
Make it more clear that ScanExtended increases the array size by
1, what ranges the exclusive and inclusive scan cover, and the
features of the first and last entries.
2021-09-17 09:09:38 -06:00
Kenneth Moreland
964ef29e06 Suppress warning when logging is turned off
There was a case where a VTK-m exception was caught and then used in a
logging message. That is fine, but if VTK-m logging is turned off, that
code is removed and the exception variable goes unused.

There was a time when it was common to have logging turned off in VTK-m,
but now it is almost always on. There is one old-style dashboard that
has logging turned off and is giving a warning about this variable not
being used. It went unnoticed because the dashboard was down at the
time. This should fix the issue.
2021-09-17 05:34:26 -06:00
Kenneth Moreland
4c6522de2b Precompile ConvertNumComponentsToOffsets
`ConvertNumComponentsToOffsets` has been changed to provide a pre-
compiled version for common arrays. This helps with the dual goals of
compiling less device code and allowing data set builders to not have to
use the device compiler. For cases where you need to compile
`ConvertNumComponentsToOffsets` for a different kind of array, you can
use the internal `ConvertNumComponentsToOffsetsTemplate`.
2021-09-16 14:27:14 -06:00
Kenneth Moreland
b1343474c1 Consolidate count-to-offset algorithms
For no particularly good reason, there were two functions that converted
and array of counts to an array of offsets: `ConvertNumComponentsToOffsets`
and `ConvertNumIndicesToOffsets`. These functions were identical, except
one was defined in `ArrayHandleGroupVecVariable.h` and the other was
defined in `CellSetExplicit.h`.

These two functions have been consolidated into one (which is now called
`ConvertNumComponentsToOffsets`). The consolidated function has also been
put in its own header file: `ConvertNumComponentsToOffsets.h`.

Normally, backward compatibility would be established using deprecated
features. However, one of the things being worked on is the removal of
device-specific code (e.g. `vtkm::cont::Algorithm`) from core classes like
`CellSetExplicit` so that less code needs to use the device compiler
(especially downstream code).

Part of this change removed unnecessary includes of `Algorithm.h` in
`ArrayHandleGroupVecVariable.h` and `CellSetExplicit.h`. This header had to
be added to some classes that were not including it themselves.
2021-09-16 14:24:41 -06:00
Nickolas Davis
277c336000 implement openmp runtime device configuration testing 2021-09-15 14:23:00 -06:00
Nickolas Davis
1c4d6810aa implement openmp runtime device configuration and update code to use it 2021-09-15 14:22:59 -06:00
James Kress
ff71975709 Merge topic 'Update_Threshold'
0e6228bbd Updating threshold to return all or part in range.
d28bdec48 Merge remote-tracking branch 'upstream/master'
f42d73fa0 Merge remote-tracking branch 'upstream/master'
74c4d3479 Merge remote-tracking branch 'upstream/master'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2566
2021-09-09 13:32:52 -04:00
Kenneth Moreland
3309fe1760 Merge topic 'triangulate-single-cell-type'
4239d13b3 Make triangulate implementation more general
1bd70d9c2 Enable triangulation on CellSetSingleType

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2572
2021-09-09 08:11:28 -04:00
Kenneth Moreland
2f3a3d7e6e Merge topic 'cell-metrics-single-cell-type'
5191909b5 Fix MeshQuality to work with CellSetSingleType
ecf36ed39 Fix compile errors in CellSetSingleType::CompleteAddingCells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2556
2021-09-08 15:11:55 -04:00
Kenneth Moreland
4239d13b3e Make triangulate implementation more general
The triangulate and tetrahedra worklet implementations were for some
reason grabbing raw arrays out of `CellSetExplicit` and using those for
lookup tables. Rather than do that, simply use a
`WorkletVisitCellsWithPoints` automatically provide the values of these
cells. The advantage of this approach is that it simplifies the code and
also generalize it to cell sets that do not provide this explicit
representation. For example, the new implementation also works with
`CellSetExtrude`.
2021-09-08 12:49:11 -06:00
Kenneth Moreland
1bd70d9c22 Enable triangulation on CellSetSingleType
The code path for doing either tetrahedralization or triangulation on a
CellSetSingleType was not actually doing any work. Changed the worklet
implementation so that these work on CellSetExplicit with any template
parameters (which includes CellSetSingleType).
2021-09-08 09:53:51 -06:00
Kenneth Moreland
c494963626 Merge topic 'arrayhandle-mutable-const'
a2a8dcdfd Allow a `const ArrayHandle` to be reallocated

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2570
2021-09-02 19:39:57 -04:00
Abhishek Yenpure
3fe41d7a8b Merge topic 'warpX-streams'
8704ff253 Removing host/device being called from device warning
f0d267e81 Adding WarpX particle advection streamlines

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2569
2021-09-02 16:09:06 -04:00
Nickolas Davis
a2e2d5631a Merge topic 'cuda-runtime-device-config'
5530d86e4 update cuda examples to use RuntimeDeviceConfiguration
eaba40724 Call GetRuntimeConfiguration before GetRuntimeDeviceTracker in Initialize
9730de807 remove cudaGetDevice calls, favor runtime device config
adac415f1 implement cuda runtime device configuraton

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2565
2021-09-02 12:43:54 -04:00
Kenneth Moreland
a2a8dcdfd5 Allow a const ArrayHandle to be reallocated
Previously, the `Allocate` method of `ArrayHandle` was _not_ declared as
`const`. Likewise, the methods that depended on `Allocate`, namely
`ReleaseResources` and `PrepareForOutput` were also not declared `const`.
The main consequence of this was that if an `ArrayHandle` were passed as a
constant reference argument to a method (e.g. `const ArrayHandle<T>& arg`),
then the array could not be reallocated.

This seems right at first blush. However, we have changed these methods to
be `const` so that you can in fact reallocate the `ArrayHandle`. This is
because the `ArrayHandle` is in principle a pointer to an array pointer.
Such a structure in C will allow you to change the pointer to the array,
and so in this context it makes sense for `ArrayHandle` to support that as
well.

Although this distinction will certainly be confusing to users, we think
this change is correct for a variety of reasons.

  1. This change makes the behavior of `ArrayHandle` consistent with the
     behavior of `UnknownArrayHandle`. The latter needed this behavior to
     allow `ArrayHandle`s to be passed as output arguments to methods that
     get automatically converted to `UnknownArrayHandle`.
  2. Before this change, a `const ArrayHandle&` was still multible is many
     way. In particular, it was possible to change the data in the array
     even if the array could not be resized. You could still call things
     like `WritePortal` and `PrepareForInOut`. The fact that you could
     change it for some things and not others was confusing. The fact that
     you could call `PrepareForInOut` but not `PrepareForOutput` was doubly
     confusing.
  3. Passing a value by constant reference should be the same, from the
     calling code's perspective, as passing by value. Although the function
     can change an argument passed by value, that change is not propogated
     back to the calling code. However, in the case of `ArrayHandle`,
     calling by value would allow the array to be reallocated from the
     calling side whereas a constant reference would prevent that. This
     change makes the two behaviors consistent.
  4. The supposed assurance that the `ArrayHandle` would not be reallocated
     was easy to break even accidentally. If the `ArrayHandle` was assigned
     to another `ArrayHandle` (for example as a class' member or wrapped
     inside of an `UnknownArrayHandle`), then the array was free to be
     reallocated.
2021-09-02 10:29:09 -06:00
Kenneth Moreland
40f26ff4cd Merge topic 'array-copy-const-ref'
e74093470 Allow ArrayCopy into const ref of UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2568
2021-09-02 11:20:06 -04:00
Nickolas Davis
eaba40724a Call GetRuntimeConfiguration before GetRuntimeDeviceTracker in Initialize 2021-09-02 09:17:36 -06:00
Nickolas Davis
9730de8074 remove cudaGetDevice calls, favor runtime device config 2021-09-02 09:17:36 -06:00
Nickolas Davis
adac415f15 implement cuda runtime device configuraton 2021-09-02 09:12:21 -06:00
Abhishek Yenpure
8704ff2537 Removing host/device being called from device warning 2021-09-01 17:54:41 -07:00
Abhishek Yenpure
f0d267e813 Adding WarpX particle advection streamlines 2021-09-01 17:22:51 -07:00
Abhishek Yenpure
52ae3e4dee Adding missing header 2021-09-01 12:04:31 -07:00
Kenneth Moreland
e740934700 Allow ArrayCopy into const ref of UnknownArrayHandle
Added the following form of `ArrayCopy`:

```cpp
VTKM_CONT_EXPORT void ArrayCopy(
  const vtkm::cont::UnknownArrayHandle& source,
  const vtkm::cont::UnknownArrayHandle& destination);
```

Note that the destination array is a constant reference. This is
actually OK because you can change the contents of an
`UnknownArrayHandle` (as long as you don't change the array being
referenced). The main motivation for this change is to allow you to call
this form of `ArrayCopy` while passing in a `ArrayHandle` as the second
argument. C++ will automatically make the conversion, but the function
has to accept a const reference for it to be passed correctly.

Note that there is still a form of `ArrayCopy` that accepts a non-const
reference to the destination array. The two arrays behave the same
except for one difference. For the non-const version, if the
`UnknownArrayHandle` does not already point to an array (i.e. is not
valid), a new array will be created and placed in the destination
object. However, because this cannot be done for a const reference, an
exception is thrown instead.
2021-09-01 12:11:04 -06:00
Abhishek Yenpure
57711cab8c Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into mir 2021-09-01 09:40:27 -07:00
Kenneth Moreland
b65e8bfcc7 Merge topic 'arraygetvalues-precompiled'
835467753 Fix link issue with discarded section
42acb9a66 Properly check whether ArrayHandleRecombineVec is on device
c17a5569f Do not try to use ArrayGetValue on arrays of non-basic types
9ca0cd1f6 Report array type when UnknownArrayHandle::ExtractComponent fails
e1ac918bc Compile ArrayGetValues implementation in library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2551
2021-09-01 08:54:15 -04:00
Kenneth Moreland
546dd608e1 Suppress exception when mapping field of unknown type
By default, the `FilterDataSet` class will iterate over all fields and
use `CastAndCall` on each one to call the subclass' mapping function
with the appropriate array type.

This only works if the array is of a known type. If it is not
`CastAndCall` throws an exception. However, having the entire filter
exception out just because one field cannot be converted does not make
sense. Instead, catch the exception, log a warning, and drop the field.
2021-08-31 14:24:50 -06:00
James
0e6228bbd8 Updating threshold to return all or part in range. 2021-08-31 15:33:45 -04:00
Abhishek Yenpure
c64bf9b3df removing wrong fix that added additional errors 2021-08-30 13:22:32 -07:00
Ben Boeckel
73353fea70 Merge topic 'allow-skip-version-links'
09d5b9471 cmake: allow VTK to skip soname links for libraries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2563
2021-08-26 13:58:44 -04:00
Ben Boeckel
09d5b9471e cmake: allow VTK to skip soname links for libraries
VTK's wheels do not want these symlinks because they are useless in
Python wheels.
2021-08-26 12:06:09 -04:00
Vicente Adolfo Bolea Sanchez
d348b11183 Enable shared CUDA builds when not compiling virtuals
The reason why we did not support shared libraries when CUDA compiles
were on is that virtual methods require a special linking step to pull
together all virtual methods that might be called. I other words, you
cannot call a virtual CUDA method defined inside a library. This
requirement goes away when virtuals are removed.

Also removed the necessity of using seprable compilation with cuda.
Again, this is only needed when a CUDA function is defined in one
translation unit and used in another. Now we can enforce that all
translation units define their own CUDA functions.

Also, suppress warnings in cuda/internal/ExecutionPolicy.h

This is where we call the thrust algorithms. There must be some loop
where it, on some code path, calls back a host function. This must be in
an execution path that never happens. The thrust version has its own
suppress, but that does not seem to actually suppress the warning (it
just means that the warning does not tell you where the actual call is).

Get around the problem by suppressing the warnings in VTK-m.

Co-authored-by: Kenneth Moreland <morelandkd@ornl.gov>
Co-authored-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-08-24 13:14:58 -04:00
Vicente Adolfo Bolea Sanchez
a6c4e8479f KOKKOS: resolved issue with KOKKOS_LAMBDA 2021-08-24 13:14:58 -04:00
Kenneth Moreland
24621e95ed Merge topic 'convert-to-expected'
0855de1b4 Collect the get methods for `Field` in the header definition
47371bb5e Add ability to convert fields to known types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2558
2021-08-23 15:15:44 -04:00
Kenneth Moreland
0855de1b47 Collect the get methods for Field in the header definition 2021-08-23 11:11:01 -06:00
Kenneth Moreland
c89d709345 Fix condition in RuntimeDeviceConfiguration
`RuntimeDeviceConfiguration` is supposed to log a warning if a specific
device returns a non-success status other than simply an invalid option.
However, the condition was wrong and warnings never happened.
2021-08-20 08:51:44 -06:00
Kenneth Moreland
47371bb5e6 Add ability to convert fields to known types
In VTK-m we have a constant tension between minimizing the number of
types we have to compile for (to reduce compile times and library size)
and maximizing the number of types that our filters support.
Unfortunately, if you don't compile a filter for a specific array type
(value type and storage), trying to run that filter will simply fail.

To compromise between the two, added methods to `DataSet` and `Field`
that will automatically convert the data in the `Field` arrays to a type
that VTK-m will understand. Although this will cause an extra data copy,
it will at least prevent the program from failing, and thus make it more
feasible to reduce types.
2021-08-19 07:10:20 -06:00
Nickolas Davis
56cbd0abe2 Merge topic 'kokkos-runtime-device-config'
cd2a6c138 implement kokkos runtime device configuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2549
2021-08-18 16:35:43 -04:00
nadavi
cd2a6c1385 implement kokkos runtime device configuration 2021-08-18 13:23:30 -06:00
Vicente Adolfo Bolea Sanchez
b6fc783631 Filters: Add cmake instantiations generator
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-08-14 13:39:53 -04:00
Vicente Adolfo Bolea Sanchez
0b5e3e786e CI: Remove warnings of CUDA & use attributes
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-08-12 19:20:02 -04:00
Kenneth Moreland
5191909b51 Fix MeshQuality to work with CellSetSingleType
The `MeshQuality` filter only worked with `CellSetExplicit<>`. However,
`MeshQuality` should also work with `CellSetSingleType`. Fix
`MeshQuality` to work with both.

The handling of cell sets was actually worse than that. After forcing
the type to `CellSetExplicit<>`, it then applied a policy that converted
the types back to all possible cell sets. Thus, the filter made lots of
code paths that were impossible to follow.
2021-08-12 12:42:56 -06:00
Sujin Philip
09e508cd86 Merge topic 'probe-point-fields'
abedf61e5 Fix probe filter field mapping

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2555
2021-08-12 14:10:00 -04:00
Kenneth Moreland
ecf36ed39f Fix compile errors in CellSetSingleType::CompleteAddingCells
Apparently, no code actually used this in a while and it has avoided
being compiled in a long time.
2021-08-12 12:02:02 -06:00
Abhishek Yenpure
c13ed21ef3 Fixing failing CUDA test 32bit IDs 64bit Floats 2021-08-11 11:59:39 -07:00
Abhishek Yenpure
e53f419f48 Fixing failing CUDA test 32bit IDs 64bit Floats 2021-08-11 11:54:43 -07:00
Kenneth Moreland
8354677535 Fix link issue with discarded section
In one of the dashboards, we got a link error about one of the
UnknownArrayHandle internal methods being discarded and then used. Add
an explicit `__attribute__((used))` modifier to prevent this from
happening.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
42acb9a66c Properly check whether ArrayHandleRecombineVec is on device
The `ArrayCopy` was simply calling `IsOnDevice` to see if the array from
the `UnknownArrayHandle` was on a device. Seems right, but it is
actually operating on an `ArrayHandleRecombineVec`. This is a special
array that mostly behaves like other `ArrayHandle`s, but because it has
variable vec size, it breaks some `ArrayHandle` conventions.

One of the iffy things it has to do is stick the dependent `Buffer`
objects into the metadata of its own `Buffer` rather than list them in
the `Buffer` list. This means that `ArrayHandle` cannot properly check
them to see where they are located. Instead, it just sees that the one
`Buffer` it has is empty.

A recent change to `IsOnDevice` made it return true for any device if
the `Buffer` is empty. So previously this was broken in that it reported
that the array was not on any device. That changed to report that it was
on all devices, even inactive ones. So the code went from not
efficiently copying to throwing an exception.

This has been fixed by pulling one of the dependent arrays and checking
that one.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
c17a5569f5 Do not try to use ArrayGetValue on arrays of non-basic types
This is no longer supported.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
9ca0cd1f6c Report array type when UnknownArrayHandle::ExtractComponent fails
Sneak this into an unrelated MR because I missed it in the last one.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
e1ac918bc7 Compile ArrayGetValues implementation in library
Previously, all of the `ArrayGetValues` implementations were templated
functions that had to be built. That meant that any code using them had
to be compiled with a device compiler and create special code for it.
This change uses an `UnknownArrayHandle` to encapsulate the
`ArrayHandle` and call a per-compiled library function. This means that
the code only has to be compiled once.
2021-08-11 07:56:32 -06:00
Kenneth Moreland
bfb693c1d2 Merge topic 'fix-unknownah-circular-dependency'
bb7661c16 Fix recursive header file dependancies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2552
2021-08-11 09:36:41 -04:00
Kenneth Moreland
599fd4f582 Merge topic 'device-select-on-threads'
3feff3689 Save device choice on spawned control threads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2543
2021-08-11 08:53:48 -04:00
Abhishek Yenpure
816c29eda7 Adding missing header VectorAnalysis 2021-08-10 16:34:18 -07:00
Abhishek Yenpure
da19ea2ee1 Removing unnecessesary header ImplicitFunctionHandle 2021-08-10 16:31:40 -07:00
Abhishek Yenpure
b185944d3f Adding fixes from Ken's review 2021-08-10 16:17:11 -07:00
Abhishek Yenpure
1a3a139f4a Updating portal types to newer 1.6 requirements 2021-08-10 13:36:37 -07:00
Sujin Philip
abedf61e5c Fix probe filter field mapping
All probed fields should become point fields in output
2021-08-09 12:56:28 -04:00
Sujin Philip
707dfd3c82 Merge topic 'fix-dataset-writer'
9bb10b396 Fix VTKDataSetWriter writing `char` types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2538
2021-08-09 09:53:55 -04:00
Sujin Philip
9bb10b3961 Fix VTKDataSetWriter writing char types 2021-08-06 09:58:26 -04:00
Kenneth Moreland
bb7661c169 Fix recursive header file dependancies
Having UnknownArrayHandle.h include DefaultTypes.h is problematic,
because that header includes lots of other classes like cell sets.
Keeping these from in turn depending back on UnknownArrayHandle.h is
difficult. So this dependancy is broken.
2021-08-06 06:16:29 -06:00
Abhishek Yenpure
7f4b66d057 Adding MIR filter
-- Adding MIR filter and tables for material reconstruction
2021-08-05 15:15:28 -07:00
Dave Pugmire
82f5b5ebcf Merge topic 'threaded_filters'
0ea4470f1 Simplify the code a little.
179643107 Cleanup. remove prints.
50a42a144 Forgot to add header to CMakeLists.txt
f8021dbc0 Add threaded filters for multiblock dataset.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2548
2021-08-05 14:59:38 -04:00
Dave Pugmire
0ea4470f19 Simplify the code a little. 2021-08-05 12:16:33 -04:00
Dave Pugmire
179643107b Cleanup. remove prints. 2021-08-05 11:50:34 -04:00
Dave Pugmire
50a42a1447 Forgot to add header to CMakeLists.txt 2021-08-05 10:44:54 -04:00
Dave Pugmire
f8021dbc0d Add threaded filters for multiblock dataset. 2021-08-04 14:27:41 -04:00
Kenneth Moreland
1ec4e5d62c Improve type reporting in UnknownArrayHandle
Added features with reporting types with `UnknownArrayHandle`. First,
added a method named `GetArrayTypeName` that returns a string containing
the type of the contained array. There were already methods
`GetValueType` and `GetStorageType`, but this provides a convenience to
get the whole name in one go.

Also improved the reporting when an `AsArrayHandle` call failed. Before,
the thrown method just reported that the `UnknownArrayHandle` could not
be converted to the given type. Now, it also reports the type actually
held by the `UnknownArrayHandle` so the user can better understand why
the conversion failed.
2021-08-04 12:11:10 -06:00
Kenneth Moreland
6f5455d0d6 Enable TypeToString for type_info
VTK-m contains a helpful method named `vtkm::cont::TypeToString` that
either takes a type as a template argument or a `std::type_info` object
and returns a human-readable string for that type.

The standard C++ library has an alternate for `std::type_info` named
`std::type_index`, which has the added ability to be used in a container
like `set` or `map`. The `TypeToString` overloads have been extended to
also accept a `std::type_info` and report the name of the type stored in
it (rather than the name of `type_info` itself).
2021-08-04 12:11:10 -06:00
Dave Pugmire
6f8d1466bc Fixes for compiler warnings. 2021-08-04 12:25:55 -04:00
Dave Pugmire
bde0672a4c Merge topic 'fix_smallstep_advection'
39054e644 Add corner case unit test.
0a3fd2629 Add test file for corner case.
4b0896bd8 Fix for corner case in particle advection.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !2545
2021-08-04 07:10:35 -04:00
Dave Pugmire
39054e644f Add corner case unit test. 2021-08-03 21:40:28 -04:00
Dave Pugmire
4b0896bd8c Fix for corner case in particle advection. 2021-08-02 13:39:32 -04:00
Kenneth Moreland
869535b23f Remove uses of ScopedCudaStackSize
Since we have (hopefully) gotten rid of all unbounded recursion and
calls to function pointers or virtual methods, the CUDA compiler should
be able to statically determine the size of the stack needed. Thus, we
shouldn't need `ScopedCudaStackSize` at all.

However, there is one odd case where using it seems to be necessary. It
is unclear why, but that is an issue for another day.
2021-08-02 09:53:02 -06:00
Kenneth Moreland
4bf8bfb1fa Deprecate KdTree3D worklets
The implementation of the search in the k-d tree is problematic because
it uses unbounded recursion. This is a problem for GPU devices, which
have very short stacks set by how many calls the compiler determines.
This is fixable, but the fix is not trivial.

This class is not used anywhere in VTK-m other than a trivial test.
Thus, I am just deprecating the class. I am also deleting the test, so
the code is not run anymore.
2021-08-02 09:50:41 -06:00
Kenneth Moreland
5fa402ac28 Remove recursion from FloatDistance
The maximum recursion that could happen was 1 call in, but compilers had
trouble determining that. Split this into 2 non-recursive functions so
the compiler can easily determine the stack depth.
2021-08-02 09:50:41 -06:00
Kenneth Moreland
3feff36891 Save device choice on spawned control threads
The `RuntimeDeviceTracker` is a thread-local variable that monitors the
devices to use separately on each thread. This is an important feature
to allow different threads to control different devices.

When a tracker is created on a new thread, it was simply reset, which
makes sense. However, the reset does not take into account the device
selected by `vtkm::cont::Initialize`. This means that if VTK-m was used
in a different thread than it was initialized, it would ignore the
`--vtkm-device` parameter.

To get around this problem, keep track of the `RuntimeDeviceTracker` on
the "main" thread. When a `RuntimeDeviceTracker` is created on a new
thread, it copies the state from that tracker.
2021-07-29 16:57:27 -06:00
Kenneth Moreland
822eb8f165 Merge topic 'copy-runtime-state'
624117963 Add RuntimeDeviceTracker::CopyState

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2540
2021-07-29 10:37:52 -04:00
Kenneth Moreland
3b9e028a5e Merge topic 'deprecate-arrayhandle-getdeviceadapterid'
34615a985 Deprecate ArrayHandle::GetDeviceAdapterId

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2534
2021-07-29 10:37:05 -04:00
Kenneth Moreland
6241179631 Add RuntimeDeviceTracker::CopyState
It is sometimes the case that you want to copy the state of one
`RuntimeDeviceTracker` to another. This is particularly the case when
creating threads in the control environment. Each thread has its own
copy of `RuntimeDeviceTracker`, so when you spawn a thread you probably
want to copy the state of the tracker from the calling thread.
2021-07-28 13:16:12 -06:00
Kenneth Moreland
34615a9858 Deprecate ArrayHandle::GetDeviceAdapterId
This method is a remenant of when `ArrayHandle` could only store data on
one device at a time. It is now capable of storing data on any number of
devices (as well as the host), so asking for "the" device no longer
makes sense. Thus, this method is deprecated in favor of
`ArrayHandle::IsOnDevice`.

This deprecation leads to fixing some older functionality that still
assumed data could only be on one device at a time.

Fixes #592.
2021-07-28 12:51:51 -06:00
Kenneth Moreland
bf6d6ca517 Merge topic 'shallow-array-copy'
1fb114172 Update code to use ArrayCopyShallowIfPossible
5c36eafe5 Add ArrayCopyShallowIfPossible

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2529
2021-07-21 11:29:48 -04:00
Gunther H. Weber
f9eab2eeec Replace STL exception in contour tree with VTKM exception 2021-07-15 14:00:23 -07:00
Kenneth Moreland
1fb1141723 Update code to use ArrayCopyShallowIfPossible
There were several places in the code that had to check the type of an
`UnknownArrayHandle` and conditionally get or copy that array. This code
is simplified by using `ArrayCopyShallowIfPossible`.
2021-07-15 08:53:52 -06:00
Kenneth Moreland
5c36eafe56 Add ArrayCopyShallowIfPossible
Often times you have an array of an unknown type (likely from a data set),
and you need it to be of a particular type (or can make a reasonable but
uncertain assumption about it being a particular type). You really just
want a shallow copy (a reference in a concrete `ArrayHandle`) if that is
possible.

`ArrayCopyShallowIfPossible` pulls an array of a specific type from an
`UnknownArrayHandle`. If the type is compatible, it will perform a shallow
copy. If it is not possible, a deep copy is performed to get it to the
correct type.

Fixes #572.
2021-07-15 08:52:07 -06:00
Gunther Weber
6c7a062b01 Merge topic 'contour-tree-performance-improvements'
851c32718 Clean-up 0f CopyArrayByIndices and CopyVecArrayByIndices helpers
89fc3be8f Changed comment style to avoid warning
17caf7f3a Fixed incorrect filename in CMakeLists.txt
c3b3c44eb Update CMakeLists.txt
b625ef7db Removed helper function for debugging
dffb7afbc Clean-up. Move functor class outside template.
51f737041 Clean-up. Move functor class outside template.
749232665 Added missing const qualifier
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2443
2021-07-14 13:04:06 -04:00
Gunther Weber
fa0ce37b96 Merge topic 'add/ct_iter_check'
ca86402f9 Provide additional debug info in case contour tree hangs
48d91b99f Throw exception if merge tree gets stuck in a loop
c7ea03ee2 Throw exception if contour tree gets stuck in a loop

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2420
2021-07-13 21:29:04 -04:00
Sujin Philip
c5b72c9d97 Merge topic 'fix-cuda-interop'
8d62bf128 Fix cuda-opengl interop

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2528
2021-07-13 10:48:25 -04:00
Kenneth Moreland
f883b5e036 Avoid divide by zero in rendering TriangleIntersections 2021-07-12 11:23:24 -06:00
Kenneth Moreland
ede7756929 Allow for empty Z bounds in ResetToBounds
If the camera is not a 3D camera, then it might be the case that the
calling code has not set the bounds in the Z direction. Allow this to
happen as long as you are not using a 3D camera.
2021-07-12 10:57:19 -06:00
Kenneth Moreland
4c1514bb3a Fix divide by zero in CanvasRayTracer
The divide by zero happened when mapping a surface to a depth buffer.
Some rays terminated at the origin, which is a singularity in the
project matrix.

This might be indicative of a larger problem. Rays really shouldn't
terminate before the near plane.
2021-07-12 10:29:46 -06:00
Kenneth Moreland
83369ed95a Remove unused fields from Ortho2DRayGen
There were apparently some fields copy/pasted from the 3D version were
not used in the 2D version (probably because they had no meaning). In
one case, one was erroneously normalized, and could cause a floating
point exception.
2021-07-12 10:29:46 -06:00
Kenneth Moreland
c1a790db2d Fix BIH split calculations for empty regions
When computing the cost for splitting, if a regions was empty you would
get a floating point error when multiplying the (invalid) region bound
(inf or -inf) with the number of points (0). It would then check for NaN
costs and reset that. This worked but caused a floating point exception,
which is problematic for some users.

Instead, check for empty regions before computing the cost and reset the
cost that way.
2021-07-12 10:29:46 -06:00
Kenneth Moreland
9ce97352d9 Fix divide-by-zero in UnitTestCellInterpolate 2021-07-12 10:29:46 -06:00
Kenneth Moreland
e4ae3cee1b Avoid floating point exception in Orthonormalize 2021-07-12 10:29:46 -06:00
Kenneth Moreland
f74a2239eb Break LUP factorization when invalid matrix found
Singular matrices cannot be LUP factorized, so this condition is
detected and returned in a `valid` flag. However, when the detection
happened, the rest of the computation continued to happen. This could
lead to floating point exceptions, which some applications do not like.
So, when an invalid array is detected, return immediately.
2021-07-12 10:29:46 -06:00
Kenneth Moreland
6447b17303 Disable floating point exception traps when testing NaNs
Some functions are supposed to behave correctly when given a NaN. This
might only be valid if floation point exceptions are not trapped, so
disable trapping for these tests.
2021-07-12 10:29:45 -06:00
Kenneth Moreland
b01ca530b8 Turn on floating point exception trapping for GCC in tests
Some simulations trap floating point exceptions to ensure that their
code is working correctly, and we want VTK-m to work correctly in their
code. To check this, we want to turn on floating point exception
trapping in our test code. This is very implementation-specific, so for
now we are just turning it on for GCC. This will at least alert a
problem on some of the dashboards.
2021-07-12 10:29:37 -06:00
Sujin Philip
8d62bf1286 Fix cuda-opengl interop
1. Use cudaPerThreadStream instead of the default streams
2. Since there have been changes to ArrayHandle code, the API to create
ArrayHandle from a device pointer has changed.
2021-07-12 10:32:44 -04:00
Kenneth Moreland
80d622cd92 Merge topic 'unknown-array-better-allocate'
8d7cf2c85 Support all Allocate flags in UnknownArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2522
2021-06-30 14:06:18 -04:00
Gunther H. Weber
851c327188 Clean-up 0f CopyArrayByIndices and CopyVecArrayByIndices helpers 2021-06-28 15:44:44 -07:00
Gunther H. Weber
89fc3be8fa Changed comment style to avoid warning 2021-06-28 15:44:44 -07:00
Gunther H. Weber
17caf7f3a4 Fixed incorrect filename in CMakeLists.txt 2021-06-28 15:44:44 -07:00
Gunther H. Weber
c3b3c44eb1 Update CMakeLists.txt 2021-06-28 15:44:44 -07:00
Gunther H. Weber
b625ef7dbd Removed helper function for debugging 2021-06-28 15:44:44 -07:00
Gunther H. Weber
dffb7afbcd Clean-up. Move functor class outside template. 2021-06-28 15:44:44 -07:00
Gunther H. Weber
51f737041b Clean-up. Move functor class outside template. 2021-06-28 15:44:44 -07:00
Gunther H. Weber
749232665b Added missing const qualifier 2021-06-28 15:44:44 -07:00
Gunther H. Weber
32dcd3d0c5 Refactor merging to be restricted to only common vertices 2021-06-28 15:44:44 -07:00
Gunther H. Weber
47cc80e42c Add missing ArrayRangeComputeTemplate.h include to avoid memory copy 2021-06-28 15:44:44 -07:00
Gunther H. Weber
f5b95fe42d Clean up/remove contour tree mesh worklets no longer used. 2021-06-28 15:44:43 -07:00
Gunther H. Weber
35da705571 Add missing contour tree mesh worklets to CMakeLists.txt 2021-06-28 15:44:43 -07:00
Gunther H. Weber
b2fd0f9178 Added missing VTKM_EXEC in CopyNeighborsToPackedArray worklet 2021-06-28 15:44:43 -07:00
Gunther H. Weber
608dec63e8 Disable debug output in UnitTestContourTreeUniformDistributed 2021-06-28 15:44:43 -07:00
Gunther H. Weber
4da3fb57e9 Improved merge by keeping track of insert position 2021-06-28 15:44:43 -07:00
Gunther H. Weber
9ccde88d0f Commented out debug output/added comment. 2021-06-28 15:44:43 -07:00
Gunther H. Weber
9548ba5100 Add debug out and refactor for debugging 2021-06-28 15:44:43 -07:00
Gunther H. Weber
968ccfc351 Refactored ContourTreeMesh based on Ken Moreland's suggestions 2021-06-28 15:44:43 -07:00
Gunther H. Weber
39aad140ef More uses of ArrayGetValue where appropriate 2021-06-28 15:44:43 -07:00
Gunther H. Weber
85503c55d3 Fix dash board compiler warnings 2021-06-28 15:44:43 -07:00
Gunther H. Weber
abe7de6cc1 Avoid inner loop branch through compile time optimization 2021-06-28 15:44:43 -07:00
Gunther H. Weber
8ff6461ee7 Use vtkm::LowerBound/vtkm::UpperBound instead of custom binary search 2021-06-28 15:44:43 -07:00
Gunther H. Weber
5e98005227 Use ArrayGetValue to avoid array transfer to control environment 2021-06-28 15:44:43 -07:00
Gunther H. Weber
b490727324 Replace ScanExclusive with ScanExtended based on review feedback. 2021-06-28 15:44:43 -07:00
Gunther H. Weber
7f46a21bf0 Fix compile error on ubuntu1804_clang_cuda 2021-06-28 15:44:43 -07:00
Gunther H. Weber
84022a02eb Refactor changes to CombinedVectorDifferentFromNext.h 2021-06-28 15:44:43 -07:00
Oliver Ruebel
7ff30cb0c4 Avoid extra array copy and use ScanExclusive in ContourTreeMesh::MergeWith 2021-06-28 15:44:43 -07:00
Oliver Ruebel
9603c9f9bc Avoid pulling arrys to host to compute nCombinedNeighbours 2021-06-28 15:44:42 -07:00
Gunther H. Weber
4403947746 Fix MergeCombinedOtherStartIndexWorklet instead of using STL; clean up 2021-06-28 15:44:42 -07:00
Gunther H. Weber
b1ace58809 Use worklet to combine sorted lists instead of serial std::merge 2021-06-28 15:44:42 -07:00
Oliver Ruebel
f28961af94 Add time profiling for ContourTreeMesh::MergeWith 2021-06-28 15:44:42 -07:00
Vicente Adolfo Bolea Sanchez
dd727b9af5 General: remove warnings in the CI
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-06-26 18:12:56 -04:00
Dave Pugmire
f7826d1efd Merge topic 'temporal_particle_advection'
f878ba8da Move the check for 0 inputs. With mpi, 0 input is ok for a rank.
4b2dbfbad Remove unused header.
b08082472 Clean up the code a bit.
c4341adfe update cmakelists.txt. The merge somehow missed this..
90bed8d0c refactor particle adv-based filters and make a temporal particle adv filter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2515
2021-06-24 07:26:33 -04:00
Nickolas Davis
f949d8adea Merge topic 'device-resource-management'
fe3b82b99 implement return codes and protected virtual parsing of arguments
ce9c27bc0 Implement tests for RuntimeDeviceConfiguration helpers
408beefc0 Implement RuntimeDeviceConfiguration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2513
2021-06-23 16:11:32 -04:00
nadavi
fe3b82b99c implement return codes and protected virtual parsing of arguments 2021-06-23 17:58:38 +00:00
Dave Pugmire
f878ba8dab Move the check for 0 inputs. With mpi, 0 input is ok for a rank. 2021-06-23 13:53:56 -04:00
Dave Pugmire
4b2dbfbad2 Remove unused header. 2021-06-22 14:21:45 -04:00
Dave Pugmire
b080824723 Clean up the code a bit. 2021-06-22 13:36:14 -04:00
Kenneth Moreland
8d7cf2c858 Support all Allocate flags in UnknownArrayHandle
`UnknownArrayHandle` supported an `Allocate` method to change
the size of the underlying array without knowing its type.
However, it did not give all the features of `ArrayHandle`'s
allocate. Namely, you could not specify that the data should
be preserved and you could not provide a `Token` object. This
change adds these (optional) parameters.
2021-06-21 11:25:51 -06:00
nadavi
ce9c27bc0e Implement tests for RuntimeDeviceConfiguration helpers 2021-06-17 17:56:39 +00:00
nadavi
408beefc0a Implement RuntimeDeviceConfiguration 2021-06-17 17:56:38 +00:00
Kenneth Moreland
2589e5b740 Merge topic 'latest-tbb'
3be3529ff Export tbb interface as vtkm::tbb
a8825db59 Disable loading the TBBConfig.cmake file
5eb688da2 Update parallel radix sort for OpenMP
1eea0bee1 Use TBB task_group for radix sort
904e784e8 Remove TBB parallel_sort patch
0390c8b07 Pull FindTBB.cmake from VTK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2509
2021-06-14 09:27:16 -04:00
Kenneth Moreland
67aa4782ae Merge topic 'benchmark-does-not-need-testing'
9d5d9e38a Remove testing headers from benchmarking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2512
2021-06-12 01:18:56 -04:00
Dave Pugmire
c4341adfe2 update cmakelists.txt. The merge somehow missed this.. 2021-06-11 08:08:30 -04:00
Dave Pugmire
90bed8d0cf refactor particle adv-based filters and make a temporal particle adv filter. 2021-06-11 08:00:25 -04:00
Kenneth Moreland
5eb688da2a Update parallel radix sort for OpenMP
Some changes required for TBB bled into the implementation of OpenMP.
2021-06-10 10:39:18 -06:00
Kenneth Moreland
1eea0bee12 Use TBB task_group for radix sort
TBB 2020 introduced a new class called `task_group`. TBB 2021 removed
the old class `task` as its functionality was replaced by `task_group`.
Our parallel radix sort for TBB was implemented using `task`s, so change
it to use `task_group` (which actually cleans up the code a bit).
2021-06-10 10:39:13 -06:00
Kenneth Moreland
9d5d9e38a1 Remove testing headers from benchmarking
The code in `vtkm/cont/Testing.h` now requires a library, which is not
built if testing is not built. Thus, the benchmarking code was giving a
compile error if benchmarking was on but testing was off.

Change the benchmarking to not rely on anything in the Testing
framework. This means using classes in `vtkm/source` instead of
`MakeTestData`. Also avoid using the `TestValue` defined for the tests.
(In one case, we have a simple replacement.) Also had to fix a problem
with a header file not defining everything it needed to compile.
2021-06-10 09:41:26 -06:00
Kenneth Moreland
904e784e89 Remove TBB parallel_sort patch
Years ago we discovered a problem with TBB's parallel sort, which we
patch in our local repo and submitted a change to TBB, which has been
accepted.

The code to decide whether to use our parallel_sort patch does not work
with the latest versions of TBB because it requires including a header
that changed names to get the TBB version.

We no longer support any TBB version with this bug, so just remove the
patch from VTK-m.
2021-06-10 09:18:08 -06:00
Dave Pugmire
3bd15950bd Clarify dimension values for 2d, 1d. fix test 2021-06-09 16:16:34 -04:00
Dave Pugmire
651345b491 cleanup included headers. 2021-06-09 14:02:42 -04:00
Dave Pugmire
aaa6855a6f Clean the code up a little. 2021-06-09 13:58:27 -04:00
Dave Pugmire
3588209562 Add helper class to build curvilinear datasets. 2021-06-09 13:50:01 -04:00
Ben Boeckel
7e576483cb Merge topic 'cmake-guard-testing-directories'
b719911d1 cmake: use `if (TEST)` to detect tests that are enabled
4c7fe13a9 cmake: avoid adding testing directories if testing is disabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2508
2021-06-02 18:05:59 -04:00
Sujin Philip
749e972772 Merge topic 'add-slice-filter'
d1b22046e Add Slice filter and tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2501
2021-06-02 09:38:27 -04:00
Ben Boeckel
b719911d1b cmake: use if (TEST) to detect tests that are enabled
It's just simpler in this case.
2021-06-01 18:40:46 -04:00
Ben Boeckel
4c7fe13a98 cmake: avoid adding testing directories if testing is disabled
Some testing directories have side effects such as installing headers or
compiling code that ultimately doesn't end up getting used.
2021-06-01 18:40:40 -04:00
Vicente Adolfo Bolea Sanchez
9bcf78b830 diy: update tag 2021-06-01 10:33:46 -04:00
Vicente Adolfo Bolea Sanchez
9c267d1770 Merge branch 'upstream-diy' into add-update-diy
# By Diy Upstream
* upstream-diy:
  diy 2021-05-26 (b21d798e)
2021-06-01 10:33:30 -04:00
Sujin Philip
d1b22046eb Add Slice filter and tests 2021-05-28 11:35:51 -04:00
Sujin Philip
0a401c2ace Merge topic 'fix-dataset-reader'
57f516811 Support reading Global and Pedigree ids
a01e4335d Support reading new format cells
d7b2fec44 Fix reading of string arrays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2490
2021-05-17 12:52:41 -04:00
Sujin Philip
57f5168114 Support reading Global and Pedigree ids 2021-05-17 09:52:21 -04:00
Sujin Philip
a01e4335d2 Support reading new format cells 2021-05-17 09:51:21 -04:00