Commit Graph

7225 Commits

Author SHA1 Message Date
Vicente Adolfo Bolea Sanchez
873f6bab0c check more types in UnitTestScatterAndMaskWithTopology
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-24 20:20:46 -04:00
Matt Larsen
c49390f253 Merge topic 'fix/light_position'
6a809676d re-set ray camera for default light

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2004
2020-03-21 18:40:42 -04:00
Matt Larsen
6a809676d6 re-set ray camera for default light 2020-03-21 14:07:05 -07:00
Matt Larsen
107cccd687 Merge topic 'fix/portal_warnings'
e88937368 fix scalar renderer portal warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2003
2020-03-21 11:32:27 -04:00
Matt Larsen
e889373686 fix scalar renderer portal warning 2020-03-21 08:29:19 -07:00
Matt Larsen
d9cfb8687f Merge topic 'scalar_renderer'
33a154337 add deprecation
a7363c283 alter interface of scalar renderer result
5fc77cb58 warnings and store depth separately
aa468f5c0 more warning fixes
0943784c2 fix warning
094758e55 make result public?
70584ac8f fix benchmarks
458be65e9 fix logic error
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1962
2020-03-21 10:28:12 -04:00
Vicente Bolea
35276434bd Merge topic 'fix-475-support-sg-3d-scheduling'
e2c32ffac add unit test for WorkletMapTopology
0e90c22e7 Worklet{MapTopology,PointNeighbor} custom sg/mask

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1980
2020-03-19 11:17:12 -04:00
Kenneth Moreland
7108f745ad Merge topic 'implicit-copy-ctor'
783bc15ff Do not rely on implict copy constructors when destructor defined

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1999
2020-03-19 10:27:10 -04:00
Kenneth Moreland
783bc15ffd Do not rely on implict copy constructors when destructor defined
As a general C++ "rule of three," if one of a copy constructor, copy
assignment, or destructor is defined, all three should be defined. Some
compilers issue warnings if this rule of three is violated.

It is sometimes the case that we define a destructor simply because it
is only valid in the control environment. When doing so, add
implementations for copy constructor and assignment as well.
2020-03-18 14:53:14 -06:00
Kenneth Moreland
60a720d523 Merge topic 'portal-check-3d'
5a805b6dc Properly handle Get(Id3) in ArrayPortalCheck

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1998
2020-03-18 15:00:11 -04:00
Kenneth Moreland
5a805b6dc9 Properly handle Get(Id3) in ArrayPortalCheck
Previously, the ArrayPortalCheck wrapper did not allow access to the
superclass' Get for 3D indices. This solves that problem and also fixes
it for Set (assuming there is ever an instance of that).
2020-03-18 10:51:20 -06:00
Vicente Adolfo Bolea Sanchez
e2c32ffac7 add unit test for WorkletMapTopology
Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-18 10:26:58 -04:00
Kenneth Moreland
ac604d5673 Merge topic 'vtkm-tuple'
75a46dc2e Remove tao tuple from third party libraries
e05588a19 Add changelog for Tuple
f639e152d Fix ICE in VS 2015
625a6b4a9 Fix CUDA parse error
6f0edbec2 Move from tao::tuple to vtkm::Tuple
dca814434 Add vtkmstd::integer_sequence
5773ea3e1 Add porting layer for future std features
56636afc7 Make Tuple class

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1977
2020-03-17 11:49:50 -04:00
Kenneth Moreland
75a46dc2eb Remove tao tuple from third party libraries
We are no longer using this code. It has been replaced by vtkm::Tuple.
2020-03-16 17:12:17 -06:00
Kenneth Moreland
e05588a199 Add changelog for Tuple 2020-03-16 17:12:17 -06:00
Kenneth Moreland
f639e152db Fix ICE in VS 2015
After lots of experimenting, it appears that VS 2015 has problems when
you list a variate template argument before a normal template argument
in a specialization of a function, The compiler seems happy when the
variate argument is placed at the end of the template arguments.
2020-03-16 17:12:16 -06:00
Kenneth Moreland
625a6b4a93 Fix CUDA parse error
The nvcc compiler was having problem resolving a template partial
specialization that contained a template param with its own number
list and another param that depended on that template.
2020-03-16 17:12:16 -06:00
Kenneth Moreland
6f0edbec24 Move from tao::tuple to vtkm::Tuple
The new version of vtkm::Tuple should be faster. It also gives us more
control over the implementation and can provide some VTK-m specific
things.
2020-03-16 17:12:16 -06:00
Kenneth Moreland
dca8144345 Add vtkmstd::integer_sequence
`integer_sequence` is an essential tool when dealing with structures
like a `Tuple`. Make sure that we have one (even though it was not
introduced until C++14).
2020-03-16 17:12:16 -06:00
Kenneth Moreland
5773ea3e13 Add porting layer for future std features
Currently, VTK-m is using C++11. However, it is often useful to use
features in the `std` namespace that are defined for C++14 or later. We
can provide our own versions (sometimes), but it is preferable to use
the version provided by the compiler if available.

There were already some examples of defining portable versions of C++14
and C++17 classes in a `vtkmstd` namespace, but these were sprinkled
around the source code.

There is now a top level `vtkmstd` directory and in it are header files
that provide portable versions of these future C++ classes. In each
case, preprocessor macros are used to select which version of the class
to use.
2020-03-16 17:12:16 -06:00
Kenneth Moreland
56636afc7a Make Tuple class
Made a new vtkm::Tuple class to replace tao tuple.

This version of Tuple should hopefully compile faster. Having our own
implementation should also make it easier to port to new devices.
2020-03-16 17:12:16 -06:00
Kenneth Moreland
d0d1f750c2 Merge topic 'no-control-portal-locking'
594c73c06 Simplify use of ControlArrayValid
acc9774f6 Fix CUDA warnings
10e8a4a7f Remove locking control ArrayPortals

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1988
2020-03-16 17:52:31 -04:00
Kenneth Moreland
594c73c06d Simplify use of ControlArrayValid
Can allocate and set in one step to simplify the code.
2020-03-16 13:01:50 -06:00
Kenneth Moreland
acc9774f67 Fix CUDA warnings 2020-03-16 07:10:11 -06:00
Kenneth Moreland
10e8a4a7f9 Remove locking control ArrayPortals
Previously, when a ReadPortal or a WritePortal was returned from an
ArrayHandle, it had wrapped in it a Token that was attached to the
ArrayHandle. This Token would prevent other reads and writes from the
ArrayHandle.

This added safety in the form of making sure that the ArrayPortal was
always valid. Unfortunately, it also made deadlocks very easy. They
happened when an ArrayPortal did not leave scope immediately after use
(which is not all that uncommon).

Now, the ArrayPortal no longer locks up the ArrayHandle. Instead, when
an access happens on the ArrayPortal, it checks to make sure that
nothing has happened to the data being accessed. If it has, a fatal
error is reported to the log.
2020-03-16 07:10:10 -06:00
Matt Larsen
23a202b881 Merge topic 'matlock'
23075d5ff remove fake functors
a7097d92f actually ensure that lost rays move forward
bf3ebaa1c prevent raise error from raising error

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1993
2020-03-15 23:18:42 -04:00
Matt Larsen
23075d5ff5 remove fake functors 2020-03-15 14:56:02 -07:00
Kenneth Moreland
542aeb79e8 Merge topic 'no-cell-op-errors'
074872580 Make sure return value of cell operations is initialized
51e817adc Introduce vtkm::ErrorCode
04edc3d20 Avoid raising errors when operating on cells

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <larsen30@llnl.gov>
Merge-request: !1991
2020-03-15 17:49:52 -04:00
Matt Larsen
a7097d92f8 actually ensure that lost rays move forward 2020-03-15 13:49:02 -07:00
Kenneth Moreland
0748725806 Make sure return value of cell operations is initialized
Even if an error condition occurs, the output parameter should be
initialized to something. This makes the behavior predicatable on error
conditions and prevents uninitialized variable warnings.
2020-03-14 00:24:13 -06:00
Kenneth Moreland
51e817adc1 Introduce vtkm::ErrorCode
This is a flag that functions in the execution environment can return to
report on the status of the operation. This way they can report an error
without forcing the entire invocation to shut down.
2020-03-13 18:58:33 -06:00
Vicente Adolfo Bolea Sanchez
0e90c22e70 Worklet{MapTopology,PointNeighbor} custom sg/mask
The change affects the method GetThreadIndices for both
WorkletMapTopology and WorkletPointNeighborhood.

Before an scatter or mask which was not ScatterIdentity or MaskNone
was not allowed and it was enforced at compilation time.

Signed-off-by: Vicente Adolfo Bolea Sanchez <vicente.bolea@kitware.com>
2020-03-12 11:49:10 -04:00
Kenneth Moreland
04edc3d202 Avoid raising errors when operating on cells
Cell operations like interpolate and finding parametric coordinates can
fail under certain conditions. Typically these call RaiseError on the
worklet. But that can make a worklet unstable, so provide paths where no
error is raised.
2020-03-12 07:50:01 -06:00
Matt Larsen
bf3ebaa1c7 prevent raise error from raising error 2020-03-11 14:56:42 -07:00
Matt Larsen
2796dc33d2 Merge topic 'ensure_progress'
aa7dcf915 push forward until new valid cell
6aafc42f1 move forward until encountering new cell for lost rays

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1985
2020-03-11 10:33:52 -04:00
Vicente Bolea
46d5ab9539 Merge topic 'fix-424-use-scanextended'
9d0da855b ConvertNumComponentsToOffsets using ScanExtented vs. ScanExclusive

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1964
2020-03-11 10:03:54 -04:00
Robert Maynard
c7f1779c11 Merge topic 'reorg_contour_worklet'
fd3052542 Restructure Contour algorithm to make it easier to add specialized versions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1973
2020-03-11 10:02:50 -04:00
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