Commit Graph

6924 Commits

Author SHA1 Message Date
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
Sujin Philip
d7b2fec447 Fix reading of string arrays 2021-05-17 09:51:12 -04:00
Kenneth Moreland
e0abb39810 Unify common storage types
The list defining the common storage types was defined in
DefaultTypes.h.in. The problem was that derived default types could not
just add their own type. They had to redefine the whole list.

Instead, move the list to StorageList.h. Also updated
DefaultTypesVTK.h.in to use this list when using XGC. This enables
ArrayHandleSOA for this case.
2021-05-13 08:18:33 -06:00
Nickolas Davis
c4117ede8a Merge topic 'prefix-cmd-line-args'
968c66f94 add TODO to update kokkos initialize
18d7827db update vtkm test arguments
5fa8734bb update vtkm initialize flags to have 'vtkm' prefix and deprecate old flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <morelandkd@ornl.gov>
Merge-request: !2456
2021-05-12 09:57:47 -04:00
Sujin Philip
7972070d7c PartitionedDataSet GetField should be const 2021-04-30 16:27:58 -04:00
nadavi
968c66f949 add TODO to update kokkos initialize 2021-04-29 00:58:50 +00:00
nadavi
18d7827db7 update vtkm test arguments 2021-04-29 00:58:50 +00:00
nadavi
5fa8734bbc update vtkm initialize flags to have 'vtkm' prefix and deprecate old flags 2021-04-29 00:58:50 +00:00
Kenneth Moreland
8eed21d085 Do not declare headers for virtual classes that are removed 2021-04-28 15:28:06 -06:00
Kenneth Moreland
cb3bb43ff9 Completely deprecate virtual methods
Deprecate `VirtualObjectHandle` and all other classes that are used to
implement objects with virtual methods in the execution environment.

Additionally, the code is updated so that if the
`VTKm_NO_DEPRECATED_VIRTUAL` flag is set none of the code is compiled at
all. This opens us up to opportunities that do not work with virtual
methods such as backends that do not support virtual methods and dynamic
libraries for CUDA.
2021-04-28 07:28:32 -06:00
Kenneth Moreland
e3e1a76072 Disable deprecation for MSVC 2017
Although technically supported, this version of the visual studio likes
to put the warnings where templates are defined (rather than
instantiated). That makes it impossible to suppress a warning when, for
example, when a deprecated class is legitmately used in an std template
to implement other deprecated functionality.

To prevent this, disable deprecations on MSVC compilers before 2019. I
doubt any developers are using this compiler anywhere but the dashboard,
and the warnings should legitimately appear elsewhere.
2021-04-26 12:47:44 -06:00
Li-Ta Lo
e763873739 explicitly cast cell set to structured 3D to supress warnings 2021-04-23 09:48:29 -06:00
Nick Thompson
25c14a7ea9 Fix uninitialized variable warning on gcc-10.3 2021-04-21 16:31:31 +00:00
Nick Thompson
9f1ef651c4 Update UnitTestError.cxx 2021-04-16 17:46:43 +00:00
Nick Thompson
9d46f7981d Merge topic 'print_particle'
7e7d41a73 Make sure to #include<ostream>
dee5d209d Overload stream operator to print vtkm::Particle.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2479
2021-04-15 10:14:43 -04:00
Kenneth Moreland
237aff05e6 Merge topic 'rendering-mesh-conn-no-virtual'
6b144abe4 Remove virtual methods from MeshConnectivity in rendering

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2464
2021-04-15 10:09:24 -04:00
Nick Thompson
7e7d41a730 Make sure to #include<ostream> 2021-04-15 09:19:55 -04:00
Nick Thompson
dee5d209d4 Overload stream operator to print vtkm::Particle. 2021-04-15 08:36:53 -04:00
Nick Thompson
82361fc45e Better message on failure for DifferenceOfProducts. 2021-04-13 19:09:55 -04:00
Nick Thompson
384fea5ced Make sure arguments are placed in correct order. 2021-04-13 16:00:23 -04:00
Nick Thompson
cddb6f7b6d Do not flush the stream when you're just going to convert it to string. 2021-04-13 14:37:20 -04:00
Nick Thompson
794872eb07 Fix error in unit test. 2021-04-13 11:21:42 -04:00
Nick Thompson
76877b7982 Merge topic 'speed_up_tests'
021c3ff86 Print additional information on failure to facilitate debugging.
36b8c0d2a Merge branch 'speed_up_tests' of gitlab.kitware.com:NAThompson/vtk-m into speed_up_tests
9d6b73275 Use better variable names.
4133e40c0 Remove printing of expected errors.
eb760e04e Revert removal of print statements.
e7c075b5c Remove unused variable.
cb83b8179 Save another 10 seconds.
b0c2bc9d6 Ignore computationTime.
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2465
2021-04-13 10:07:50 -04:00
Li-Ta Lo
40c1b9d717 Merge topic 'particle_density'
148cad2ce Merge branch 'master' into particle_density
7bebc1c49 Disable passing input scalar field

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2471
2021-04-13 09:21:57 -04:00
Nick Thompson
021c3ff86d Print additional information on failure to facilitate debugging. 2021-04-13 09:08:52 -04:00
Nick Thompson
9d6b732750 Use better variable names. 2021-04-12 18:51:53 -04:00
Nick Thompson
4133e40c06 Remove printing of expected errors. 2021-04-12 18:51:53 -04:00
Nick Thompson
eb760e04ef Revert removal of print statements. 2021-04-12 18:51:53 -04:00
Nick Thompson
e7c075b5c4 Remove unused variable. 2021-04-12 18:51:53 -04:00
Nick Thompson
cb83b81793 Save another 10 seconds. 2021-04-12 18:51:52 -04:00
Nick Thompson
b0c2bc9d61 Ignore computationTime. 2021-04-12 18:51:52 -04:00
Nick Thompson
dc89c79fdc Remove unused variable. 2021-04-12 18:51:52 -04:00
Nick Thompson
be2ad7dd4b Speed up bounding interval hierarchy test. 2021-04-12 18:51:52 -04:00
Nick Thompson
bdc73333c9 Speed up UnitTestMath. 2021-04-12 18:51:52 -04:00
Nick Thompson
1b11348cc3 Reduce data size to operate on in unit tests. 2021-04-12 18:51:52 -04:00
Nick Thompson
14ccd6d98f Speed up particle density unit test. 2021-04-12 18:51:51 -04:00
Nick Thompson
134c6c3d4e Speed up CellLocator tests. 2021-04-12 18:51:51 -04:00
Nick Thompson
33993db2df Reduce runtime of unit tests. 2021-04-12 18:51:51 -04:00
Kenneth Moreland
6b144abe41 Remove virtual methods from MeshConnectivity in rendering
Virtual methods were used in the `MeshConnectivity` classes for the
internal ray casting system. However, using virtual methods in the
execution environment is being deprecated.

This change replaces the virtual object with an object containing a
`Variant`. The `Variant` holds one of the supported mesh connectivities
and selects the correct one at runtime rather than jumping into a
virtual method.
2021-04-12 15:53:36 -06:00
Nick Thompson
e64a3ce4d4 Merge topic 'add_func_2'
ff4ad96ef Do not print extra information on Kokkos and CUDA.
321571fab Make sure operator precedence is correct over macro invocation.
94a32bf64 Improve code in response to review.
568c0b5d2 Small formatting changes.
a8e25da0a Add __func__ to unit test metadata printed on failure.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2469
2021-04-12 17:53:04 -04:00
Li-Ta Lo
148cad2ce5 Merge branch 'master' into particle_density 2021-04-12 15:32:04 -06:00
Li-Ta Lo
7bebc1c497 Disable passing input scalar field
Inherit from FilterDataSetWithField and implemented a trivial
DoMapField whcih just return fales.
2021-04-12 14:31:27 -06:00
Nick Thompson
ff4ad96efc Do not print extra information on Kokkos and CUDA. 2021-04-12 15:01:07 -04:00
Nick Thompson
321571fabe Make sure operator precedence is correct over macro invocation. 2021-04-12 13:50:27 -04:00
Vicente Adolfo Bolea Sanchez
ff84915bc3 Merge branch 'upstream-diy' into fix-use-c++14-in-every-target
# By Diy Upstream
* upstream-diy:
  diy 2021-04-12 (bc7dcda5)
2021-04-12 13:45:01 -04:00
Nick Thompson
94a32bf64c Improve code in response to review. 2021-04-12 13:42:19 -04:00
Vicente Adolfo Bolea Sanchez
f60a45bc63 Enforce C++14 in the whole project
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2021-04-12 13:29:46 -04:00
Nick Thompson
568c0b5d29 Small formatting changes. 2021-04-12 13:05:36 -04:00
Nick Thompson
a8e25da0ab Add __func__ to unit test metadata printed on failure. 2021-04-12 12:54:38 -04:00
Kenneth Moreland
49d6200413 Merge topic 'deprecate-variant-array-handle'
14839a032 Fix deprecation warnings with MSVC
5510521a0 Fix VariantArrayHandle::AsVirtual with cast arrays
25e6daf93 Add changelog for depreciating VariantArrayHandle
b4ef9fcac Fix UnknownArrayHandle::CastAndCall for special arrays
68f39b86a Deprecate VariantArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !2459
2021-04-12 10:15:08 -04:00
Nick Thompson
d4ead2d767 Remove superfluous subbraces. 2021-04-08 16:23:42 -04:00
Nick Thompson
a7ecd30cdd Commute #ifdef with braces to make clang-format happy. 2021-04-08 16:23:42 -04:00
Nick Thompson
dd8863637a Return a vec<T,2> rather than a vtkm::Pair<T,T>. 2021-04-08 16:23:42 -04:00
Nick Thompson
91bec19e97 Additional comments and fix typo in unit test. 2021-04-08 16:23:42 -04:00
Nick Thompson
6f9515aa94 Quadratic roots to 3 ulps. 2021-04-08 16:23:42 -04:00
Kenneth Moreland
14839a0325 Fix deprecation warnings with MSVC 2021-04-08 09:28:03 -06:00
Kenneth Moreland
5510521a06 Fix VariantArrayHandle::AsVirtual with cast arrays
The both the underlying `UnknownArrayHandle` and `ArrayHandleVirtual`
handle `ArrayHandleCast` specially. This caused problems when passing an
`ArrayHandleCast` to `VariantArrayHandle::AsVirtual`. Solve the problem
by stripping out the cast storage tags and letting these classes handle
it internally.

It's annoying to have to fix a problem in a method of a deprecated class
that returns another class that is deprecated for a different reason. No
one should really be running this.
2021-04-08 09:21:39 -06:00
Kenneth Moreland
b4ef9fcac3 Fix UnknownArrayHandle::CastAndCall for special arrays
`UnknownArrayHandle` treats a `ArrayHandleCast` and
`ArrayHandleMultiplexer` special. When you put one of these arrays in an
`UnknownArrayHandle`, it takes the original array out and stores it. If
you try to take an array of that type out, it will again do the proper
conversion.

The only problem is that if you use `IsType`, the result can be
unexpected. This is what happened with `CastAndCall`, which was using
`IsType` internally. Changed that to `CanConvert` to properly get the
array handle out.
2021-04-07 16:12:42 -06:00
Kenneth Moreland
68f39b86a8 Deprecate VariantArrayHandle
`VaraintArrayHandle` has been replaced by `UnknownArrayHandle` and
`UncertainArrayHandle`. Officially make it deprecated and point users to
the new implementations.
2021-04-07 16:12:38 -06:00
Nickolas Davis
21b36a6429 Merge topic 'rename-algorithms'
1c9ae402b Deprecate vtkm/BinarySearch.h, it is unused and similar to LowerBound
26d9ecb39 split vtkm/Algorithms.h into UpperBound.h, LowerBound.h, and BinarySearch.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2455
2021-04-07 17:08:34 -04:00
Li-Ta Lo
f2a4361c03 Merge topic 'alpine_sampling_2d'
ed8d2fb35 Merge branch 'master' into alpine_sampling_2d
93b8ee97d Pasing range explicitly to NDHistogram worklet for ALPINE 2D sampling milestone

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !2257
2021-04-07 16:10:09 -04:00
nadavi
1c9ae402b0 Deprecate vtkm/BinarySearch.h, it is unused and similar to LowerBound 2021-04-07 19:10:28 +00:00
nadavi
26d9ecb398 split vtkm/Algorithms.h into UpperBound.h, LowerBound.h, and BinarySearch.h 2021-04-07 18:53:09 +00:00
nadavi
7f86a16b37 add missing include 2021-04-07 17:54:34 +00:00
Nick Thompson
b00f5b4430 Merge topic 'diff_of_products'
068399b81 Fix build errors on Windows and compiler warnings on Ubuntu.
8d54138d3 Kahan's difference of products algorithm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2460
2021-04-07 09:11:44 -04:00
Nick Thompson
068399b817 Fix build errors on Windows and compiler warnings on Ubuntu. 2021-04-07 08:09:39 -04:00
Nick Thompson
8d54138d3e Kahan's difference of products algorithm 2021-04-05 15:20:56 -04:00
Kenneth Moreland
294a30fd7e Check that all execution objects are trivially copyable
When the dispatcher does it's "transport" phase, it returns an
"execution object", but this object is held in the control environment
(on the host) although it may point to resources in the execution
environment (on the device). For this object to get from host to device,
it must be trivially copyable. If it is not, compile and/or runtime
errors could occur. So force this condition with a static assert.
2021-04-02 07:37:26 -06:00
Kenneth Moreland
3813fb515c Make ArrayPortalRecombineVec trivially copyable
Using this internal class is a bit tricky because it requires a pointer
to a C array that is expected to contain portals. Both the C array and
the portals must be defined for the expected device. This is already
handled by the associated Storage. Assuming all of this holds, make sure
the `ArrayPortalRecombineVec` is trivially copyable. This is a
requirement for passing objects to the execution environment.
2021-04-02 07:37:26 -06:00
Kenneth Moreland
2bd4805fe0 Merge topic 'variant-safe-punning2'
6921b5cc3 Minor style changes in UnitTestVariant
6ccb32d27 Slight comment changes
647bc94fe Reduce the number of lines required to implement Variant::CastAndCall
991eeba9f Reduce the number of lines required to implement VariantUnion
7607736ef Reduce the number of lines required to implement AllTrivially*
9816c422b Add padding to Grid struct in CellLocatorTwoLevel
e480fd7a2 Support copying a Variant to itself
d2d9ba332 Make connectivity structures trivially copyable
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2444
2021-04-01 18:04:30 -04:00
Kenneth Moreland
6921b5cc3d Minor style changes in UnitTestVariant 2021-04-01 14:47:51 -06:00
Kenneth Moreland
6ccb32d27b Slight comment changes 2021-03-31 14:35:06 -06:00
Nickolas Davis
46c2af2997 Merge topic 'remove-render-annotations'
a683a8802 add support for removing annotations and remove from regression tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !2433
2021-03-31 15:38:56 -04:00
nadavi
a683a8802a add support for removing annotations and remove from regression tests 2021-03-31 17:08:46 +00:00
Kenneth Moreland
647bc94fed Reduce the number of lines required to implement Variant::CastAndCall 2021-03-31 09:49:40 -06:00
Kenneth Moreland
991eeba9f3 Reduce the number of lines required to implement VariantUnion 2021-03-30 14:35:44 -06:00
Kenneth Moreland
7607736ef4 Reduce the number of lines required to implement AllTrivially* 2021-03-30 14:05:53 -06:00
Kenneth Moreland
9816c422b1 Add padding to Grid struct in CellLocatorTwoLevel
There appears to be a bug in CUDA 9.2 where if you have a class that
contains a struct that itself has to have padding in the middle for
alignment purposes and you then put that class in a union with other
classes, it seems like that padding can cause problems with other
objects in the union.
2021-03-30 12:59:07 -06:00
Kenneth Moreland
e480fd7a24 Support copying a Variant to itself 2021-03-30 12:59:07 -06:00
Kenneth Moreland
d2d9ba3321 Make connectivity structures trivially copyable
It always worked to trivially copy these classes, but the compiler did
not think so because copy constructors were defined. Change these
constructors to be default so that the compler can properly check
triviality.
2021-03-30 12:59:07 -06:00
Kenneth Moreland
cad5dc7b71 Avoid is_trivially_copyable on VariantUnion
For some reason some versions of the CUDA compiler would return true for
`is_trivially_copyable` on a `VariantUnion` even when the types of the
union caused the copy constructor to get deleted.

Solve the problem by using `AllTriviallyCopyable` instead of directly
caling `is_trivially_copyable` on the union.
2021-03-30 12:58:57 -06:00
Kenneth Moreland
cb60401a63 Use specialized class instead of function overload for Variant::Get
Nvcc was having troubles resolving the return type of the overloaded
function to get a value out of a `VariantUnion`. Replace the
implementation with a class with specializations. This is more verbose,
but easier on the compiler.
2021-03-30 10:16:16 -06:00
Kenneth Moreland
c9bcdd0195 Use a union in Variant for safe type punning
Create a `VaraintUnion` that is an actual C++ `union` to store the data
in a `Variant`.

You may be asking yourself, why not just use an `std::aligned_union`
rather than a real union type? That was our first implementation, but
the problem is that the `std::aligned_union` reference needs to be
recast to the actual type. Typically you would do that with
`reinterpret_cast`. However, doing that leads to undefined behavior. The
C++ compiler assumes that 2 pointers of different types point to
different memory (even if it is clear that they are set to the same
address). That means optimizers can remove code because it "knows" that
data in one type cannot affect data in another type. To safely change
the type of an `std::aligned_union`, you really have to do an
`std::memcpy`. This is problematic for types that cannot be trivially
copied. Another problem is that we found that device compilers do not
optimize the memcpy as well as most CPU compilers. Likely, memcpy is
used much less frequently on GPU devices.
2021-03-30 10:16:16 -06:00
Kenneth Moreland
26d5168b4d Fix types used for coordinates in ArrayRangeCompute
Was using scalar types for `ArrayRangeCompute` for storage of types like
Cartesian product. It should be `Vec3` types.
2021-03-30 09:37:34 -06:00
Kenneth Moreland
eadaf06f0c Set what string in Error::SetMessage
`vtkm::cont::Error` inherits from `std::exception`. As such, it has a
special `what` string that reports an error message in a standard way.
This is particularly useful when a `vtkm::cont::Error` exception remains
uncaught because the system will print the `what` string before
crashing.

Unfortunately, the `what` string was only being set in the `Error`
constructor that took a message. That is a problem for subclasses like
`ErrorCuda` that used the default constructor and then used
`SetMessage`. The `what` string did not get set in this case.

Change the behavior to capture the stack trace in the default
constructor and update the `what` string if a subclass uses
`SetMessage`.
2021-03-29 06:04:22 -06:00
Abhishek Yenpure
43400995dd Merge topic 'particle_adv_virtuals_removal'
b316cf58f Fix compiler warnings
5f7287bc1 Removing virtuals from particle advection
2897b7a11 Fix missing include
4c781374c Removing virtuals v1

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2445
2021-03-25 17:26:19 -04:00
Kenneth Moreland
d1dba170e8 Do not use volatile when calling CUDA atomicCAS
Although it makes sense to assume a pointer is `volatile` when doing an
atomic operation, the arguments to the `atomicCAS` overloads take
regular pointers. The overload resolution can fail if you use the
`volatile` keyword.
2021-03-25 10:11:44 -06:00
Nickolas Davis
6f612107d0 Merge topic 'support-subdir-data-folders'
268e882c9 raise allowed num of error pixels a bit
78e3cbb50 Move regression test images into subdirs, implement io library support
d25453165 Implement additional wireframer rendering regression tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2442
2021-03-24 20:15:18 -04:00
nadavi
268e882c97 raise allowed num of error pixels a bit 2021-03-24 22:57:32 +00:00
nadavi
78e3cbb501 Move regression test images into subdirs, implement io library support 2021-03-24 22:57:32 +00:00
Abhishek Yenpure
b316cf58fc Fix compiler warnings 2021-03-24 15:51:26 -07:00
Subhashis Hazarika
ed8d2fb356 Merge branch 'master' into alpine_sampling_2d 2021-03-24 14:08:10 -06:00
Abhishek Yenpure
5f7287bc1b Removing virtuals from particle advection
-- Removing virtuals from CellInterpolationHelpers
2021-03-23 22:27:28 -07:00
Li-Ta Lo
197a9b3ff9 fixed an oversight on the correct way to get CoordinateSystem. 2021-03-23 15:31:55 +00:00
Li-Ta Lo
e95d922408 Merge topic 'particle_density_cic'
508b992cb Merge branch 'particle_density_cic' of gitlab.kitware.com:ollielo/vtk-m into particle_density_cic
056ee7269 fixed another copy paste bug
f71a01b39 Fixed misunderstanding of tolerance.
afe0a3e5f correct uncareful search and replace error
b3c6ea396 install ParticleDensityBase.h
7b8cc401c public CUDA
6796b1a45 consolidate two particle density filters
4a22f54bd Merge branch 'master' into particle_density_cic
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2434
2021-03-23 11:14:57 -04:00
Abhishek Yenpure
2897b7a118 Fix missing include 2021-03-22 23:53:05 -07:00
Abhishek Yenpure
4c781374c2 Removing virtuals v1
-- Remove virtuals from Integrators, Fields, Particles
-- Remaining virtuals are in the CellInterpolationHelpers
2021-03-22 23:00:36 -07:00
Matt Larsen
b64502e22d Merge topic 'identify_xl'
292ac2e4c clang is not is_trivially safe
8e588504f Merge branch 'identify_xl' of gitlab.kitware.com:mclarsen/vtk-m into identify_xl
9c5396394 Merge remote-tracking branch 'upstream/master' into identify_xl
8d8228f36 correct type in comment
4d7a08c18 add xl compiler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2440
2021-03-20 13:00:53 -04:00
Li-Ta Lo
508b992cb4 Merge branch 'particle_density_cic' of gitlab.kitware.com:ollielo/vtk-m into particle_density_cic 2021-03-19 14:39:08 -06:00
Li-Ta Lo
056ee7269c fixed another copy paste bug 2021-03-19 12:48:51 -06:00
Li-Ta Lo
f71a01b39c Fixed misunderstanding of tolerance. 2021-03-19 14:31:01 +00:00
Li-Ta Lo
afe0a3e5fe correct uncareful search and replace error 2021-03-19 08:21:21 -06:00
Li-Ta Lo
b3c6ea396d install ParticleDensityBase.h 2021-03-18 17:07:52 -06:00
Li-Ta Lo
7b8cc401c2 public CUDA 2021-03-18 17:05:22 -06:00
Li-Ta Lo
6796b1a453 consolidate two particle density filters 2021-03-18 16:44:23 -06:00
nadavi
d254531657 Implement additional wireframer rendering regression tests 2021-03-18 16:26:07 +00:00
Li-Ta Lo
4a22f54bdf Merge branch 'master' into particle_density_cic 2021-03-17 17:54:21 -06:00
Li-Ta Lo
8875645da1 Merge topic 'particle_density'
7572699b2 fix compiler warning
f57677081 did I miss more float?
e8d3325d8 use FloatDefault for density
1222ce5f9 override PrepareForExecution
59897dc31 add a missing word
45dd24ad7 reinstitute the counting of particles
d25eb7de7 more doc on the selection of scalar field and DivideByVolume
ff73723f5 fine tune the doc on the filter
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2441
2021-03-17 19:52:13 -04:00
Li-Ta Lo
7572699b22 fix compiler warning 2021-03-17 16:31:57 -06:00
Li-Ta Lo
f57677081b did I miss more float? 2021-03-17 15:06:44 -06:00
Li-Ta Lo
e8d3325d8f use FloatDefault for density 2021-03-17 14:35:24 -06:00
Li-Ta Lo
1222ce5f93 override PrepareForExecution 2021-03-17 10:02:47 -06:00
Li-Ta Lo
59897dc31d add a missing word 2021-03-17 09:08:39 -06:00
Li-Ta Lo
45dd24ad71 reinstitute the counting of particles 2021-03-17 08:51:37 -06:00
Li-Ta Lo
d25eb7de7e more doc on the selection of scalar field and DivideByVolume 2021-03-17 08:00:35 -06:00
Li-Ta Lo
ff73723f51 fine tune the doc on the filter 2021-03-17 07:29:45 -06:00
Li-Ta Lo
ac3ff08238 more documentation, use GetDataAsMultiplexer() 2021-03-16 18:18:20 -06:00
Li-Ta Lo
f2421b4a76 add void 2021-03-16 16:01:59 -06:00
Li-Ta Lo
461f2b03d2 add comments and DivideByVolume as suggested by Ken 2021-03-16 15:54:09 -06:00
Li-Ta Lo
9fbb916a00 Merge topic 'fp_atomics2'
b590a8ebb Add floating point atomics

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@acm.org>
Merge-request: !2438
2021-03-16 14:06:24 -04:00
Nick Thompson
d815493986 Merge topic 'write_cellset_extrude'
b1c0f46ac Response to code review.
4e7d85094 Remove default template argument that breaks build.
4cb661006 Implement GetIndices.
2d35ab05a Write CellSetExtrude as CellSetExplicit.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Dave Pugmire <dpugmire@gmail.com>
Merge-request: !2436
2021-03-12 19:32:55 -05:00
Nick Thompson
b1c0f46ac0 Response to code review. 2021-03-12 21:14:50 +00:00
Nick Thompson
4e7d85094e Remove default template argument that breaks build. 2021-03-12 15:37:32 -05:00
Nick Thompson
4cb661006e Implement GetIndices. 2021-03-12 14:40:27 -05:00
larsen30@llnl.gov
8e588504ff Merge branch 'identify_xl' of gitlab.kitware.com:mclarsen/vtk-m into identify_xl 2021-03-11 13:30:40 -08:00
larsen30@llnl.gov
9c53963946 Merge remote-tracking branch 'upstream/master' into identify_xl 2021-03-11 13:30:28 -08:00
Matt Larsen
8d8228f365 correct type in comment 2021-03-11 21:12:06 +00:00
Matt Larsen
d2d1c854ad Merge topic 'extend_clipping_plane'
786995984 extend the default clipping plane

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2439
2021-03-11 15:43:37 -05:00
Li-Ta Lo
b7f2d8c638 Merge branch 'particle_density' into particle_density_cic 2021-03-11 11:22:22 -07:00
Li-Ta Lo
e68319e0a3 Merge branch 'fp_atomics2' into particle_density_cic 2021-03-11 11:13:55 -07:00
Li-Ta Lo
ce8ab5912b Merge branch 'particle_density_cic' of gitlab.kitware.com:ollielo/vtk-m into particle_density_cic 2021-03-11 10:31:42 -07:00