Commit Graph

2289 Commits

Author SHA1 Message Date
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
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
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
Kenneth Moreland
91fc69fd06 Merge topic 'implicit-functions-no-virtual'
662998f19 Remove make_ImplicitFunctionFunctor functions
27cc99acb Add documentation for Multiplexer and General implicit functions
6a445ebcf Do not return a reference from ImplicitFunction::PrepareForExecution
b0fcab5d7 Do not capture references to execution objects
096e7457c Fix CUDA issues
8c6623736 Suppress deprecation warnings in deprecated class
a6725b3ac Remove use of deprecated ImplicitFunctions with virtual methods
180d11e7f Add ImplicitFunctionGeneral
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Nickolas Davis <nadavi@sandia.gov>
Merge-request: !2413
2021-02-26 15:19:30 -05:00
Kenneth Moreland
b0fcab5d7f Do not capture references to execution objects
It is possible for a transport to return a reference to an object.
At some point, however, the object has to be potentially copied
to a different memory space to be used in the execution environment.
This was getting fouled up because the reference type was being
captured. Instead, remove any references from the object.
2021-02-24 11:58:18 -05:00
Kenneth Moreland
aa5c9dba28 Remove problematic lambda functions
The GCC 7 compiler on summit was failing to compile all of the
code. The problematic parts involved using lambda functions.
I think the problem is that the compiler has a bug where it
has a problem resolving the type of variables captured by
reference. The problem seems similar to this bug reported
to Kokkos:

https://github.com/kokkos/kokkos-kernels/issues/349

Solved the problem by removing the lambdas with either a
named method or just inline code.

I suspect the problem arose (without anyone's knowledge) with
MR !2331, which moved VTK-m to C++14. This GCC error seems to
happen with C++14 but not C++11. (The features of lambdas changed
between these two versions of C++.)
2021-02-24 09:52:59 -07:00
Oliver Ruebel
ca86402f9d Provide additional debug info in case contour tree hangs 2021-02-23 15:58:16 -08:00
Oliver Ruebel
48d91b99f6 Throw exception if merge tree gets stuck in a loop 2021-02-23 15:26:10 -08:00
Oliver Ruebel
c7ea03ee27 Throw exception if contour tree gets stuck in a loop 2021-02-23 15:25:53 -08:00
Kenneth Moreland
a6725b3acd Remove use of deprecated ImplicitFunctions with virtual methods
Unfortunately, this introduces a backward-incompatible change with the
filters that use ImplicitFunctions. Before, they would get an
ImplicitFunctionHandle. This class is deprecated, and there is no easy
way to get back the actual type of implicit function stored in it.
2021-02-22 06:40:02 -07:00
Gunther Weber
561db99b30 Merge topic 'debug/ctwarp3d'
7a14ea0ef Use Float64 instead of FloatDefault in TreeCompiler
96424c833 Fix bad ordering of args for CountLinkComponentsIn2DSlice in IsNecessary

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2414
2021-02-21 21:57:38 -05:00
Gunther H. Weber
ebb265ce03 Add missing VTKM_EXEC_CONT declarations to functor 2021-02-18 16:53:50 -08:00
Gunther H. Weber
10ea36bb95 Pick one approach of using array handle decorator for contour tree 2021-02-18 11:55:04 -08:00
Gunther H. Weber
585f0ccb18 Two versions for replacing array transform with array decorator 2021-02-17 19:17:31 -08:00
Gunther H. Weber
7a14ea0efa Use Float64 instead of FloatDefault in TreeCompiler 2021-02-16 20:32:39 -08:00
Kenneth Moreland
2399741a97 Change Probe filter to use CellLocatorChooser
There was some compile errors with CUDA and the CellLocatorGeneral.
Apparently it added enough to the CUDA kernel to cause issues with
constant memory.
2021-02-15 12:39:12 -07:00
Kenneth Moreland
23c823d4b4 Fix compile errors and warnings related to new CellLocator structure 2021-02-15 12:39:11 -07:00
Kenneth Moreland
0a5f5d55c9 Remove virtual methods from cell locators
Deprecated the `CellLocator` class and made all methods of the
other `CellLocator` classes non-virtual. General locators can
still use the `CellLocatorGeneral` class, but this class now
only works with a predefined set of locators. (The functionality
to provide a function to select a locator has been removed.)
2021-02-15 12:39:11 -07:00
Oliver Ruebel
96424c8331 Fix bad ordering of args for CountLinkComponentsIn2DSlice in IsNecessary 2021-02-15 04:17:04 -08:00
Kenneth Moreland
05fc1747e0 Make deprecated tags more descriptive
Also, test to make sure that the deprecated types are still valid.
2021-02-09 09:45:41 -07:00
Kenneth Moreland
f4bc3002bb Fix compiler error with constexpr method
The `GetMaxNumberOfNeighbours` of the `MeshStructure*` classes was
declared `constexpr`. This was causing some compiler errors.

I think the problem is actually a bug with GCC (https://gcc.gnu.org/
bugzilla/show_bug.cgi?id=66297). Whether it is a compiler bug or not,
there does not seem to be a large value to declaring this method
`constexpr`, so I just removed the keyword.
2021-02-08 17:21:53 -07:00
Kenneth Moreland
4d8f05baef Update CellSetExtrude to not specify exec types by device
Somewhere during this edit I removed a header file that didn't strictly
need to be there. This caused me to have to add

```cpp
```

in several places in the code.
2021-02-08 16:57:16 -07:00
Kenneth Moreland
c55d15f397 Deprecate ArrayHandle::ExecutionTypes
The newer version of `ArrayHandle` no longer supports different types of
portals for different devices. Thus, the `ReadPortalType` and
`WritePortalType` are sufficient for all types of portals across all
devices.

This significantly simplifies supporting execution objects on devices,
and thus this change also includes many changes to various execution
objects to remove their dependence on the device adapter tag.
2021-02-08 12:17:37 -07:00
dpugmire
aa713b565f Support for dist-memory pathlines. 2021-02-05 09:40:50 -05:00
Kenneth Moreland
1faed3712e Remove the use of ResetTypes for ArrayCopy
It used to be the case where you needed to call `ResetTypes` on a
`VariantArrayHandle` before using `ArrayCopy` to limit the types it gets
compiled for. However, there is now a general form for
`UnknownArrayHandle`, so `ResetTypes` no longer does anything useful in
this case. Remove the use of that.
2021-02-02 17:34:08 -07:00
Kenneth Moreland
26ea2ab420 Break circular dependency of ArrayCopy.h and UnknownArrayHandle.h
The circular dependency came from UnknownArrayHandle.h needing
VTKmDefaultTypes.h, which needed all the cell set types. Some of those
cell sets used ArrayCopy in templated functions. Changed those functions
to directly deep copy the ArrayHandle.
2021-02-02 17:33:08 -07:00
Oliver Ruebel
cea1173233 Reverse error check in ContourTreeMaker 2021-02-02 13:46:01 -08:00
Oliver Ruebel
5005b5d44a Updated ContourTreeMesh::DebugPrint / ContourTreeMaker::DebugPrintt to use per-call build guards 2021-02-02 13:44:50 -08:00
Gunther Weber
8ebd889732 Merge topic 'add-contour-tree-unit-tests'
c59d8b25b Use test_equal_ArrayHandles instead of custom functions ArraysEqual
06ab386a0 Added test for combinining contour tree meshes
3d5adf335 Re-enabled tests with external files (and added required files to Git LFS)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !2344
2021-02-01 16:55:29 -05:00
Kenneth Moreland
76634d167e Merge topic 'deprecate-arrayhandle-shrink'
34412ff29 Deprecate ArrayHandle::Shrink
eb90a6080 Update documentation for Storage

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2392
2021-02-01 16:07:22 -05:00
Kenneth Moreland
34412ff298 Deprecate ArrayHandle::Shrink
This method has been subsumed by Allocate with vtkm::CopyFlag::On.
2021-02-01 08:07:40 -07:00
Gunther H. Weber
c59d8b25b1 Use test_equal_ArrayHandles instead of custom functions ArraysEqual 2021-01-29 11:33:25 -08:00
Gunther H. Weber
06ab386a03 Added test for combinining contour tree meshes 2021-01-29 09:45:13 -08:00
Gunther H. Weber
239adf5980 Fix typos in functor names for contour tree 2021-01-28 14:29:45 -08:00
Gunther H. Weber
0183db6854 Split array access into separate lines and add VTKM_ASSERT 2021-01-27 19:31:56 -08:00
Kenneth Moreland
8b133288ce Fix deprecation warnings
There was an error that caused deprecation warnings in VTK-m to be
suppressed, which meant that many uses of deprecated features went
unnoticed. This fixes those deprecation warnings.

The majority of the warnings were caused by the use of the deprecated
`Cast`, `CopyTo`, and `ResetTypes` methods of `UnknownArrayHandle` (or
`VariantArrayHandle`). Both `Cast` and `CopyTo` have been subsumed by
`AsArrayHandle` (to make the functionality more clear). `ResetTypes` now
requires a second template argument to define the storage types to try.

Also fixed some issues with `SerializableField` being deprecated.
This class is no longer necessary because `Field` can now be directly
serialized.
2021-01-26 07:56:39 -07:00
Kenneth Moreland
11a4c9867e Change Field to hold UnknownArrayHandle rather than VariantArrayHandle
The `VariantArrayHandle` will soon be deprecated for its replacement of
`UnknownArrayHandle`. Thus, `Field` and related classes should start
using the new `UnknownArrayHandle`.
2021-01-14 17:01:22 -07:00
Kenneth Moreland
a6edc832da Merge topic 'soa-array-default'
cecd81d5d Add types appropriate for Ascent
865855ea0 Add changelog for making ArrayHandleSOA a default array
50ff9c22a Add support of `ArrayHandleSOA` as a default storage type
bc09a9cd1 Add precompiled versions of `ArrayRangeCompute` for `ArrayHandleSOA`
77f9ae653 Support `ArrayHandleSOA` only for `Vec` value types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2349
2021-01-14 12:40:58 -05:00
Kenneth Moreland
06c59fed13 Update MapFieldMergeAverage/Permuation to use new CastAndCall
These functions now use
`UnknownArrayHandle::CastAndCallWithExtractedArray` to reduce the number
of times the worklet is run.
2021-01-13 09:19:33 -07:00
Robert Maynard
ebf648906f FlyingEdges uses optimized Y axis algorithm for Kokkos device 2021-01-07 13:46:42 -05:00
Kenneth Moreland
cecd81d5db Add types appropriate for Ascent 2021-01-07 08:15:17 -07:00
Kenneth Moreland
84bfcc238c Move test_equal_* classes to top namespace
These helper functions were in vtkm::cont::testing, but that made them
hard to discover (and I personally kept forgetting about them). Move
them to the top namespace so that IDE of test_equal will helpfully
remind us of these other test functions.
2020-12-22 13:46:02 -07:00
Kenneth Moreland
03c3f9e178 Update MapField helper functions to use extracted array components
Previously, the `MapFieldMergeAverage` and `MapFieldPermutation` helper
function had to iterate over every possible type and create a separate
code path. This change uses the new extract component functionality to
create separate code paths only for different component types. This both
requires less code (the common filter library dropped from 66MB to 42MB
on my Mac) and covers more cases (such as `Vec`s larger than 4
components).

To make the implementation easier, `UnknownArrayHandle` now can create a
new `UnknownArrayHandle` of the same `ValueType` but with the basic
storage (so you can work with read-only storage) and the ability to
allocate the unknown array.
2020-12-16 17:23:35 -07:00
Gunther H. Weber
a10d7be0bf Revert back from ResizeVector to Allocate but setting vtkm::CopyFlag::On 2020-12-02 14:30:24 -08:00
Gunther H. Weber
76dcacc090 Revert from Allocate to ResizeVector, but initialize with 0 instead of NO_SUCH_ELEMENT 2020-12-02 14:30:24 -08:00
Oliver Ruebel
774d8df370 Renamed ResizeIndexVector to ResizeVector and fixed bad resize call 2020-12-02 14:30:24 -08:00
Gunther H. Weber
94697e0e05 Fix unused variable warnings when logging is disabled 2020-12-02 14:30:24 -08:00
Gunther H. Weber
25bacf9281 Removed return statement that is never reached 2020-12-02 14:30:23 -08:00
Gunther H. Weber
635510de03 Make device tracker named variable 2020-12-02 14:30:23 -08:00
Oliver Ruebel
58515c2e21 Use ScopedRuntimeDeviceTracker to enforce the device rather than setting it explicitly 2020-12-02 14:30:23 -08:00
Oliver Ruebel
bda234c6ef Use CopySubRange to ensure arrays are not being shrunk 2020-12-02 14:30:23 -08:00
Gunther H. Weber
c603fe596a Fix filename of BoundaryTreeNodeComparator.h in CMakeLists.txt. 2020-12-02 14:30:22 -08:00
Oliver Ruebel
a88b2ed4a8 Renamed Bract to BoundaryTree throughout 2020-12-02 14:29:18 -08:00
Oliver Ruebel
a5d541a341 Rename BoundaryTreeMaker.Bract to BoundaryTreeData 2020-12-02 14:29:18 -08:00
Oliver Ruebel
e77f924ecf Remove bad inheritance from vtkm::worklet::WorkletMapField 2020-12-02 14:29:17 -08:00
Oliver Ruebel
b630919c3b Avoid use of values as both input and retun valye in worklet 2020-12-02 14:29:17 -08:00
Oliver Ruebel
cb98eea5e3 Renamed and updated ResizeIndexVector to use new ArrayHandle resize support in VTKm 2020-12-02 14:29:17 -08:00
Oliver Ruebel
de7da7423e Add DIY-related comments to DistributedContourTreeBlockData 2020-12-02 14:29:17 -08:00
Oliver Ruebel
8e58f50b23 Removed commented ContourTreeBlockData.SortOrder 2020-12-02 14:29:17 -08:00
Oliver Ruebel
eec59a6fd0 Add mssing namespace declaration for use of IsThis in worklets 2020-12-02 14:29:17 -08:00
Oliver Ruebel
41006405b3 Remove CombinedVector. Update ContourTreeMesh::MergeWith accordingly. 2020-12-02 14:29:17 -08:00
Gunther H. Weber
2fa6855222 Fix another warning about types. 2020-12-02 14:29:17 -08:00
Gunther H. Weber
91355fcae7 Avoid 'unitialized variable' compiler warning. 2020-12-02 14:29:17 -08:00
Gunther H. Weber
c8b11f4dcc Remove FIXME 2020-12-02 14:29:17 -08:00
Oliver Ruebel
b7e2a680e3 Fix unused varibale bug 2020-12-02 14:29:16 -08:00
oruebel
7e9f57f755 Cast constexpr on device to fix CUDA access problems 2020-12-02 14:29:16 -08:00
oruebel
65f8c8cf2c Remove bad std::abort call on device 2020-12-02 14:29:16 -08:00
Oliver Ruebel
08447c24b1 Add support for using only necessary boundary vertices 2020-12-02 14:29:16 -08:00
Oliver Ruebel
e734c6358c Port bugfix for ListNewNodesCopyIdsWorklet. 2020-12-02 14:29:16 -08:00
Oliver Ruebel
75afb77d20 Refine recording of timings in Fan In functor 2020-12-02 14:29:16 -08:00
Gunther H. Weber
d18aacc5d6 Cleanup of debug output etc. 2020-12-02 14:29:16 -08:00
Gunther H. Weber
8652ea1abb Update CMakeList.txt for updates in worklet/contourtree_distributed/boundary_tree_maker. 2020-12-02 14:29:16 -08:00
Gunther H. Weber
f0213d065e Replace implicit array handles to adapt to vtk-m changes. 2020-12-02 14:29:16 -08:00
Oliver Ruebel
18e2938cdf Fix comments in BoundaryTree class 2020-12-02 14:29:15 -08:00
Oliver Ruebel
10910d6b4a Fix bug to output the correct arrays i HierarchicalContourTree<FieldType>::PrintTreeStats 2020-12-02 14:29:15 -08:00
Oliver Ruebel
07b6744f31 Partial add dot output in ComputeDistributedContourTreeFunctor 2020-12-02 14:29:15 -08:00
Oliver Ruebel
17f2f845e7 Minor fixed for performane logging 2020-12-02 14:29:15 -08:00
Oliver Ruebel
ac1818d357 Add logging for Fan in and Fan Out 2020-12-02 14:29:15 -08:00
Oliver Ruebel
3355be235e Make logging customizable for ContourTreeUniformAugmented 2020-12-02 14:29:15 -08:00
Oliver Ruebel
0fa2b57ac6 Save NumBoundary and NumBounaryUsed in BoundaryTree for logging 2020-12-02 14:29:15 -08:00
Oliver Ruebel
ea2803735a Add function for printing hierarchical tree statistics 2020-12-02 14:29:15 -08:00
Oliver Ruebel
f1b2a2b47c Make log level configurable for ContourTreeUniformAugmented 2020-12-02 14:29:15 -08:00
Oliver Ruebel
d71259fdb7 Add contour tree, boundary tree, and interior forest array stat print 2020-12-02 14:29:15 -08:00
Gunther H. Weber
d42916ba39 Fix OpenMP backend crashes by avoiding unnecessary computations and zero-length copying. 2020-12-02 14:29:15 -08:00
Gunther H. Weber
4594c1e4c6 Fix unit tests to handle vtk-m with compuled with double precision. 2020-12-02 14:29:15 -08:00
Gunther H. Weber
eb776059ca Fix unused return value warning in TreeCompiler.h 2020-12-02 14:29:14 -08:00
oruebel
dc1d577140 Fix VTKM_EXEC lables for hact exec objects 2020-12-02 14:29:14 -08:00
Oliver Ruebel
fcda9adde2 Attempt to fix host device function call issue 2020-12-02 14:29:14 -08:00
Oliver Ruebel
9179f5b7b3 Add (vtkm::Id) cast for contour tree constexpr variable for CUDA build 2020-12-02 14:29:14 -08:00
Oliver Ruebel
15baa0f591 Remove ArrayHandleVirtual import in BRACTNodeComperator.h 2020-12-02 14:29:14 -08:00
Oliver Ruebel
569d0ed413 Revert change to Types.h 2020-12-02 14:29:14 -08:00
Oliver Ruebel
05c81cbb76 Fix bad array look-up in dot print 2020-12-02 14:29:14 -08:00
Oliver Ruebel
21cf5a057d Fix build errors in unused print dot of HierarchicalContourTree.h 2020-12-02 14:29:14 -08:00
Oliver Ruebel
e53f63c42f Attempt to fix CUDA visibilty of types 2020-12-02 14:29:14 -08:00
Oliver Ruebel
78a2a285d1 Fix build errors in unused print dot function in HierarchicalContourTree.h 2020-12-02 14:29:14 -08:00
Oliver Ruebel
3cefc1e20a Remove tabs in PrintGraph 2020-12-02 14:29:14 -08:00
Oliver Ruebel
5353a1c3b2 Remove trailing whitespaces 2020-12-02 14:29:13 -08:00
Oliver Ruebel
4d179556e0 Remove unused variable in FindBractSuperarcsSuperarcToWorklet 2020-12-02 14:29:13 -08:00
Oliver Ruebel
91b9832f99 Fix ReadPortal access in HierarchicalContourTree 2020-12-02 14:29:13 -08:00
Oliver Ruebel
d24f7b786b Fix ReadPortal access in HierarchicalContourTree::SuperString part 2 2020-12-02 14:29:13 -08:00
Oliver Ruebel
da4b56d8e5 Fix ReadPortal access in HierarchicalContourTree::SuperString 2020-12-02 14:29:13 -08:00
Oliver Ruebel
cf333de8d8 Move VTKM_CONT labels for HierarchicalContourTree CUDA built 2020-12-02 14:29:13 -08:00
Gunther H. Weber
e47ef57111 Added missing include needed due to DO: reformat 2020-12-02 14:29:13 -08:00
Gunther H. Weber
5dc26391c0 Eliminted TABs 2020-12-02 14:29:13 -08:00
Gunther H. Weber
9335be8efc Fix header list in contourtree_distributed/CMakeLists.txt to pass install test 2020-12-02 14:29:12 -08:00
Gunther H. Weber
8b21a8e07d Add test scripts to run tests via example application. 2020-12-02 14:29:12 -08:00
Gunther H. Weber
7a77b1ad89 Added serial (via DIY) unit test for distributed contour tree filter. 2020-12-02 14:29:12 -08:00
Gunther H. Weber
9b7fae29b7 Use ArrayHandleMultiplexer instead of deprecated ArrayHandleVirtual 2020-12-02 14:29:12 -08:00
Gunther H. Weber
7e4c8f8c48 Commented out lines to fix unused variable compiler warnings 2020-12-02 14:29:12 -08:00
Gunther H. Weber
eed7487e59 Added missing inline declarations 2020-12-02 14:29:12 -08:00
Gunther H. Weber
7661b17e5b Return fields required by TreeCompiler as vtk-m data set from filter. 2020-12-02 14:29:12 -08:00
Oliver Ruebel
c4de6ba6e0 Fix copy predictate for compressing arcs and fix init of arrays for FindCriticalPoints 2020-12-02 14:29:12 -08:00
Oliver Ruebel
5cebd3b0dc Update print of edge arrays 2020-12-02 14:29:12 -08:00
Oliver Ruebel
7d1d9aa99f Remove extra build guards for DebugPrint 2020-12-02 14:29:12 -08:00
Oliver Ruebel
d78aa95c4a Change FieldIn to FieldInOut to prevent overwrite of preinit values 2020-12-02 14:29:12 -08:00
Oliver Ruebel
eb616dbbab Use FieldInOut instead of FieldIn to prevent overwrite of pre-initalized values 2020-12-02 14:29:11 -08:00
Gunther H. Weber
f433790a17 Ported distributed contour tree prototype to vtk-m 2020-12-02 14:29:11 -08:00
nadavi
8b7fd61753 Implement and test Image Comparison Filters and Worklets 2020-12-02 16:24:06 +00:00
Nick Thompson
4b3ca3f54e Make ZFP tests less verbose. 2020-11-25 15:50:10 -05:00
Dave Pugmire
3c50a7ea46 Fix assert for pathlines. Add example from manual that was failing. 2020-11-25 12:43:00 -05:00
Dave Pugmire
967fb9fadf Remove unneeded cast in worklet, clarify the code in threaded algo. 2020-11-24 15:06:36 -05:00
Kenneth Moreland
07d6c06c73 Convert ArrayHandleCartesianProduct to new buffer-style array 2020-11-17 12:17:28 -07:00
Kenneth Moreland
7d681fb585 Deprecate templated versions of Field::GetRange
Instead, always use precompiled versions of range computing. This means
you won't be able to specify the type. Currently, types are limited to
scalars vecs up to size 4.

The main motivation for this change is to allow you to include Field.h
with a non-device compiler. This is an important feature for our
customers.

I plan in the future to implement a mechanism to pull out a component of
most ArrayHandle's as a single array. This would enable us to support a
precompiled version that can compute the range of arbitrarily sized
Vecs.
2020-11-09 12:28:29 -07:00
Dave Pugmire
a7f049ac1a Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into ghost_streamlines 2020-11-02 16:28:57 -05:00
Dave Pugmire
467ad88d06 Move PA tests into Streamline 2020-11-02 16:25:38 -05:00
Dave Pugmire
722479ea10 Add different dataset types to MPI test. 2020-10-27 22:12:45 -04:00
Dave Pugmire
047bd93d5a Fix compile error 2020-10-27 14:27:34 -04:00
Dave Pugmire
e8dc7e0eee Add more dataset types for testing. 2020-10-26 15:49:58 -04:00
Dave Pugmire
46a82c6985 add data generation functions. 2020-10-26 14:37:20 -04:00
Dave Pugmire
eb76dff8d2 Support for ghost cells in P.A. filter 2020-10-26 12:39:31 -04:00
Dave Pugmire
0dccfdc61e Code cleanup and more tests for ghostcells 2020-10-23 14:37:28 -04:00
Dave Pugmire
a9232904d9 code cleanup and remove compile warning. 2020-10-22 09:57:57 -04:00
Vicente Adolfo Bolea Sanchez
b22823a547 Contour: Zero-init arrays in Flying Edges
- It fixes a lingering error triggered with BenchContour
- It reenables BenchContour

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-10-21 19:12:51 -04:00
Dave Pugmire
6e4d4932d7 debug kokkos compile errors. 2020-10-21 17:14:56 -04:00
Dave Pugmire
64601619c3 Trying to find kokkos compile error 2020-10-21 17:08:10 -04:00
Dave Pugmire
0f0797f0e1 Fix compiler warnings. 2020-10-21 16:00:54 -04:00
Dave Pugmire
ec37279b01 Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into ghost_streamlines 2020-10-21 12:01:31 -04:00
Kenneth Moreland
28ecf3636d Change interface of atomic compare and swap
The old atomic compare and swap operations (`vtkm::AtomicCompareAndSwap`
and `vtkm::exec::AtomicArrayExecutionObject::CompareAndSwap`) had an
order of arguments that was confusing. The order of the arguments was
shared pointer (or index), desired value, expected value. Most people
probably assume expected value comes before desired value. And this
order conflicts with the order in the `std` methods, GCC atomics, and
Kokkos.

Change the interface of atomic operations to be patterned off the
`std::atomic_compare_exchange` and `std::atomic<T>::compare_exchange`
methods. First, these methods have a more intuitive order of parameters
(shared pointer, expected, desired). Second, rather than take a value
for the expected and return the actual old value, they take a pointer to
the expected value (or reference in `AtomicArrayExecutionObject`) and
modify this value in the case that it does not match the actual value.
This makes it harder to mix up the expected and desired parameters.
Also, because the methods return a bool indicating whether the value was
changed, there is an additional benefit that compare-exchange loops are
implemented easier.

For example, consider you want to apply the function `MyOp` on a
`sharedValue` atomically. With the old interface, you would have to do
something like this.

```cpp
T oldValue;
T newValue;
do
{
  oldValue = *sharedValue;
  newValue = MyOp(oldValue);
} while (vtkm::AtomicCompareAndSwap(sharedValue, newValue, oldValue) != oldValue);
```

With the new interface, this is simplfied to this.

```cpp
T oldValue = *sharedValue;
while (!vtkm::AtomicCompareExchange(sharedValue, &oldValue, MyOp(oldValue));
```
2020-10-20 08:39:22 -06:00
Dave Pugmire
381886c947 Fix compiler warnings... 2020-10-20 09:53:05 -04:00
Dave Pugmire
ee24cdd4d4 fix compile error... 2020-10-19 22:21:24 -04:00
Dave Pugmire
35627b287e Add support for ghost cells in particle advection. 2020-10-19 16:46:48 -04:00
Kenneth Moreland
19944653bc Add scope log for functions that help map fields in filters 2020-10-13 16:35:25 -06:00
Kenneth Moreland
420b9d3979 Log the building of arrays for scatters and masks 2020-10-12 13:19:43 -06:00
Kenneth Moreland
7933c70ca5 Add dispatcher type when logging worklet invocation
When you invoke a worklet, a scoped performance log is automatically
generated. The previous version gave the name of the worklet, which is
technically everything you need to know. However, it is also convenient
to know what type of worklet it is (e.g. a field map worklet or a
topology map worklet). This can be determined by looking at the
definition of the worklet in the source code, but that is not practical
if, for example, you want to perform automated analysis.

This change prints out the type of the dispatcher instead of the
worklet. The full type of the dispatcher includes the worklet as a
template parameter, so you get both the dispatcher/worklet type and the
worklet itself. So previously you would get log lines like

```
Invoking Worklet: 'vtkm::worklet::vtkm::worklet::ExternalFaces::NumFacesPerCell'
```

They now look like this:

```
Invoking Worklet: 'vtkm::worklet::DispatcherMapTopology<vtkm::worklet::ExternalFaces::NumFacesPerCell>'
```
2020-10-08 16:10:00 -06:00
Li-Ta Lo
268a07bb06 remove test on large graph and sample data 2020-10-08 13:26:46 -06:00
Li-Ta Lo
eaff271950 minor changes on comments on findRoot() 2020-10-07 15:09:12 -06:00
Li-Ta Lo
a036b0f980 Minor change based on code review. 2020-10-07 14:23:40 -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
3c7aa34267 Remove duplicate code in ImageConnectivity.h and GraphConnectivity.h 2020-10-06 13:38:59 -06: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
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
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
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
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
Kenneth Moreland
11996f133f Remove virtual methods from ColorTable
Virtual methods are being deprecated, so remove their use from the
ColorTable classes. Instead of using a virtual method to look up a value
in the ColorTable, we essentially use a switch statement. This change
also simplified the code quite a bit.

The execution object used to use pointers to handle the virtual objects.
That is no longer necessary, so a simple `vtkm::exec::ColorTable` is
returned for execution objects. (Note that this `ColorTable` contains
pointers that are specific for the particular device.) This is a non-
backward compabible change. However, the only place (outside of the
`ColorTable` implementation itself) was a single worklet for converting
scalars to colors (`vtkm::worklet::colorconversion::TransferFunction`).
This is unlikely to affect anyone.

I also "fixed" some names in enum structs. There has been some
inconsistencies in VTK-m on whether items in an enum struct are
capitolized or camel case. We seem to moving toward camel case, so
deprecate some old names.
2020-09-14 13:26:16 -06:00
Kenneth Moreland
fbb69b7655 Merge topic 'deprecate-arrayhandlevirtual'
e706880d7 Fix unnecessary deprecation warnings in visual studio
f7cc03107 Fix deprecated warnings
b27e4c7ea Ignore files for deprecated virtual classes for SourceInInstall test
284774cf4 Turn on "no virtual" option on some CI builds
cd08fd499 Add changelog for removing virtual methods
63ef84ed7 Optionally remove all use of ArrayHandleVirtual
e11f612ad Deprecate ArrayHandleVirtual

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2256
2020-09-10 14:32:40 -04:00
Kenneth Moreland
6c383b0a73 Merge topic 'unknown-array-dynamic-transfer'
78c7909c8 Enable automatic transformation of Unknown/UncertainArrayHandle

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2258
2020-09-10 12:41:50 -04:00
Kenneth Moreland
78c7909c84 Enable automatic transformation of Unknown/UncertainArrayHandle 2020-09-09 07:03:34 -06:00
nadavi
843307bcf7 fix floating point casting warning in worklet test 2020-09-08 17:47:53 +00:00
nadavi
18263a37ac update float casting to not have warnings on iris 2020-09-08 17:47:53 +00:00
Subhashis Hazarika
93b8ee97dd Pasing range explicitly to NDHistogram worklet for ALPINE 2D sampling milestone 2020-09-05 00:45:19 -06:00
Kenneth Moreland
63ef84ed78 Optionally remove all use of ArrayHandleVirtual
As we remove more and more virtual methods from VTK-m, I expect several
users will be interested in completely removing them from the build for
several reasons.

1. They may be compiling for hardware that does not support virtual
methods.
2. They may need to compile for CUDA but need shared libraries.
3. It should go a bit faster.

To enable this, a CMake option named `VTKm_NO_DEPRECATED_VIRTUAL` is
added. It defaults to `OFF`. But when it is `ON`, none of the code that
both uses virtuals and is deprecated will be built.

Currently, only `ArrayHandleVirtual` is deprecated, so the rest of the
virtual classes will still be built. As we move forward, more will be
removed until all virtual method functionality is removed.
2020-09-04 22:52:45 -06:00
Kenneth Moreland
e11f612add Deprecate ArrayHandleVirtual
Virtual methods in the execution environment are going away the next
major release of VTK-m, so deprecate their use in preparation for that.
2020-09-04 22:52:45 -06:00
Li-Ta Lo
e17345a81f Merge branch 'master' into concurrent_union_find 2020-08-31 14:34:29 -06:00
Li-Ta Lo
945e9cf328 some more comments 2020-08-31 09:23:03 -06:00
Li-Ta Lo
7533538e17 restore CI config files, minor clean up for UnionFind 2020-08-28 10:48:14 -06:00
Li-Ta Lo
31322cd2e1 use CompareAndSwap for setting root 2020-08-28 10:33:24 -06:00
Li-Ta Lo
4cd320c284 put finding and setting root in a loop 2020-08-28 08:53:56 -06:00
Li-Ta Lo
f91fb35d7f added more data race analysis, change GraphGraft to use AtomicArray 2020-08-28 00:04:50 -06:00
Li-Ta Lo
e5f8219477 try fixing CUDA compiler error 2020-08-27 22:35:27 -06:00
Li-Ta Lo
fc754b329f deduplicate UnionFind 2020-08-27 20:07:32 -06:00
Li-Ta Lo
af53fb736f Add unit test for graph connectivity with data from the ECL_CC paper 2020-08-27 17:37:08 -06:00
Kenneth Moreland
d938226cd3 Fix tests that relied on stable sort
The parallel sorts in the device adapter are documented to not be
stable. Up until recently, the sorts for all the supported devices
happened to be stable (or at least provided a stable sort where needed).
However, the recent Kokkos adapter provides a sort that is no stable.
This broke some tests that relied on stable sorts when they should not
have.

Fix the tests that relied on stable sort to check the results.
2020-08-27 14:50:51 -06:00
Li-Ta Lo
17047f456d more comments on things to do 2020-08-27 11:46:31 -06:00
Li-Ta Lo
727e0cb268 single pass algorithm for both Image and Graph connectivity 2020-08-27 11:22:48 -06:00
Li-Ta Lo
19be36ee7a implemented single pass algorithm for image connectivity 2020-08-27 11:03:45 -06:00
Li-Ta Lo
0902cbbad3 save before change to single pass algorithm 2020-08-27 10:17:02 -06:00
Robert Maynard
faa845d56e Merge topic 'reenable_tests_mistakenly_disabled'
769d6468f Correct a mistake where the kokkos MR merged disabled worklet tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2243
2020-08-27 07:56:37 -04:00
Robert Maynard
769d6468fd Correct a mistake where the kokkos MR merged disabled worklet tests 2020-08-26 13:19:49 -04:00
Dave Pugmire
855e973a20 Rename the Particle classes. 2020-08-26 08:59:51 -04:00
Li-Ta Lo
69de6afa2a add more comments on data race 2020-08-25 13:30:37 -06:00
Kenneth Moreland
571aa9f3d7 Simplify getting test file names
The testing helper class provided a method named `GetTestDataBasePath`
that returned the base path to all the data files stored in the VTK-m
repo. This is fine, but it was a little cumbersome to build filenames.

To make things easier, there is now a new method named `DataPath` that
takes a string of the filename (or, rather, subpath) to the file in that
directory and automatically builds the path to it.
2020-08-25 06:17:59 -06:00
Kitware Robot
cf0cdcf7d1 clang-format: reformat the repository with clang-format-9 2020-08-24 14:01:08 -04: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
dpugmire
d13a08b6ae Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into mpiStreamlines2 2020-08-18 16:06:41 -04:00
Nick
8124fe81fd Add missing #include. 2020-08-18 15:32:39 -04:00
Nick
024ab1cff8 Put each ODE integrator in it's own file. 2020-08-18 15:32:39 -04:00
dpugmire
9bf49101ca Merge branch 'master' of https://gitlab.kitware.com/vtk/vtk-m into mpiStreamlines2 2020-08-17 16:35:40 -04:00