Commit Graph

1950 Commits

Author SHA1 Message Date
Kenneth Moreland
e11f612add Deprecate ArrayHandleVirtual
Virtual methods in the execution environment are going away the next
major release of VTK-m, so deprecate their use in preparation for that.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
d938226cd3 Fix tests that relied on stable sort
The parallel sorts in the device adapter are documented to not be
stable. Up until recently, the sorts for all the supported devices
happened to be stable (or at least provided a stable sort where needed).
However, the recent Kokkos adapter provides a sort that is no stable.
This broke some tests that relied on stable sorts when they should not
have.

Fix the tests that relied on stable sort to check the results.
2020-08-27 14:50:51 -06:00
Robert Maynard
faa845d56e Merge topic 'reenable_tests_mistakenly_disabled'
769d6468f Correct a mistake where the kokkos MR merged disabled worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2243
2020-08-27 07:56:37 -04:00
Robert Maynard
769d6468fd Correct a mistake where the kokkos MR merged disabled worklet tests 2020-08-26 13:19:49 -04:00
Dave Pugmire
855e973a20 Rename the Particle classes. 2020-08-26 08:59:51 -04:00
Kenneth Moreland
571aa9f3d7 Simplify getting test file names
The testing helper class provided a method named `GetTestDataBasePath`
that returned the base path to all the data files stored in the VTK-m
repo. This is fine, but it was a little cumbersome to build filenames.

To make things easier, there is now a new method named `DataPath` that
takes a string of the filename (or, rather, subpath) to the file in that
directory and automatically builds the path to it.
2020-08-25 06:17:59 -06:00
Kitware Robot
cf0cdcf7d1 clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04:00
dpugmire
d13a08b6ae Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into mpiStreamlines2 2020-08-18 16:06:41 -04:00
Nick
8124fe81fd Add missing #include. 2020-08-18 15:32:39 -04:00
Nick
024ab1cff8 Put each ODE integrator in it's own file. 2020-08-18 15:32:39 -04:00
dpugmire
9bf49101ca Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into mpiStreamlines2 2020-08-17 16:35:40 -04:00
dpugmire
c806403e2a distributed memory support for streamline and particleadvect filters. 2020-08-13 09:53:57 -04:00
Sujin Philip
452f61e290 Add Kokkos backend 2020-08-12 13:55:24 -04:00
Petar Hristov
c40b98e990 Fix to read the scan inclusive output value directly. 2020-08-06 16:55:04 +01:00
Petar Hristov
ce30e7c62f Refatored writePortal antipattern. 2020-08-05 19:20:24 +01:00
Petar Hristov
332532b290 Removed unused Euler Tour header files. 2020-07-28 08:09:04 +01:00
Petar Hristov
ad497e2619 Merged with master. 2020-07-27 16:27:14 +01:00
Petar Hristov
cd43328ef7 Fixed signed conversion build warning. 2020-07-27 10:43:20 +01:00
Petar Hristov
6b82c1ab77 Fixed CUDA build errors. 2020-07-27 10:00:11 +01:00
Petar Hristov
ce653c78f1 Fixed contour tree example app. 2020-07-24 14:17:36 +01:00
Petar Hristov
4707e5997e Fixed code review issues. 2020-07-24 13:50:12 +01:00
Kenneth Moreland
2163077441 Fix errors with memory access 2020-07-23 11:02:40 -06:00
Kenneth Moreland
d1a4aecc59 Improvements to moving data into ArrayHandle
We have made several improvements to adding data into an `ArrayHandle`.

## Moving data from an `std::vector`

For numerous reasons, it is convenient to define data in a `std::vector`
and then wrap that into an `ArrayHandle`. It is often the case that an
`std::vector` is filled and then becomes unused once it is converted to an
`ArrayHandle`. In this case, what we really want is to pass the data off to
the `ArrayHandle` so that the `ArrayHandle` is now managing the data and
not the `std::vector`.

C++11 has a mechanism to do this: move semantics. You can now pass
variables to functions as an "rvalue" (right-hand value). When something is
passed as an rvalue, it can pull state out of that variable and move it
somewhere else. `std::vector` implements this movement so that an rvalue
can be moved to another `std::vector` without actually copying the data.
`make_ArrayHandle` now also takes advantage of this feature to move rvalue
`std::vector`s.

There is a special form of `make_ArrayHandle` named `make_ArrayHandleMove`
that takes an rvalue. There is also a special overload of
`make_ArrayHandle` itself that handles an rvalue `vector`. (However, using
the explicit move version is better if you want to make sure the data is
actually moved.)

## Make `ArrayHandle` from initalizer list

A common use case for using `std::vector` (particularly in our unit tests)
is to quickly add an initalizer list into an `ArrayHandle`. Now you can
by simply passing an initializer list to `make_ArrayHandle`.

## Deprecated `make_ArrayHandle` with default shallow copy

For historical reasons, passing an `std::vector` or a pointer to
`make_ArrayHandle` does a shallow copy (i.e. `CopyFlag` defaults to `Off`).
Although more efficient, this mode is inherintly unsafe, and making it the
default is asking for trouble.

To combat this, calling `make_ArrayHandle` without a copy flag is
deprecated. In this way, if you wish to do the faster but more unsafe
creation of an `ArrayHandle` you should explicitly express that.

This requried quite a few changes through the VTK-m source (particularly in
the tests).

## Similar changes to `Field`

`vtkm::cont::Field` has a `make_Field` helper function that is similar to
`make_ArrayHandle`. It also features the ability to create fields from
`std::vector`s and C arrays. It also likewise had the same unsafe behavior
by default of not copying from the source of the arrays.

That behavior has similarly been depreciated. You now have to specify a
copy flag.

The ability to construct a `Field` from an initializer list of values has
also been added.
2020-07-23 10:53:38 -06:00
Li-Ta Lo
537557ef91 Merge topic 'worket_invoker_dispatcher2'
0dcc6cc16 reverse #include on CellNeighborhood
2489da125 restore comment, add needed #include
f33318247 Reverse Invoker, Dispatcher and Worklet dependency

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2192
2020-07-22 14:20:35 -04:00
dpugmire
e60d899536 Use the ResetTypes spell to fix the ArrayCopy issue. 2020-07-22 12:03:11 -04:00
dpugmire
0a4d184205 fix compile error in array copy 2020-07-22 09:59:20 -04:00
Li-Ta Lo
0dcc6cc160 reverse #include on CellNeighborhood 2020-07-21 18:49:57 -06:00
Li-Ta Lo
f333182476 Reverse Invoker, Dispatcher and Worklet dependency 2020-07-21 17:25:43 -06:00
dpugmire
246be1b7f0 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into generalizeField 2020-07-21 15:03:08 -04:00
dpugmire
415e2a5ac8 Fix to deal with float data when double enabled. 2020-07-21 15:00:47 -04:00
Li-Ta Lo
567b1fedd2 Merge topic 'cell_neighbor'
9cd70a7dc Install WorkletNeighborhood.h
f66c782b1 Extract WorkletNeighborhood base class
760c51ed6 install ThreadIndicesNeighborhood.h
e52b8fa88 Add CellNeighborhood

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2181
2020-07-21 13:45:40 -04:00
dpugmire
5ad32f4860 enable reading data files. 2020-07-21 11:23:58 -04:00
Li-Ta Lo
9cd70a7dc5 Install WorkletNeighborhood.h 2020-07-21 08:48:49 -06:00
dpugmire
31c97bed89 Generalize fields for particle advection 2020-07-20 21:15:46 -04:00
Li-Ta Lo
f66c782b14 Extract WorkletNeighborhood base class 2020-07-20 17:50:14 -06:00
Li-Ta Lo
e52b8fa88a Add CellNeighborhood 2020-07-15 14:41:32 -06:00
Kenneth Moreland
f6b13df513 Support coordinates of both float32 and float64
Previously there were issues if the coordinate system was using floating
point values that were not FloatDefault. This remedies that issue.
2020-07-14 08:53:01 -06:00
Kenneth Moreland
be7f06bbe7 CoordinateSystem data is VariantArrayHandle
`CoordinateSystem` differed from `Field` in that its `GetData`
method returned an `ArrayHandleVirtualCoordinates` instead of
a `VariantArrayHandle`. This is probably confusing since
`CoordianteSystem` inherits `Field` and has a pretty dramatic
difference in this behavior.

In preparation to deprecate `ArrayHandleVirtualCoordinates`, this
changes `CoordiantSystem` to be much more like `Field`. (In the
future, we may change the `CoordinateSystem` to point to a `Field`
rather than be a special `Field`.)

A method named `GetDataAsMultiplexer` has been added to
`CoordinateSystem`. This method allows you to get data from
`CoordinateSystem` as a single array type without worrying
about creating functors to handle different types and without
needing virtual methods.
2020-07-14 08:50:39 -06:00
Petar Hristov
97b6e727f3 Fixing osx build warnings. 2020-07-14 14:00:02 +01:00
Petar Hristov
c6433140da Removed unused worklet. 2020-07-09 12:45:59 +01:00
Petar Hristov
98d0d69947 Removed unused library. 2020-07-09 10:49:51 +01:00
Petar Hristov
8fc73ebd23 Removed uint variables. 2020-07-09 10:20:37 +01:00
Petar Hritov
c20608288c Removed unused worklet. 2020-07-08 14:26:25 +01:00
Petar Hritov
9e8784a780 Refactoring. 2020-07-03 18:28:21 +01:00
Petar Hritov
edd2585752 Merge branch 'master' into working-branch 2020-07-03 13:55:21 +01:00
Petar Hritov
cdc0fa9e42 Added some additional comments. 2020-07-03 13:53:49 +01:00
Petar Hritov
1ed02d151f Working volume parallel BD version. 2020-07-03 11:40:47 +01:00
Kenneth Moreland
56bec1dd7b Replace basic ArrayHandle implementation to use Buffers
This encapsulates a lot of the required memory management into the
Buffer object and related code.

Many now unneeded classes were deleted.
2020-06-25 14:02:26 -06:00
Kenneth Moreland
c84588caf7 Re-add assert to fix deadlock
For some reason, `UnitTestContourTreeUniformAugmentedFilterCUDA` was
deadlocking on some of the dashboards when `VTKM_ASSERT` was changed to
be empty when compiling CUDA kernels (for compiler performance reasons).
Fix this by calling `assert` directly in this case.

For the life of me, I cannot figure out why this would be an issue.
Clearly the `assert` is never actually called or else the test would
error out (unless a special condition in CUDA is causing it to be
hidden). But if you take out the code, something changes to lock up the
kernel.
2020-06-22 17:10:33 -06:00
Kenneth Moreland
31feaed0f8 Merge topic 'fix-warnings'
0a4317709 Fix issues of calling __host__ from __device__
dd4d88cd5 Fix warnings about comparing floating point values
cd4b59059 Fix warnings about data type conversion

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2146
2020-06-17 17:23:07 -04:00