Commit Graph

6545 Commits

Author SHA1 Message Date
Allison Vacanti
884616788a Simplify and extend AtomicArray implementation.
- Use AtomicInterface to implement device-specific atomic operations.
- Remove DeviceAdapterAtomicArrayImplementations.
- Extend supported atomic types to include unsigned 32/64-bit ints.
- Add a static_assert to check that AtomicArray type is supported.
- Add documentation for AtomicArrayExecutionObject, including a CAS
  example.
- Add a `T Get(idx)` method to AtomicArrayExecutionObject that does
  an atomic load, and update existing CAS usage to use this instead
  of `Add(idx, 0)`.
2019-08-23 15:40:37 -04:00
Allison Vacanti
9560c4f633 Limit testing dispatch of atomic array to only atomic types. 2019-08-23 15:40:37 -04:00
Allison Vacanti
0e728c8000 Update atomic interfaces to support Add/CAS for UInt32/64.
These will be used for the AtomicArray implementation.
2019-08-23 15:40:37 -04:00
Allison Vacanti
720b452eb4 Force AtomicArray to use only basic storage arrays.
The StorageType template parameter is misleading, since
TransportTagAtomicArray errors out for non-basic storage.
2019-08-23 15:40:37 -04:00
Allison Vacanti
1a73641f9d Merge topic '391_reduce_device_transfers'
3eb91af96 Use ArrayGetValue where possible in worklets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1799
2019-08-23 10:14:43 -04:00
Ben Boeckel
7b8b223c53 Merge topic 'fix-taotuple-import'
Fix taotuple import

Acked-by: Robert Maynard <robert.maynard@kitware.com
Merge-request: !1801
2019-08-23 09:00:44 -04:00
Ben Boeckel
427f961f6e Merge topic 'update-diy'
Update diy

Acked-by: Ben Boeckel <ben.boeckel@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com
Merge-request: !1800
2019-08-23 08:59:51 -04:00
Dave Pugmire
caa4c0f071 Merge topic 'streamSrfFilter'
326c04f46 Rework internals of stream surface filter.
c1ee0109b Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamSrfFilter
5ef882463 Add filter for stream surface worklet.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1782
2019-08-23 07:46:12 -04:00
Allison Vacanti
3eb91af961 Use ArrayGetValue where possible in worklets.
Replace code such as `myArray.GetPortalControl().Get(0)` with
`vtkm::cont::ArrayGetValue(0, myArray)`, which will just retrieve
the single value without transferring the entire contents of
`myArray` to the host. This should prevent memory thrashing.

Also did some general style clean-ups and fixed loops that called
`GetPortalControl` in the loop body.
2019-08-22 16:42:17 -04:00
Dave Pugmire
8594936015 Merge topic 'tubeFilter'
0c25daf90 compile warnings.
43ddcab81 Add support for field mapping.
cbc972f10 Add Tube Filter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1781
2019-08-22 15:09:49 -04:00
Ben Boeckel
f5b3e23573 Merge branch 'upstream-taotuple' into fix-taotuple-import
* upstream-taotuple:
  taotuple 2019-06-05 (990962ae)
2019-08-22 14:10:06 -04:00
TaoCpp Tuple Upstream
5c34b7918e taotuple 2019-06-05 (990962ae)
Code extracted from:

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

at commit 990962ae6278efcd7f04ab1b40643a5da4395cf3 (for/vtk-m).
2019-08-22 14:10:06 -04:00
Ben Boeckel
b366e6b643 taotuple: remove import to reset it 2019-08-22 14:09:59 -04:00
Sujin Philip
8d9991cd71 Merge branch 'upstream-diy' into update-diy
* upstream-diy:
  diy 2019-08-22 (2153469e)
2019-08-22 14:04:20 -04:00
Diy Upstream
aa68517c22 diy 2019-08-22 (2153469e)
Code extracted from:

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

at commit 2153469e21736806f766e59e73aff5ad790b9dfa (for/vtk-m).
2019-08-22 14:04:19 -04:00
Sujin Philip
c0b497cc83 diy: remove in order to reset the import 2019-08-22 14:04:03 -04:00
Robert Maynard
0586525b74 Merge topic 'update_cmake_defaults_for_better_experience'
3a47058cb Use cache variables.
76ef9d15b Take advice of Robert and Kenneth on build system.
89fc012a2 Change CMakeLists.txt defaults in order to be more user-friendly.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1771
2019-08-22 12:15:19 -04:00
Robert Maynard
d553a55e43 Merge topic 'correct_openmp_reduce_odd_processor_count'
c90c3a675 OpenMP optimzed reduce support odd processor counts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1795
2019-08-22 11:56:39 -04:00
Kenneth Moreland
5e2ee3627b Merge topic 'fix-contour-test'
709b12c5b Add checks for size of contour worklet outputs
a3131d4e1 Fix bad normals in contour test

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1794
2019-08-22 11:19:15 -04:00
Allison Vacanti
8bb9873389 Merge topic '355_fetch_single_value'
bfe357319 Add a missing header to StorageExtrude.
d3fbe535f Check the source array's active device in ArrayCopy.
399f23963 Add ArrayGetValue[s] to address issue #355.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1790
2019-08-22 11:18:00 -04:00
Allison Vacanti
bfe357319e Add a missing header to StorageExtrude.
This is needed after cleaning up headers in ArrayCopy.
2019-08-22 11:16:16 -04:00
Allison Vacanti
d3fbe535f2 Check the source array's active device in ArrayCopy. 2019-08-22 11:16:16 -04:00
Allison Vacanti
399f23963e Add ArrayGetValue[s] to address issue #355. 2019-08-22 11:16:16 -04:00
Kenneth Moreland
709b12c5bb Add checks for size of contour worklet outputs 2019-08-22 08:28:53 -06:00
Dave Pugmire
0c25daf906 compile warnings. 2019-08-22 10:17:40 -04:00
Dave Pugmire
326c04f469 Rework internals of stream surface filter. 2019-08-22 10:08:50 -04:00
Allison Vacanti
5e253d9f6b Merge topic 'fixup_shadowed_typedef'
64533c5c8 Rename shadowing typedef in TriangleWinding test.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1793
2019-08-22 09:56:13 -04:00
Robert Maynard
f1c09529d1 Merge topic 'correct_improper_cellset_indexing'
fa9ffac7c Correct improper cellset indexing
b0c6e18ea DataSet queries for cellset and coordinate index won't trow

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1777
2019-08-22 08:39:36 -04:00
Robert Maynard
169480e4f0 Merge topic 'make_more_of_vtkm_vec_constexpr'
a529b90c7 vtkm::Vec const& operator[] is now constexpr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1792
2019-08-22 08:35:51 -04:00
Robert Maynard
a529b90c73 vtkm::Vec const& operator[] is now constexpr
This allows for developers to do things such as the following
as constexpr's:
```cxx
constexpr vtkm::Id2 dims(16,16);
constexpr vtkm::Float64 dx = vtkm::Float64(4.0 * vtkm::Pi()) / vtkm::Float64(dims[0] - 1);
```
2019-08-22 08:34:25 -04:00
Dave Pugmire
c1ee0109b5 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into streamSrfFilter 2019-08-22 08:31:47 -04:00
Dave Pugmire
43ddcab81e Add support for field mapping. 2019-08-22 08:14:52 -04:00
Robert Maynard
c90c3a6753 OpenMP optimzed reduce support odd processor counts 2019-08-21 18:31:20 -04:00
Kenneth Moreland
42f0e962bd Merge topic 'fix-implicit-functions'
bf96d921d Add extra braces around std::array initializers
9bbf4a5a6 Corrections and expanded testing of implicit functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1776
2019-08-21 18:20:57 -04:00
Kenneth Moreland
a3131d4e18 Fix bad normals in contour test
The contour worklet test was experiencing normals that were set to NaN
due to problems with computing the gradient of the original field. It
was determined that the problem was caused by the clip filter creating
degenerate cells because the clip plane exactly intersected the points
of the mesh. Although a problem, we found that this behavior also exists
in existing tools like ParaView and VisIt. Thus, it sounds like a
problem to be pushed off to a later day. Instead, just move the plane a
little bit to get it into general position.
2019-08-21 14:39:51 -06:00
Kenneth Moreland
54456bea76 Merge topic 'threshold-explicit-cells'
d7bfbbda8 Remove GhostCellRemove::ConvertOutputToUnstructured option
42e8a9125 Copy Threshold output to a CellSetExplicit

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1791
2019-08-21 16:23:04 -04:00
Allison Vacanti
cdd7c8993b Merge topic 'extrude_serialize'
67f1a772d Fix IsArrayHandleWritable for Extrude arrays.
38748a220 Add serialization code for Extrude data structures.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1788
2019-08-21 15:21:07 -04:00
Robert Maynard
fa9ffac7c9 Correct improper cellset indexing 2019-08-21 15:16:26 -04:00
Allison Vacanti
64533c5c82 Rename shadowing typedef in TriangleWinding test. 2019-08-21 15:04:07 -04:00
Kenneth Moreland
d7bfbbda82 Remove GhostCellRemove::ConvertOutputToUnstructured option
Now that Threshold automatically converts its output to CellSetExplicit,
this option is no longer necessary (and the previous implementation did
not work correctly).
2019-08-21 13:00:38 -06:00
Robert Maynard
2dcfacc42a Merge topic 'find_mpi_work_with_older_cmake_version_when_cuda_disabled'
978650b06 FindMPI works with CMake 3.8's separate_arguments
1f99fbc35 FindMPI will now work when CUDA is disabled and CMake <= 3.11

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !1787
2019-08-21 14:35:32 -04:00
Robert Maynard
978650b063 FindMPI works with CMake 3.8's separate_arguments
CMake 3.8 separate_arguments command doesn't support NATIVE_COMMAND
so we have to do that logic for it.
2019-08-21 09:55:15 -04:00
Sujin Philip
3f9503469a Merge topic 'update-diy'
a4d07730c diy 2019-08-20 (166f7d1b)
eea4225d8 Fix update.sh for diy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1789
2019-08-21 09:36:01 -04:00
Robert Maynard
1f99fbc357 FindMPI will now work when CUDA is disabled and CMake <= 3.11
This was causing issues for downstream users of VTK-m as it exposed
a bug in CM ( cmake#17952 ) where it was evaluating against the set of
enabled languages instead of possible languages.
2019-08-21 09:25:32 -04:00
Kenneth Moreland
8373adc654 Merge topic 'array-handle-soa'
aebafc9e5 Use SFINAE to write Set/Get methods in ArrayPortalSOA
20c758108 Add make_ArrayHandleSOA for std::vectors and C arrays
c50857246 Make SOA Portal test more type safe
918766e7a Fix VS 2015 compile issue with HasVecTraits
869d66580 Add ArrayHandleSOA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Allison Vacanti <allison.vacanti@kitware.com>
Merge-request: !1758
2019-08-21 09:24:35 -04:00
Diy Upstream
a4d07730cc diy 2019-08-20 (166f7d1b)
Code extracted from:

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

at commit 166f7d1bf6b4940b9edd3f91c78acf8ea6aa5bca (for/vtk-m).
2019-08-21 09:16:05 -04:00
Sujin Philip
eea4225d8e Fix update.sh for diy 2019-08-21 09:15:56 -04:00
Robert Maynard
8c4730da22 Merge topic 'opt_into_all_cmake_315_policies'
267f963d3 Opt into all CMake 3.15 policies

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1786
2019-08-21 08:18:19 -04:00
Kenneth Moreland
42e8a9125d Copy Threshold output to a CellSetExplicit
Perhaps a better title for this change would be "Make the Threshold
filter not totally useless."

A long standing issue with the Threshold filter is that its output
CellSet was stored in a CellSetPermutation. This made Threshold hyper-
efficient because it required hardly any data movement to implement.
However, the problem was that any other unit that had to use the CellSet
failed. To have VTK-m handle that output correctly in other filters and
writers, they all would have to check for the existance of
CellSetPermutation. And CellSetPermutation is templated on the CellSet
type it is permuting, so all units would have to compile special cases
for all these combinations. This is not likely to be feasible in any
static solution.

The simple solution, implemented here, is to deep copy the cells to a
CellSetExplicit, which is a known type that is already used everywhere
in VTK-m. The solution is a bit disappointing since it requires more
memory and time to build. But it is on par with solutions in other
libraries (like VTK). And it really does not matter how efficient the
old solution was if it was useless.
2019-08-20 16:04:26 -06:00
Kenneth Moreland
1473c12e66 Merge topic 'more-gradient-testing'
c19b312e5 Fix gradient issue at apex of pyramid cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Li-Ta Lo <ollie@lanl.gov>
Merge-request: !1785
2019-08-20 17:03:28 -04:00