Commit Graph

7866 Commits

Author SHA1 Message Date
Li-Ta Lo
69de6afa2a add more comments on data race 2020-08-25 13:30:37 -06:00
Li-Ta Lo
ea2dad5154 extract Unite 2020-08-22 06:15:11 -06:00
Li-Ta Lo
ac6fe7a295 remove unnecessary joining my friend operation 2020-08-21 07:17:13 -06:00
Li-Ta Lo
45fed319ac add more comments on data race during union 2020-08-21 07:15:43 -06:00
Li-Ta Lo
2492d7d1d1 add test case from Valentine, more comments in ImageGraft 2020-08-20 15:08:55 -06:00
Li-Ta Lo
83b90f9fce time to test on GPU 2020-08-20 10:49:00 -06:00
Kenneth Moreland
b60e731b4e Merge topic 'working-branch'
7a179e6a0 Merge branch 'master' into working-branch
c40b98e99 Fix to read the scan inclusive output value directly.
ce30e7c62 Refatored writePortal antipattern.
332532b29 Removed unused Euler Tour header files.
ad497e261 Merged with master.
cd43328ef Fixed signed conversion build warning.
6b82c1ab7 Fixed CUDA build errors.
ce653c78f Fixed contour tree example app.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2167
2020-08-10 11:22:06 -04:00
Petar Hristov
7a179e6a07 Merge branch 'master' into working-branch 2020-08-07 17:28:26 +01:00
Petar Hristov
c40b98e990 Fix to read the scan inclusive output value directly. 2020-08-06 16:55:04 +01:00
Robert Maynard
4d010feecd Merge topic 'allow_vtkm_basic_handle_ownership_transfer'
f22dd9f57 Allow VTK-m Buffer to have ownership transferred

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2200
2020-08-06 11:34:59 -04:00
Robert Maynard
f22dd9f571 Allow VTK-m Buffer to have ownership transferred 2020-08-06 10:31:57 -04:00
Petar Hristov
ce30e7c62f Refatored writePortal antipattern. 2020-08-05 19:20:24 +01:00
Robert Maynard
e65f0b1123 Merge topic 'make_ArrayHandle_api_update_for_interop'
47843ea2e Update vtkm/interop to use non-deprecated make_ArrayHandle API

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2199
2020-08-05 13:54:36 -04:00
Kenneth Moreland
03ad17d73f Merge topic 'benchmark-array-transfer'
cb34cbbaf Make BenchmarkArrayTransfer actually benchmark transfers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2201
2020-08-05 11:18:36 -04:00
Kenneth Moreland
cb34cbbaf2 Make BenchmarkArrayTransfer actually benchmark transfers
Previously, most of the benchmarks just measured time spent reading or
writing the array on the device. The transfer only happened on the first
iteration and was then cached on the device.

This change clears out the array every iteration so that the array has
to be transferred afresh.
2020-08-04 09:16:46 -06:00
Robert Maynard
47843ea2e3 Update vtkm/interop to use non-deprecated make_ArrayHandle API 2020-08-03 12:15:16 -04:00
Ben Boeckel
b7a9eb0c73 Merge topic 'doxygen-upload-key-perms'
dcef16788 gitlab-ci: fix key file permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2198
2020-08-03 08:27:31 -04:00
Ben Boeckel
dcef167889 gitlab-ci: fix key file permissions 2020-08-03 07:28:41 -04:00
Vicente Bolea
922a570703 Merge topic 'fix-515-vtkdatasetwriter-remove-justpoints'
ab0fecda7 VTKDataSetWriter: remove just_points argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2185
2020-07-28 20:26:37 -04: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
Kenneth Moreland
adeea8eb31 Merge topic 'move-std-vector'
5f541d251 Drop log message when ignoring copy in move
4c56797c5 Remove ArrayHandleSOA constructors with ambiguous move semantics
0d484505e Fix bad gcc compiler warning about static definition (again)
216307744 Fix errors with memory access
e23989bde Use data method to get pointer from std::vector
2e243cbba Fix issue with using std::string in ArrayHandle
46f253b92 Fix compiler issue with MSVC
d1a4aecc5 Improvements to moving data into ArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Allison Vacanti <alliepiper16@gmail.com>
Merge-request: !2184
2020-07-25 14:27:28 -04:00
Vicente Adolfo Bolea Sanchez
ab0fecda7f VTKDataSetWriter: remove just_points argument
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-07-24 15:54:13 -04:00
Petar Hristov
ce653c78f1 Fixed contour tree example app. 2020-07-24 14:17:36 +01:00
Petar Hristov
1c8935f7ce Merge branch 'working-branch' of https://gitlab.kitware.com/petarhristov/vtk-m into working-branch 2020-07-24 14:17:03 +01:00
Petar Hristov
4707e5997e Fixed code review issues. 2020-07-24 13:50:12 +01:00
Kenneth Moreland
5f541d2515 Drop log message when ignoring copy in move
For `make_ArrayHandle` and `make_Field` when it is determined that the
data can be safely moved, just silently move instead of copy instead of
printing a log message saying the copy flag will be ignored.

Also fix an issue with `make_ArrayHandle` when the data was not moved
when it could have been.
2020-07-23 17:59:50 -06:00
Kenneth Moreland
4c56797c5d Remove ArrayHandleSOA constructors with ambiguous move semantics
Also correct some constructors/functions that should be
deprecated.
2020-07-23 17:54:42 -06:00
Kenneth Moreland
0d484505e7 Fix bad gcc compiler warning about static definition (again) 2020-07-23 17:53:15 -06:00
Kenneth Moreland
2163077441 Fix errors with memory access 2020-07-23 11:02:40 -06:00
Kenneth Moreland
e23989bde1 Use data method to get pointer from std::vector
Do not use `&v.front()` to get the pointer from an `std::vector`. That
behavior is undefined when the vector is empty. Instead, use `v.data()`.
2020-07-23 11:02:40 -06:00
Kenneth Moreland
2e243cbbac Fix issue with using std::string in ArrayHandle
The recent version of ArrayHandleBasic allocates typeless arrays without
any initialization. This can cause issues with types that require a
constructor. The UnitTestVariantArrayHandle was trying to create an
ArrayHandle with an std::string, and the uninitialized strings were
causing crashes on some platforms.
2020-07-23 11:02:38 -06:00
Kenneth Moreland
46f253b927 Fix compiler issue with MSVC 2020-07-23 10:53:42 -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
Kenneth Moreland
744edbf428 Merge topic 'gcc-static-function-warning'
b1f648bfd Remove gcc warning about static declared function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2193
2020-07-22 15:20:45 -04: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
Dave Pugmire
da5f7083c7 Merge topic 'generalizeField'
e60d89953 Use the ResetTypes spell to fix the ArrayCopy issue.
0a4d18420 fix compile error in array copy
246be1b7f Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into generalizeField
415e2a5ac Fix to deal with float data when double enabled.
5ad32f486 enable reading data files.
2e3fe059b replace vtkm::Particle with vtkm::Massless
5fc822082 replace vtkm::Particle with vtkm::Massless
31c97bed8 Generalize fields for particle advection

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2188
2020-07-22 14:17:48 -04:00
dpugmire
e60d899536 Use the ResetTypes spell to fix the ArrayCopy issue. 2020-07-22 12:03:11 -04:00
Kenneth Moreland
b1f648bfdf Remove gcc warning about static declared function
While compiling UnitTestVariantArrayHandle, some versions of gcc
(between 6 and 8, I think) gave a warning like the following:

```
../vtkm/cont/StorageVirtual.h:227:12: warning: 'vtkm::Id vtkm::cont::internal::detail::StorageVirtualImpl<T, S>::GetNumberOfValues() const [with T = std::__cxx11::basic_string<char>; S = vtkm::cont::StorageTagImplicit<{anonymous}::UnusualPortal<std::__cxx11::basic_string<char> > >]' declared 'static' but never defined [-Wunused-function]
```

This warning makes no sense because it is refering to a method that is
not declared static. (In fact, it overrides a virtual method.)

I believe this is an obscure bug in these versions of gcc. I found a
[stackoverflow post] that seems to have the same problem, but no
workaround was found.

The warning originated from code that had little effect. It was part of
a test with a custom ArrayHandle storage type that was already disabled
for other reasons. Just removed the code.

[stackoverflow post]: https://stackoverflow.com/questions/56615695/how-to-fix-declared-static-but-never-defined-on-member-function
2020-07-22 08:28:28 -06: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
2489da1259 restore comment, add needed #include 2020-07-21 18:21:44 -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
dpugmire
2e3fe059b6 replace vtkm::Particle with vtkm::Massless 2020-07-21 11:19:47 -04:00