dec4b96d3 Fix warning about using a deprecated method
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !2007
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
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
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.
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).
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
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.
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.
`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).
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.
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.
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
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.
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
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.
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.
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>
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.
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
fd3052542 Restructure Contour algorithm to make it easier to add specialized versions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1973
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
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.
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.
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