Commit Graph

7250 Commits

Author SHA1 Message Date
mclarsen
aa7dcf915f push forward until new valid cell 2020-03-10 15:47:27 -07:00
mclarsen
6aafc42f13 move forward until encountering new cell for lost rays 2020-03-10 15:16:57 -07:00
Li-Ta Lo
d294f5bda6 Merge topic 'philox'
26b73f1dd Using C++11 integer types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1983
2020-03-10 11:18:29 -04:00
Robert Maynard
01b370296f Merge topic 'fix-301'
e4aa20594 Output CoordinateSystemTransforms results in Coordinates

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1970
2020-03-10 10:21:33 -04:00
Matt Larsen
18810e7323 Merge topic 'fix/conn_proxy_warning'
446a1c565 fix unreachable warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1984
2020-03-10 10:17:14 -04:00
Kenneth Moreland
7258d1d12d Merge topic 'arrayhandlevirtual-deadlock'
75cb53d3a Reset ArrayPortalToken when Detach is called
53c17a687 Release locks in ArrayHandleVirtual control portals

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1982
2020-03-10 09:35:14 -04:00
Matt Larsen
446a1c5657 fix unreachable warning 2020-03-09 19:49:03 -07:00
Li-Ta Lo
26b73f1dd3 Using C++11 integer types
Using C++11 fixed width integer type defined in cstdint
for various integer types alias instead of our own
2020-03-09 17:53:12 -06:00
Kenneth Moreland
75cb53d3ad Reset ArrayPortalToken when Detach is called
When `ArrayPortalToken::Detach` was called, the contained `Token` was
detached, but `ArrayPortal` being wrapped might also be holding its own
portal that it is decorating. To ensure that any dependent portals are
also detached, `ArrayPortalToken::Detach` resets itself.
2020-03-09 16:24:23 -06:00
Kenneth Moreland
53c17a6876 Release locks in ArrayHandleVirtual control portals
This fixes an issue where getting a `ReadPortal` or a `WritePortal` from
an `ArrayHandleVirtual` could cause a deadlock from a held token even if
the returned portal was detached or destroyed.

The problem was that `ArrayHandleVirtual` was keeping a reference to the
`ArrayPortal` from the concrete array. This was because the returned
`ArrayPortalRef`, which was designed to work on both control and
execution environments, had no good way to destroy the portal. This
meant that the `ArrayHandleVirtual` was caching a copy of the concrete
array's portal. This was not a great idea before because the array could
get invalidated. It is worse now because it keeps the concrete array
locked.

Fixed the problem by subclassing `vtkm::ArrayPortalRef` to make a
control-specific version that will delete the concrete portal on its own
destruction.
2020-03-09 15:53:38 -06:00
Matt Larsen
b374ec384d Merge topic 'UpdateSeedResolution'
424dfbaf5 Add call to UpdateSeedResoltuion() to set output dataset resolution.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1981
2020-03-08 11:03:30 -04:00
Sudhanshu Sane
424dfbaf52 Add call to UpdateSeedResoltuion() to set output dataset resolution. 2020-03-07 21:13:06 -08:00
Matt Larsen
d72c5ec105 Merge topic 'fix/vr_connectivity'
3b123594f Longer fixed message

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sudhanshu Sane <ssane@cs.uoregon.edu>
Acked-by: Abhishek Yenpure <abhishek@uoregon.edu>
Merge-request: !1979
2020-03-06 18:02:02 -05:00
Matt Larsen
3b123594fb Longer fixed message 2020-03-06 09:25:50 -08:00
Vicente Adolfo Bolea Sanchez
e4aa20594a Output CoordinateSystemTransforms results in Coordinates
This commit changes how CoordinateSystemTransforms write their result.

Before theoy would write their result in a DataSet in which the new
Coords where stored in a field with the name of:
 - cylindricalCoordinateSystemTransform
 - sphericalCoordinateSystemTransform

Now, they write their results as a DataSet in which its first Coords
are the transformed Coords. Previous Coordinates are appended

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-05 15:21:47 -05:00
Vicente Adolfo Bolea Sanchez
9d0da855b3 ConvertNumComponentsToOffsets using ScanExtented vs. ScanExclusive
This commit also:
- Removes a corner case not longer used at ArrayPortalGroupVecVariable::get
- Changes doc regarding the number of offset elements in the input
  array handler of ConvertNumComponentsToOffsets.
- Updates invokation of make_ArrayGroupVectVariable in multiple files
- Adds its corresponding changelog entry
2020-03-05 10:57:34 -05:00
Robert Maynard
fd30525421 Restructure Contour algorithm to make it easier to add specialized versions 2020-02-27 16:08:00 -05:00
Robert Maynard
fd9c21c0d4 Merge topic 'correct_deprecated_prepare_warnings_from_map3d'
e78099e02 Update UnitTestWorkletMapField3d to use vtkm::cont::Token

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1976
2020-02-27 13:22:29 -05:00
Robert Maynard
e78099e02d Update UnitTestWorkletMapField3d to use vtkm::cont::Token 2020-02-27 10:07:10 -05:00
Robert Maynard
2a28fabf7f Merge topic 'mask_scatter_map3d_docs'
aa820aecc Add changelog for mask and scatter 3d scheduling support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1975
2020-02-27 09:11:22 -05:00
Robert Maynard
7457f5616c Merge topic 'invoker_gcc4_warnings'
f4153fe2f Correct warnings found with CUDA 10.2 + gcc 4.8.5

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1974
2020-02-27 09:10:44 -05:00
Robert Maynard
aa820aecc3 Add changelog for mask and scatter 3d scheduling support 2020-02-27 08:25:54 -05:00
Robert Maynard
8377806778 Merge topic 'introduce_mapfield_3d_scheduling'
1f1688483 Initial infrastructure to allow WorkletMapField to have 3D scheduling

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1938
2020-02-27 08:02:52 -05:00
Kenneth Moreland
5a0b22ffed Merge topic 'scoping-tokens'
e5a6f2d4b Make ArrayPortalWrapper more tolerant of host objects
8569359e1 Add threads library to vtkm_cont
69c03d902 Fix deadlock in rendering
14c3d90ac Fix race condition in UnitTestToken
9b876df96 Remove PortalType from ArrayHandleImplicitTraits
188d1c567 Correct "invalid" portal in ArrayHandleTransform
ec34cb56c Use new ways to get array portal in control environment
8ddde979f ArrayPortalToIterators gets custom iterator from ArrayPortalToken
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1953
2020-02-26 15:27:05 -05:00
Robert Maynard
f4153fe2f9 Correct warnings found with CUDA 10.2 + gcc 4.8.5
Found during building on Centos7 based Power9 machines
2020-02-26 15:16:35 -05:00
Kenneth Moreland
e5a6f2d4b6 Make ArrayPortalWrapper more tolerant of host objects
The ArrayPortalWrapper is used for both execution and control portals.
When it was wrapped around a control portal that does not work on CUDA
devices, we were getting ugly warnings even though the intention was
only to use it in the control environment.
2020-02-26 13:10:51 -07:00
Kenneth Moreland
8569359e14 Add threads library to vtkm_cont
With the new thread safety/token code, the vtkm_cont library now relies
on the pthreads library (or whatever threads library is used by std on
the system). Make sure this library gets added to vtkm_cont.
2020-02-26 13:10:50 -07:00
Kenneth Moreland
69c03d902d Fix deadlock in rendering 2020-02-26 13:10:49 -07:00
Kenneth Moreland
14c3d90ac3 Fix race condition in UnitTestToken
Apparently when future::get returns, it is not the case that all
resources of the future are cleaned up (only that the calling function
has returned). Do not rely on this resource cleanup for the test to
pass.
2020-02-26 13:10:48 -07:00
Kenneth Moreland
9b876df96f Remove PortalType from ArrayHandleImplicitTraits
The type for PortalType was declared before the class from which the
type came from. Normally this was not a big deal since the template was
resolved later, but nvcc seemed to have a problem with it.
2020-02-26 13:10:48 -07:00
Kenneth Moreland
188d1c5671 Correct "invalid" portal in ArrayHandleTransform
For an ArrayHandleTransform with no inverse functor, it really
only supports read-only portals. Thus, the non-const portal
for the execution environment was set to some unused control
portal. That was causing problems with CUDA, so make the
non-const portal valid (although without a Set).
2020-02-26 13:10:47 -07:00
Kenneth Moreland
ec34cb56c4 Use new ways to get array portal in control environment
Also fix deadlocks that occur when portals are not destroyed
in time.
2020-02-26 13:10:46 -07:00
Kenneth Moreland
8ddde979f0 ArrayPortalToIterators gets custom iterator from ArrayPortalToken
Because ArrayPortalToken does not have an IteratorType,
ArrayPortalToIterators assumed it had to wrap it in an
IteratorFromArrayPortal object. Now it uses PortalSupportsIterators
(from ArrayPortalHelpers.h) to determine whether the iterators are
there. This does work with ArrayPortalToken.
2020-02-26 13:10:44 -07:00
Kenneth Moreland
6b089be03e Add ArrayPortalToken object and implement Read/WritePortal
To get a portal to access ArrayHandle values in the control
environment, you now use the ReadPortal and WritePortal methods.
The portals returned are wrapped in an ArrayPortalToken object
so that the data between the portal and the ArrayHandle are
guaranteed to be consistent.
2020-02-26 13:10:37 -07:00
Robert Maynard
1f1688483e Initial infrastructure to allow WorkletMapField to have 3D scheduling 2020-02-25 15:23:41 -05:00
Kenneth Moreland
e43770888f Allow Token to have a NULL Internals
This fixes an issue where moving a Token object left the original Token
in an invalid state because the poiner to the internals was NULL. Rather
than allocate a new one, just make the Token work correctly if the
internals are NULL.
2020-02-25 09:39:31 -07:00
Kenneth Moreland
3671cbe168 Fix token issues with CUDA 2020-02-25 09:39:30 -07:00
Kenneth Moreland
098e0fed16 Back out of passing a token when transfering virtual objects
It is questionable whether there is a point to having a token object
when transfering a virtual object to a device (since there is a handle
object that is managing it anyway). Back out of passing the token all
the way down unless there is an actual need for that.
2020-02-25 09:39:29 -07:00
Kenneth Moreland
7aa043b0da Add necessary tokens to OpenMP device algorithms 2020-02-25 09:39:28 -07:00
Kenneth Moreland
b2fdf236e7 Fix deadlocks in device adapters and low level tests
The new Token functionality makes it easy for a thread to deadlock
itself if it does not detach a token after it is done.
2020-02-25 09:39:27 -07:00
Kenneth Moreland
1149a0f7fb Add change log for scoping tokens 2020-02-25 09:39:26 -07:00
Kenneth Moreland
ad0a53af71 Convert execution preparation to use tokens
Marked the old versions of PrepareFor* that do not use tokens as
deprecated and moved all of the code to use the new versions that
require a token. This makes the scope of the execution object more
explicit so that it will be kept while in use and can potentially be
reclaimed afterward.
2020-02-25 09:39:19 -07:00
Kenneth Moreland
642b59f4fd Allow a token to attach to an ArrayHandle multiple times
When a single `ArrayHandle` is given to multiple arguments of a worklet
dispatch, the `PrepareFor*` methods will be called multiple times with
the same token. If one of them is a `PrepareForInPlace` or
`PrepareForOutput`, then the two requests will deadlock. To prevent
this, allow the `PrepareFor*` to happen if the same token was used
previously.
2020-02-25 07:41:40 -07:00
Kenneth Moreland
76ce9c87f0 Support using Token calling PrepareForExecution in ExecutionObject
The old version of ExecutionObject (that only takes a device) is still
supported, but you will get a deprecated warning if that is what is
defined.

Supporing this also included sending vtkm::cont::Token through the
vtkm::cont::arg::Transport mechanism, which was a change that propogated
through a lot of code.
2020-02-25 07:41:39 -07:00
Kenneth Moreland
ef3f544a67 Add ability to attach token to general ArrayHandle
Duplicated the new versions of PrepareFor* methods from the basic
ArrayHandle that take a token in addition to the other arguments. The
ArrayHandle attaches itself to the token and will not allow operaitons
that make the returned portal invalid until the token goes out of scope.

Later the old versions will be deprecated.
2020-02-25 07:41:37 -07:00
Kenneth Moreland
5f44f3727c Add ability to attach token to standard ArrayHandle
Added new versions of PrepareFor* methods that take a token in addition
to the other arguments. The ArrayHandle attaches itself to the token and
will not allow operations that make the returned portal invalid until
the token goes out of scope.

Later the old versions will be deprecated.
2020-02-25 07:41:36 -07:00
Kenneth Moreland
a49fa83035 Add Token 2020-02-25 07:41:36 -07:00
Kenneth Moreland
6c91757351 Merge topic 'oruebel/vtk-m-cleanup/contourtreeaugmented'
47249ee3c Merge branch 'master' into oruebel/vtk-m-cleanup/contourtreeaugmented
392854ee3 Replace C-tyle casts with C++ style
230ef15e4 Fix layout of array definition in unit test
712ae1063 Fix memory bug in contour tree unit test
4501afb24 Iprove array style in test
3f9988253 Remove completed TODO items
45e9684d9 Improve layout of arrays in unit test
0a897aa94 Improve layout of arrays in unit test
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1972
2020-02-25 09:39:17 -05:00
Kenneth Moreland
47249ee3c0 Merge branch 'master' into oruebel/vtk-m-cleanup/contourtreeaugmented 2020-02-24 20:53:47 -07:00
Vicente Bolea
bd3256a2d6 Merge topic 'fix-readme-example-code'
ba030da1d remove confusing parts of the README example code
8dcd02422 fix README.md code example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1959
2020-02-24 15:04:05 -05:00