Commit Graph

8092 Commits

Author SHA1 Message Date
Robert Maynard
5fe6c36fa2 vtkm::AtomicLoad should only occur on non-const values
Previously vtk-m allowed users to issue atomic loads on constant
values which is problematic for the following reasons:

 - can be a source of undefined behavior
 - not supported by kokkos

This issue was detected when using kokkos HIP atomic implementation
2020-10-09 14:20:21 -04:00
Li-Ta Lo
ec6b2bc7fb Merge topic 'concurrent_union_find'
268a07bb0 remove test on large graph and sample data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2278
2020-10-08 15:38:07 -04:00
Li-Ta Lo
268a07bb06 remove test on large graph and sample data 2020-10-08 13:26:46 -06:00
Vicente Bolea
3ea0761a9d Merge topic 'fix-540-benchmarkfilters-crash'
a290de5bc BenchmarkFilters: adds unstructured Dataset for some filters

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2196
2020-10-07 21:41:18 -04:00
Vicente Adolfo Bolea Sanchez
a290de5bcc BenchmarkFilters: adds unstructured Dataset for some filters
- It also remove termination on bench error
- It disables passing fields in Countour to skip an error.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-10-07 18:46:36 -04:00
Li-Ta Lo
2b0960f279 Merge topic 'concurrent_union_find'
932f8b82f Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find
eaff27195 minor changes on comments on findRoot()
9fef540ba minor changes on comments on findRoot()
916661e33 Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find
a036b0f98 Minor change based on code review.
9e68022ac Minor change based on code review.
1185f70bc Data Race Resolution
aed7e02da Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2248
2020-10-07 17:48:30 -04:00
Li-Ta Lo
932f8b82f0 Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find 2020-10-07 15:46:17 -06:00
Li-Ta Lo
eaff271950 minor changes on comments on findRoot() 2020-10-07 15:09:12 -06:00
Li-Ta Lo
9fef540ba7 minor changes on comments on findRoot() 2020-10-07 14:25:52 -06:00
Li-Ta Lo
916661e33e Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find 2020-10-07 14:24:24 -06:00
Li-Ta Lo
a036b0f980 Minor change based on code review. 2020-10-07 14:23:40 -06:00
Li-Ta Lo
9e68022acc Minor change based on code review. 2020-10-07 14:12:27 -06:00
Li-Ta Lo
1185f70bc9 Data Race Resolution
Finished the comments on data races and their resolution.
2020-10-07 11:56:02 -06:00
Li-Ta Lo
aed7e02da9 Merge branch 'concurrent_union_find' of gitlab.kitware.com:ollielo/vtk-m into concurrent_union_find 2020-10-06 13:42:17 -06:00
Li-Ta Lo
3c7aa34267 Remove duplicate code in ImageConnectivity.h and GraphConnectivity.h 2020-10-06 13:38:59 -06:00
Dave Pugmire
1b2623664b Merge topic 'virtual-less-particle'
303520ad4 Remove virtuals from vtkm::Particle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !2273
2020-10-06 15:09:28 -04:00
Dave Pugmire
303520ad48 Remove virtuals from vtkm::Particle 2020-10-06 13:25:26 -04:00
Kenneth Moreland
757766431b Merge topic 'variant-is-trivial'
4a7aae86f Allow Variant to be trivial

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2265
2020-10-06 10:43:08 -04:00
Li-Ta Lo
43aa21df40 Merge branch 'master' into concurrent_union_find 2020-10-05 09:28:31 -06:00
Kenneth Moreland
a653fb93ed Merge topic 'rename-2-level-locators'
b012c42be Rename CellLocatorUniformBins to CellLocatorTwoLevel
c9b763aca Rename PointLocatorUniformGrid to PointLocatorSparseGrid

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2264
2020-09-25 18:03:28 -04:00
Robert Maynard
76562a2dca Merge topic 'disable_assert_when_using_hip'
9bd6f3e6d Disable VTKM_ASSERT when using HIP
68b5edfcb VTK-m defines VTKM_EXEC / VTKM_EXEC_CONT when compiling with HIP

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2270
2020-09-25 15:33:25 -04:00
Robert Maynard
9bd6f3e6da Disable VTKM_ASSERT when using HIP 2020-09-25 11:06:57 -04:00
Robert Maynard
68b5edfcba VTK-m defines VTKM_EXEC / VTKM_EXEC_CONT when compiling with HIP 2020-09-25 11:06:34 -04:00
Robert Maynard
8f6f52f7d6 Merge topic 'first_round_of_vtkm_changes_needed_for_hip'
d0c9fb274 Correct missing `VTKM_EXEC_CONT` in UnitTestArrayHandleExtrude
1365cfa9e Update ConnectivityExtrude to follow clangs rules on markup
09df45bb1 Update vtkm/Geometry.hxx to follow clangs rules on function markup
461616a77 Refactor some VTK-m device adapter to be alphabetical

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2268
2020-09-25 10:31:14 -04:00
Robert Maynard
d0c9fb2741 Correct missing VTKM_EXEC_CONT in UnitTestArrayHandleExtrude 2020-09-25 09:37:46 -04:00
Robert Maynard
1365cfa9ec Update ConnectivityExtrude to follow clangs rules on markup 2020-09-25 09:37:46 -04:00
Robert Maynard
09df45bb19 Update vtkm/Geometry.hxx to follow clangs rules on function markup 2020-09-25 09:37:46 -04:00
Robert Maynard
461616a771 Refactor some VTK-m device adapter to be alphabetical 2020-09-24 09:10:03 -04:00
Robert Maynard
1fbbc43f19 Merge topic 'correct_deprecated_macro_location'
2278fdfd9 Deprecation macro has to come before VTKM_EXEC or VTKM_EXEC_CONT

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2266
2020-09-23 17:29:49 -04:00
Robert Maynard
2278fdfd94 Deprecation macro has to come before VTKM_EXEC or VTKM_EXEC_CONT
This order is needed by CUDA-clang and HIP-clang compilers
2020-09-23 10:02:37 -04:00
Kenneth Moreland
4a7aae86f9 Allow Variant to be trivial
Although `vtkm::internal::Variant` respected the trivially copyable
attribute of the types it contains, it was never totally trivial (i.e.
`std::is_trivial<Variant<...>>` was never true). The reason was that
`Variant` was initializing its `Index` parameter to signify that it was
not initialized. However, the fact that `Index` was initialized meant
that it was not trivially constructed.

Now, `Variant` type checks its types to see if they are all trivially
constructible. If so, it makes itself trivially constructible.

This means that `Index` may or may not be valid if `Variant` is
constructed without an argument. This in turn means that the result of
`Variant::IsValid` becomes undefined. That should be OK in practice.
`Index` will "point" to an uninitialized object, but that object is
trivially constructed anyway. However, that could cause problems if
developers used `IsValid` to determine if something is selected.
2020-09-22 16:22:37 -06:00
Kenneth Moreland
819d5f043b Merge topic 'refactor/exterminate-row-col-slice'
1074c0172 Commented out incomplete code creating a warning
ce0aa1cf9 Fix compile errors
edd71539c Fix compile error due to renamed includes
33a7f5610 Added missing this-> for data members
b443fb500 Added note for future reference during API refactoring
b6343c049 Applied Ken Moreland's suggested fix to avoid copy
af697e452 Use std::swap instead of manual swap
8489a69c3 Fixed missing invoker compile error
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2263
2020-09-22 11:16:54 -04:00
Kenneth Moreland
b012c42beb Rename CellLocatorUniformBins to CellLocatorTwoLevel
The new name is more descriptive and prevents confusion with
CellLocatorUniformGrid.
2020-09-21 15:42:47 -06:00
Kenneth Moreland
c9b763aca9 Rename PointLocatorUniformGrid to PointLocatorSparseGrid
The new name reflects better what the underlying algorithm does. It also
helps prevent confusion about what types of data the locator is good
for. The old name suggested it only worked for structured grids, which
is not the case.
2020-09-21 15:42:41 -06:00
Gunther H. Weber
1074c0172b Commented out incomplete code creating a warning 2020-09-18 06:33:09 -07:00
Gunther H. Weber
ce0aa1cf94 Fix compile errors 2020-09-17 05:42:41 -07:00
Gunther H. Weber
edd71539c9 Fix compile error due to renamed includes 2020-09-17 05:39:14 -07:00
Gunther H. Weber
33a7f5610d Added missing this-> for data members 2020-09-16 12:42:30 -07:00
Gunther H. Weber
b443fb500e Added note for future reference during API refactoring 2020-09-16 12:36:14 -07:00
Gunther H. Weber
b6343c049c Applied Ken Moreland's suggested fix to avoid copy 2020-09-16 12:36:08 -07:00
Gunther H. Weber
af697e4527 Use std::swap instead of manual swap 2020-09-15 13:46:11 -07:00
Gunther H. Weber
8489a69c39 Fixed missing invoker compile error 2020-09-15 12:55:24 -07:00
Gunther H. Weber
991f7a85ad Refactor mesh classes: switch from row/col/slice to vtkm::Id2/Id3 2020-09-15 11:15:27 -07:00
Kenneth Moreland
d00071b4e1 Merge topic 'no-colortable-hxx'
2e918c58d Move ColorTable mapping to its own header
38bdfec40 Move ColorTable::Sample methods to vtkm_cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2262
2020-09-15 08:39:53 -04:00
Kenneth Moreland
2e918c58dc Move ColorTable mapping to its own header
We would really like to be able to include `vtkm::cont::ColorTable` in
such a way that you don't have to compile device code (unless you are
actually compiling functions for the device). Thus, the `Map` functions
of `ColorTable` were in a special `ColorTable.hxx` that contains the
"implementation" for `ColorTable`.

That is confusing to many users. It is more clear to simply have `.h`
headers that do a specific thing. To achieve these two goals, the `Map`
functionality of `ColorTable` is separated out into its own header file.
So you don't need to be using a device compiler just to use `ColorTable`
(including `ColorTable.h`), but you do need to use a device compiler if
mapping values to colors (including `ColorTableMap.h`).
2020-09-14 16:40:26 -06:00
Kenneth Moreland
38bdfec40a Move ColorTable::Sample methods to vtkm_cont
There is little value to declare them `inline`. Instead, just have them
compiled once in the `vtkm_cont` library.
2020-09-14 16:40:26 -06:00
Kenneth Moreland
0457427ed7 Merge topic 'color-table-no-virtual'
6a3ba4291 Fix warning about unused function
c6a4f9b79 Fix warning about return value
9465d2611 Adjust TransferFunction worklet to get color table as ExecObj argument
11996f133 Remove virtual methods from ColorTable

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2261
2020-09-14 17:56:51 -04:00
Kenneth Moreland
6a3ba4291b Fix warning about unused function 2020-09-14 15:26:43 -06:00
Kenneth Moreland
c6a4f9b79c Fix warning about return value 2020-09-14 15:04:03 -06:00
Kenneth Moreland
9465d26110 Adjust TransferFunction worklet to get color table as ExecObj argument
Previously, the `TransferFunction` worklet required you to call
`PrepareForExecution` on the `ColorTable` and give that to the
constructor. Bad things can happen if the `ColorTable` used in the
constructor does not match the device the worklet actually gets invoked
on. Change this to make the `ColorTable` a worklet argument of type
`ExecObj`. The dispatcher will automatically call
`ColorTable::PrepareForInput` and guarantee that the devices match.
2020-09-14 13:38:25 -06:00