Commit Graph

7793 Commits

Author SHA1 Message Date
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
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
dpugmire
5fc822082e replace vtkm::Particle with vtkm::Massless 2020-07-21 11:14:31 -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
Kenneth Moreland
502c310cf8 Merge topic 'deprecate-arrayhandlevirtualcoordinates'
c689a68c5 Suppress bad deprecation warnings in MSVC
a3f23a03b Do not cast to ArrayHandleVirtual in VariantArrayHandle::CastAndCall
f6b13df51 Support coordinates of both float32 and float64
453e31404 Deprecate ArrayHandleVirtualCoordinates
be7f06bbe CoordinateSystem data is VariantArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2177
2020-07-16 17:25:43 -04:00
Kenneth Moreland
a663514044 Merge topic 'filter-benchmark-help'
fbeea75f3 Print out all options to BenchmarkFilters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Vicente Bolea <vicente.bolea@kitware.com>
Merge-request: !2176
2020-07-16 13:45:35 -04:00
Ben Boeckel
882832db6f Merge topic 'gitlab-ci-doxygen-to-site'
ca91cdee4 gitlab-ci: upload doxygen docs to the public website
09973e66f gitlab-ci: use the keyfile directly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2183
2020-07-16 12:57:44 -04:00
Sujin Philip
f88bccde08 Merge topic 'update-to-latest-diy'
c35323ae4 Merge branch 'upstream-diy' into update-to-latest-diy
ec6fef447 diy 2020-07-15 (4ea1241e)
78221a09e Update diy tag name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2182
2020-07-16 10:48:16 -04:00
Li-Ta Lo
760c51ed62 install ThreadIndicesNeighborhood.h 2020-07-16 08:06:17 -06:00
Ben Boeckel
ca91cdee44 gitlab-ci: upload doxygen docs to the public website
It had been copied to a runner-local directory and then dropped.
2020-07-16 09:30:43 -04:00
Ben Boeckel
09973e66f9 gitlab-ci: use the keyfile directly 2020-07-16 09:30:27 -04:00
Li-Ta Lo
e52b8fa88a Add CellNeighborhood 2020-07-15 14:41:32 -06:00
Sujin Philip
c35323ae42 Merge branch 'upstream-diy' into update-to-latest-diy
* upstream-diy:
  diy 2020-07-15 (4ea1241e)
2020-07-15 15:36:03 -05:00
Diy Upstream
ec6fef4472 diy 2020-07-15 (4ea1241e)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit 4ea1241e7d9d4f20b6f359dcfec1d52d3ad50bde (for/vtk-m-20200715-master).
2020-07-15 15:36:03 -05:00
Sujin Philip
78221a09ed Update diy tag name 2020-07-15 15:35:48 -05:00
Kenneth Moreland
a08b3ac018 Merge topic 'array-portal-value-ref-error'
ea340ed9c Fix UnitTestArrayPortalValueReference

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2180
2020-07-15 08:29:09 -04:00
Kenneth Moreland
c689a68c5c Suppress bad deprecation warnings in MSVC
The Microsoft compiler has this annoying and stupid behavior where if
you have a generic templated method/function and that method is
instantiated with a deprecated class, then the compiler will issue a
C4996 warning even if the calling code is suppressing that warning
(because, for example, you are implementing other deprecated code and
the use is correct). There is no way around this other than suppressing
the warnings for all uses of the templated method.
2020-07-14 16:25:04 -06:00
Kenneth Moreland
ea340ed9cb Fix UnitTestArrayPortalValueReference
A recent change to the continuous integration setup has caused
`UnitTestArrayPortalValueReference` to fail on one platform.

The problem was that the test was doing two unsafe things with the
right-shift assignment operator. The first unsafe thing was using itself
as the operand.

```cpp
  ref >>= ref;
```

This causes clang to give a "self assign overload" warning. Using a
variable as its own operand for a compute assign operation isn't great
style, but for some operations it can cause weird errors. The reason for
the warning is that for a true integer shift operation, the compiler
will recognize that the result should be 0. So, when using this on base
integer types, you will get 0. But overloads can give you something
different, so that might lead to unexpected results. Because we _are_
using an overload (for the `ArrayPortalValueReference` class), the
compiler tells us we can get potentially unexpected results.

OK. That seems like something we can safely ignore (and were ignoring
for some time). After all, the whole point of the
`ArrayPortalValueReference` operators is to behave exactly the same as
the values they wrap. That brings us to the second unsafe thing the test
was doing: using an invalid value as the right hand operation. And this
is where things get weird.

The test was specifically failing when being run on `Int32`. It was
setting the underlying value for `ref` to be `1000` to start with. So
the expression `ref >>= ref` was trying to right shift `ref` by 1000
bits. Logically, this should of course give you 0. However, shifting a
number by more bits than exist causes undefined behavior (c.f.
https://wiki.sei.cmu.edu/confluence/display/c/INT34-C.+Do+not+shift+an+expression+by+a+negative+number+of+bits+or+by+greater+than+or+equal+to+the+number+of+bits+that+exist+in+the+operand).
You might not get back the expected value, and this is exactly what was
happening.

What I think happened was that the compiler determined that any valid
shift would be contained in 5 bits, so it truncated the value (1000) to
the least signifcant 5 bits (which happens to be 8). It then shifted
1000 by 8 and got the value 3 instead of 0.

The fix picks an operand number that is sure to be valid.
2020-07-14 16:13:12 -06:00
Kenneth Moreland
a3f23a03b6 Do not cast to ArrayHandleVirtual in VariantArrayHandle::CastAndCall
We are moving to deprecate `ArrayHandleVirtual`, so we are removing the
feature where `VariantArrayHandle::CastAndCall` automatically casts to
an `ArrayHandleVirtual` if possible.

The big reason to make this change now (as opposed to later when
`ArrayHandleVirtual` is deprecated) is to improve compile times.
This prevents us from having to compile an extra code path using
`ArrayHandleVirtual`.
2020-07-14 08:53:03 -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
453e314044 Deprecate ArrayHandleVirtualCoordinates
We are in the process of deprecating virtual classes in VTK-m
(that run in the execution environment).
2020-07-14 08:51:47 -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
Dave Pugmire
e66986dabe Merge topic 'worldAnnotationsOptional'
cabaf3e26 Add option to enable/disable world annotations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !2175
2020-07-14 10:19:48 -04:00
Robert Maynard
29bac212c7 Merge topic 'extrude-fix'
a428d75e0 adding CellSetExtrude to DefaultTypesVTK
235d9ce14 add GetThreadIndex to ThreadIndicesExtrude classes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2172
2020-07-13 14:24:58 -04:00
Kenneth Moreland
fbeea75f32 Print out all options to BenchmarkFilters
Previously, if you used the `--help` option, you would get VTK-m's
initialize options and Google benchmark's options, but you would not get
the special options for the algorithms in this benchmark. Now, all the
potential options should be printed when `--help` is added to the
command line.
2020-07-13 10:20:19 -06:00
dpugmire
cabaf3e269 Add option to enable/disable world annotations. 2020-07-09 14:38:39 -04:00
Sujin Philip
b32cc894b6 Merge topic 'fix-gitlab-ci'
2f7ae83c9 Fix warnings
e67fc619c Fix setting build type in gitlab ci

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2171
2020-07-09 14:38:32 -04:00
Kenneth Moreland
e2027da0c3 Merge topic 'write-uniform-rectilinear'
058927c82 Write uniform and rectilinear grids to legacy VTK files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2173
2020-07-09 10:53:20 -04:00
Sujin Philip
2f7ae83c9f Fix warnings 2020-07-09 08:10:54 -05:00
Kenneth Moreland
85bdc030ba Merge topic 'fix-multiplexer-cuda'
18b5be92d Fix issue with CUDA and ArrayHandleMultiplexer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2168
2020-07-09 08:25:55 -04:00
Kenneth Moreland
058927c82f Write uniform and rectilinear grids to legacy VTK files
As a programming convenience, all `vtkm::cont::DataSet` written by
`vtkm::io::VTKDataSetWriter` were written as a structured grid. Although
technically correct, it changed the structure of the data. This meant that
if you wanted to capture data to run elsewhere, it would run as a different
data type. This was particularly frustrating if the data of that structure
was causing problems and you wanted to debug it.

Now, `VTKDataSetWriter` checks the type of the `CoordinateSystem` to
determine whether the data should be written out as `STRUCTURED_POINTS`
(i.e. a uniform grid), `RECTILINEAR_GRID`, or `STRUCTURED_GRID`
(curvilinear).
2020-07-08 19:12:14 -06:00
Sujin Philip
e67fc619c9 Fix setting build type in gitlab ci 2020-07-08 15:08:04 -05:00
Caitlin Ross
a428d75e02 adding CellSetExtrude to DefaultTypesVTK 2020-07-08 14:51:41 -04:00
Caitlin Ross
235d9ce14b add GetThreadIndex to ThreadIndicesExtrude classes 2020-07-08 14:51:41 -04:00
Kenneth Moreland
d5fd24fe13 Merge topic 'fix-allocate-token-deadlock'
cbf986891 Fix potential deadlock in ArrayHandle::PrepareForOutput

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2170
2020-07-08 13:47:04 -04:00
Sujin Philip
1e36ef1407 Merge topic 'enable-game-of-life'
8c3c138bb Enable the Game of Life example back

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2169
2020-07-08 08:57:23 -04:00
Kenneth Moreland
cbf9868915 Fix potential deadlock in ArrayHandle::PrepareForOutput
`ArrayHandle::PrepareForOutput` often has to reallocate the array to the
specified size. Previously, this allocation was not happening with the
`Token` that is passed to `PrepareForOutput`. If the `ArrayHandle` is
already attached or enqueued for that `Token`, then the allocation would
deadlock.

You can now pass a `Token` object to `Allocate`, which is what
`PrepareForOutput` does.
2020-07-07 18:30:38 -06:00
Kenneth Moreland
18b5be92d6 Fix issue with CUDA and ArrayHandleMultiplexer
When you try to call the `Reduce` operation in the CUDA device adapter
with a sufficently complex interator type, you get a compile error
that says `error: cannot pass an argument with a user-provided
copy-constructor to a device-side kernel launch`.

This appears to be a bug in either nvcc or Thrust. I believe it is
related to the following reported issues:

* https://github.com/thrust/thrust/issues/928
* https://github.com/thrust/thrust/issues/1044

Work around this problem by making a special condition for calling
`Reduce` with an `ArrayHandleMultiplexer` that calls the generic
algorithm in `DeviceAdapterAlgorithmGeneral` instead of the algorithm in
Thrust.
2020-07-06 13:51:36 -06:00
Sujin Philip
8c3c138bb9 Enable the Game of Life example back
It was commented out by accident in a previous commit.
2020-07-06 12:25:42 -05:00
Robert Maynard
60339bffe6 Merge topic 'update_diy_to_always_build_with_pic'
749a110cd Merge branch 'upstream-diy' into update_diy_to_always_build_with_pic
b0895eca9 diy 2020-07-01 (b0623438)
5a2a26d3f Update DIY to make sure we always build diy libs with pic enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !2166
2020-07-01 12:58:04 -04:00
Diy Upstream
b0895eca99 diy 2020-07-01 (b0623438)
Code extracted from:

    https://gitlab.kitware.com/third-party/diy2.git

at commit b06234388ebf398dcbd8e397fe0ba9e69f67ef35 (for/vtk-m-20200701-master).
2020-07-01 10:48:43 -04:00
Robert Maynard
749a110cd0 Merge branch 'upstream-diy' into update_diy_to_always_build_with_pic
* upstream-diy:
  diy 2020-07-01 (b0623438)
2020-07-01 10:48:43 -04:00
Robert Maynard
5a2a26d3fc Update DIY to make sure we always build diy libs with pic enabled 2020-07-01 10:48:18 -04:00