adcabb03 VTK-m Vec<> constructors are now more conservative.
6267deb6 CellDerivativeFor3DCell has a better version for Vec of Vec fields.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1170
This allows for easier host side logic when determining grid and block
sizes, and allows for a smaller library side by moving some logic
into compiled in functions.
When you have a Vec<Vec<float,3>> it was possible to incorrectly correct
it with the contents of a Vec<double,3>. An example of this is:
using Vec3d = vtkm::Vec<double, 3>;
using Vec3f = vtkm::Vec<float, 3>;
using Vec3x3f = vtkm::Vec<Vec3f, 3>;
Vec3d x(0.0, 1.0, 2.0);
Vec3x3f b(x); // becomes [[0,0,0],[1,1,1],[2,2,2]]
Vec3x3f c(x, x, x); // becomes [[0,1,2],[0,1,2],[0,1,2]]
Vec3x3f d(Vec3f(0.0f,1.0f,2.0f)) //becomes [[0,0,0],[1,1,1],[2,2,2]]
So the solution we have chosen is to disallow the construction of objects such
as b. This still allows the free implicit cast to go from double to float.
So while `Vec3x3 b = x is supported by vtk-m, it produces very incorrect results.
It takes CellSetStructured<2> and DynamicArrayHandle and uses CastAndCall
to resolve data type for pixels. Moved implementation to the RunImpl
function object.
ImageConnectivity worklet implements a parallel connected component
labeling algorithm for 2D structured grids/images. For each pixel,
it search for the pixel's 6 neighbors and classify them as the
same connected component if their corresponding "color" field have
the same value.
Previously we would compute a 3x3 matrix where each element was a Vec. Using
the jacobain of a single component is sufficient so by using that we safe 2 to
3 times the memory space.
Additionally by moving to doing the derivative as a per component algorithm
we work around the issues found in bug
https://gitlab.kitware.com/vtk/vtk-m/issues/221. In effect when trying to
construct a Vec of Vec from a component of a different floating type e.g.:
Vec3d x(0.0, 1.0, 2.0);
Vec3f a = x;
Vec3x3f b = x;
Vec3x3f c(x, x, x);
Generates bad values vectors such as b which look like:
b: [[0,0,0],[1,1,1],[2,2,2]]
c: [[0,1,2],[0,1,2],[0,1,2]]
Previously, when a Worklet needed a scatter, the scatter object was
stored in the Worklet object. That was problematic because that means
the Scatter, which is a control object, was shoved into the execution
environment.
To prevent that, move the Scatter into the Dispatcher object. The
worklet still declares a ScatterType alias, but no longer has a
GetScatter method. Instead, the Dispatcher now takes a Scatter object in
its constructor. If using the default scatter (ScatterIdentity), the
default constructor is used. If using another type of Scatter that
requires data to set up its state, then the caller of the worklet needs
to provide that to the dispatcher. For convenience, worklets are
encouraged to have a MakeScatter method to help construct a proper
scatter object.
d393468e Add any OpenGL link targets to test builds
8b9c0f50 Re-add non testable files to test build sources
ffd98463 Load correct file extension in header test build
7c5f44a6 Fix warnings about no symbols
289a4bc1 Differentiate between header files with different extensions
9571c9b5 Fix vtkm_add_header_build_test
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1160
It takes CellSetStructured<2> and DynamicArrayHandle and uses CastAndCall
to resolve data type for pixels. Moved implementation to the RunImpl
function object.
The code had 2 issues:
1. used obsolete 'output' if Git executable was missing. There was a
possibility that output variable was never set and used some garbage
value from parent scope.
2. version pattern matching was too liberal and would match
absolute any long txt so long as it has some numbers in it that matched
a typical version number.
Adding API to DataSet to `CopyStructure` from another dataset. This
copies the cellsets and coordinate systems while leaving the fields
unchanged.
CreateResult no longer copies all input fields to the output dataset
created.
Furthermore, if a Filter subclass doesn't provide `MapFieldOntoOutput`,
then the default implementation simply copies only the selected fields
to the output dataset.
Minimizing the need to have complex serialization code in vtkm/cont.
This is first step in moving DIY serialization code out of vtkm/cont. We
need to move that to filter so we can leverage policy correctly
serialize fields.
Previously when an external project loaded VTK-m with find_package(VTKm)
and then tried to use anything with OpenGL, you would get compiler (and
probably linker) errors. The problem was that
VTKmRenderingContexts.cmake skipped over the loading of OpenGL libraries
because the vtkm_rendering_gl_context target was imported before this
code was ever called. Correct the problem by going through the motions
of checking OpenGL every time.
Adding an example that demonstrates how to write a distributed filter
that customizes the execution for all blocks in a MultiBlock. This is a
reinterpretation of the `reduce/all_to_all` example provided by DIY.
This warning is emitted when the compiler performs an optimization, and wants
you to verify that the presumptions it is making are valid. For this case
we can correctly promise the compiler that the values will not overflow and
the optimizations are correct.
dc6e7d1a Make all Vec types consistently mark methods as inline
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1168
4b9a8143 Correct 'may be used uninitialized in this function' warnings in wavelets
ebf96077 Correct casting warnings found inside vtkm_rendering
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1167
7c7b1ed5 Make sure when compiling CUDA code we suppress unknown pragma
b7e63718 Correct issues found be enabling more CUDA warnings.
4ca2522c VTK-m when building CUDA code in debug now checks for more warnings
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1164
Fixing template errors in integrators.
The code used to build locally, but fail on Kitware test machines.
Fixing templates as they were before any temporal advection changes.
The code had 2 issues:
1. used obsolete 'output' if Git executable was missing. There was a
possibility that output variable was never set and used some garbage
value from parent scope.
2. version pattern matching was too liberal and would match
absolute any long txt so long as it has some numbers in it that matched
a typical version number.