Commit Graph

4569 Commits

Author SHA1 Message Date
Dave Pugmire
6dd82d69b2 Create a new worklet for point transformations. Also provide a unitest. 2018-05-03 10:53:11 -04:00
Robert Maynard
9edd5cd383 Merge topic 'correct_delve_vs2015_cuda_errors'
c9ba80ad Replace uint with vtkm::Id in DeviceAdapterAlgorithmThrust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1174
2018-05-02 13:30:53 -04:00
Robert Maynard
c9ba80ad93 Replace uint with vtkm::Id in DeviceAdapterAlgorithmThrust
The usage of uint was causing problems with CUDA + MSVC2015 as
type was not defined. Instead we use vtkm::Id as that was the expect
type to be passed to the task
2018-05-02 09:55:56 -04:00
Kenneth Moreland
bb54d9d411 Merge topic 'scatter-on-dispatcher'
edc4c85f Move Scatter from Worklet to Dispatcher

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1172
2018-05-01 12:17:32 -04:00
Robert Maynard
06e15e601d Merge topic 'vtkm_vec_constructor_bug'
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
2018-05-01 08:29:45 -04:00
Robert Maynard
e32eebeae9 Merge topic 'cuda_task_strided'
b56894dd Move VTK-m Cuda backend over to a grid-stride iteration pattern.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1171
2018-05-01 08:15:45 -04:00
Robert Maynard
b56894dd09 Move VTK-m Cuda backend over to a grid-stride iteration pattern.
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.
2018-04-30 17:29:26 -04:00
Robert Maynard
adcabb034b VTK-m Vec<> constructors are now more conservative.
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.
2018-04-27 16:47:54 -04:00
Robert Maynard
6267deb67e CellDerivativeFor3DCell has a better version for Vec of Vec fields.
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]]
2018-04-27 08:14:34 -04:00
Kenneth Moreland
edc4c85fd9 Move Scatter from Worklet to Dispatcher
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.
2018-04-27 00:43:51 -04:00
Kenneth Moreland
5c5fb020a8 Merge topic 'fix-test-header-builds'
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
2018-04-25 23:01:10 -04:00
Robert Maynard
4e7837e9f9 Merge topic 'reduce_unneeded_copies_in_colortable_code'
1ec478ce ColorTable now converts to and from double less often.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1169
2018-04-25 16:27:35 -04:00
Robert Maynard
1ec478ce62 ColorTable now converts to and from double less often.
Previously we would convert to double to perform some operations instead
of always staying in float space.
2018-04-25 15:35:27 -04:00
Robert Maynard
370eddae7b Merge topic 'vtkm_type_calls_consistently_inline'
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
2018-04-25 14:35:54 -04:00
Robert Maynard
dc6e7d1ac8 Make all Vec types consistently mark methods as inline 2018-04-25 10:48:28 -04:00
Robert Maynard
e10ee281c7 Merge topic 'correct_more_build_warnings'
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
2018-04-24 15:27:56 -04:00
Robert Maynard
4b9a8143c8 Correct 'may be used uninitialized in this function' warnings in wavelets 2018-04-24 13:27:51 -04:00
Robert Maynard
ebf96077fd Correct casting warnings found inside vtkm_rendering 2018-04-24 13:00:33 -04:00
Kenneth Moreland
d393468e9c Add any OpenGL link targets to test builds 2018-04-24 11:47:26 -04:00
Robert Maynard
666a9c4f71 Merge topic 'improve_cuda_debug_build_warnings'
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
2018-04-24 08:14:15 -04:00
Robert Maynard
7c7b1ed54a Make sure when compiling CUDA code we suppress unknown pragma 2018-04-23 15:27:08 -04:00
Robert Maynard
b7e6371842 Correct issues found be enabling more CUDA warnings. 2018-04-23 14:27:53 -04:00
Robert Maynard
4ca2522c6e VTK-m when building CUDA code in debug now checks for more warnings 2018-04-23 14:27:53 -04:00
Utkarsh Ayachit
1fe36af41f Merge topic 'fix-determine-version'
cf91ca52 Fix issues with VTKmDetermineVersion.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1166
2018-04-23 10:58:46 -04:00
Utkarsh Ayachit
cf91ca520e Fix issues with VTKmDetermineVersion.
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.
2018-04-23 10:30:27 -04:00
Utkarsh Ayachit
6d0e3036e4 Merge topic '220-filter-copy-fields'
cb7cbdbc fixes #220: pass only requested fields.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1162
2018-04-23 09:16:28 -04:00
Utkarsh Ayachit
8634ecbb8b Merge topic 'serialization-cleanups'
5d3d4971 Avoid using ArrayHandle for message exchange.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1157
2018-04-23 09:16:12 -04:00
Robert Maynard
4234fe4cb1 Merge topic 'correct_specify_visbility_controls'
51da7fab VTK-m now correctly specifies hidden symbol visibility be default.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1163
2018-04-23 09:06:58 -04:00
Robert Maynard
b62913bcac Merge topic 'update_vtkmconfig_documentation'
0bde9b9a Update VTKmConfig documentation to list variables and targets VTK-m constructs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1159
2018-04-20 16:07:27 -04:00
Robert Maynard
e9c5088506 Merge topic 'reandering-contexts-in-external-project'
96ff3a53 Find OpenGL libraries in external projects

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1161
2018-04-20 14:35:21 -04:00
Robert Maynard
51da7faba2 VTK-m now correctly specifies hidden symbol visibility be default.
This correct very weird runtime crashes that showed up under CUDA 7.5
2018-04-20 14:30:51 -04:00
Utkarsh Ayachit
cb7cbdbcf9 fixes #220: pass only requested fields.
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.
2018-04-20 14:22:47 -04:00
Robert Maynard
b34e0979a2 Merge topic 'support_relaxed_constexpr_windows_cuda'
eb25956a On MSVC+CUDA pass -expt-relaxed-constexpr

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1156
2018-04-20 13:42:34 -04:00
Kenneth Moreland
96ff3a5343 Find OpenGL libraries in external projects
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.
2018-04-19 19:41:46 -06:00
Utkarsh Ayachit
5d3d49713a Avoid using ArrayHandle for message exchange.
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.
2018-04-19 21:06:38 -04:00
Kenneth Moreland
8b9c0f50f1 Re-add non testable files to test build sources
The vtkm_add_header_build_test was changed to identify "valid" header
files that were actually tested and only adding those to the source
list. This was a mistake. A big part of the point of adding headers that
are not tested to the test build sources is to list them to an IDE.
2018-04-19 15:31:41 -06:00
Kenneth Moreland
ffd98463f5 Load correct file extension in header test build
Not all VTK-m headers end in .h, but the created test build files
assumed that it was loading in a .h file. Fixed that.
2018-04-19 15:14:32 -06:00
Kenneth Moreland
7c5f44a65d Fix warnings about no symbols
The test build file did not actually define any symbols, so the linker
might give a warning about it not being used in the library. Define some
unique symbol so that the linker will not complain.
2018-04-19 15:10:57 -06:00
Kenneth Moreland
289a4bc1aa Differentiate between header files with different extensions
If you tried to create test builds of a header.h and header.hxx, you
would get an error about building two files with the same name (tried to
build header.cxx for both of them). Fixed this by adding the original
extension name to the source file name.
2018-04-19 15:02:33 -06:00
Kenneth Moreland
9571c9b54f Fix vtkm_add_header_build_test
The CMake configuration stopped creating any of the test builds. There
were a couple of errors introduced into this function that needed to be
fixed.

First, the condition on whether the testing should be skipped got
reversed. It was trying to create test build files for all the headers
that were not supposed to be built instead of the ones that were.

Second, the list of source files to build was not created correctly. The
set command that stored the name of the source file got removed, and so
nothing was being added to the list. I restored the variable and used
that consistently for the source file name.
2018-04-19 14:31:30 -06:00
Robert Maynard
0bde9b9afa Update VTKmConfig documentation to list variables and targets VTK-m constructs
Fixes #219
2018-04-19 16:27:38 -04:00
Robert Maynard
172e3929fd Merge topic 'restore_cmake_33_support'
e6297885 Remove usage of CMake commands that don't exist in CMake 3.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1158
2018-04-19 15:41:11 -04:00
Robert Maynard
e62978853b Remove usage of CMake commands that don't exist in CMake 3.3 2018-04-19 15:31:43 -04:00
Robert Maynard
eb25956ae2 On MSVC+CUDA pass -expt-relaxed-constexpr 2018-04-19 10:06:20 -04:00
Utkarsh Ayachit
8a5f0a521d Merge topic 'redistribute-points-examples'
07ba6c25 example: redistribute points using DIY
e62ff809 Fix BoundsCompute for missing coordinate system.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matt Larsen <mlarsen@cs.uoregon.edu>
Merge-request: !1151
2018-04-18 11:51:25 -04:00
Robert Maynard
84386f28eb Merge topic 'correct_maybe_uninitialized_warnings'
da45e81d Make sure that WaveletTransform doesn't emit maybe-uninitialized warnings
c33bf063 RK4Integrator now properly initializes all variables.
d2001fb5 Suppress strict overflow optimization warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1152
2018-04-17 14:51:34 -04:00
Robert Maynard
b75d015c41 Merge topic 'allow_cuda_tests_to_run_on_mac'
8c7c1be2 Specify an RPATH for CUDA runtime on OSX so tests will run

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1153
2018-04-17 14:25:07 -04:00
Robert Maynard
da45e81d9b Make sure that WaveletTransform doesn't emit maybe-uninitialized warnings 2018-04-17 14:24:19 -04:00
Robert Maynard
c33bf063f4 RK4Integrator now properly initializes all variables.
Previously the RK4Integrator could compute velocity with uninitialized inputs.
2018-04-17 14:24:19 -04:00
Robert Maynard
8c7c1be232 Specify an RPATH for CUDA runtime on OSX so tests will run 2018-04-17 14:05:07 -04:00