Commit Graph

3593 Commits

Author SHA1 Message Date
Robert Maynard
1c5feeb185 Make sure all device specific tests use the intended device.
This means that we not only setup the runtime device tracker
to force the intended device, it also means making sure
the default device is the error device.
2018-05-16 08:21:16 -04:00
Robert Maynard
30205be832 Make sure PointLocatorUniformGrid always uses the provided device adapter 2018-05-16 08:21:16 -04:00
Robert Maynard
74df09fbe0 Remove unneeded trailing ; from PointLocatorUniformGrid
These cause warnings with the nvcc compiler
2018-05-16 08:21:16 -04:00
Robert Maynard
a4b16c4b4e Merge topic 'deviceadapter_runtime_odr'
e28244f3 Re-implement DeviceAdapterRuntimeDetector to avoid ODR violations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1206
2018-05-15 17:31:01 -04:00
Haocheng LIU
2e62d78b49 Make vtkm:Math Pi() operations constexpr
If they are used inside other mathematical expressions then the compiler
has a better chance to perform the operation at compile time.
2018-05-15 14:27:26 -04:00
Robert Maynard
e28244f345 Re-implement DeviceAdapterRuntimeDetector to avoid ODR violations.
The previous implementation of DeviceAdapterRuntimeDetector caused
multiple differing definitions of the same class to exist and
was causing the runtime device tracker to report CUDA as disabled
when it actually was enabled.

The ODR was caused by having a default implementation for
DeviceAdapterRuntimeDetector and a specific specialization for
CUDA. If a library had both CUDA and C++ sources it would pick up
both implementations and would have undefined behavior. In general
it would think the CUDA backend was disabled.

To avoid this kind of situation in the future I have reworked VTK-m
so that each device adapter must implement DeviceAdapterRuntimeDetector
for that device.
2018-05-15 13:08:34 -04:00
Robert Maynard
d77ac2c8dd Don't explicitly set backend on tests that use error backend.
The per device tests specifically setup the default backend to
be error to smoke out bad uses of the default backend.
2018-05-11 14:21:36 -04:00
Kenneth Moreland
0753131a04 Replace ExecutionObjectFactoryBase with ExecutionObjectBase
While making changes to how execution objects work, we had agreed to
name the base object ExecutionObjectBase instead of its original name of
ExecutionObjectFactoryBase. Somehow that change did not make it through.
2018-05-10 17:53:39 -06:00
Robert Maynard
e79e6a3403 Merge topic 'buildin_more_cuda_classes'
571556d9 CUDA's RuntimeDeviceTracker and Timer are now built as part of vtkm_cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1196
2018-05-10 16:34:25 -04:00
Robert Maynard
571556d984 CUDA's RuntimeDeviceTracker and Timer are now built as part of vtkm_cont
This is done to not only reduce the amount of code that users need
to generate but to reduce the amount of errors when using
the RuntimeDeviceTracker. If the runtime device tracker is initially
used in a library by a c++ file it will never properly detect the
cuda backend. By moving the code into vtkm_cont we can make sure
this problem doesn't occur.
2018-05-10 10:57:06 -04:00
Sujin Philip
0c1634bbc3 Fix a few more warnings
These warnings were detected on my local machine.
2018-05-09 17:49:45 -04:00
Sujin Philip
48d298e0af Merge topic 'suppress-cuda-warnings'
2f92e405 Suppress false positive cuda warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1192
2018-05-09 16:31:53 -04:00
Kenneth Moreland
b71416606b Merge topic 'fix-aspect-projections'
0da55730 Fix scaling of x/y field of views
39b347db Fix raytrace using wrong fov with standard camera

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1185
2018-05-09 16:02:40 -04:00
Sujin Philip
2f92e40503 Suppress false positive cuda warnings
Suppresses "declared but never referenced" warnings.
2018-05-09 13:17:37 -04:00
Sujin Philip
477eff2954 Merge topic 'fix-warnings'
78577345 Fix warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1191
2018-05-09 12:58:44 -04:00
Robert Maynard
916c0902cf Correct Wstrict-overflow issues with gcc 5 and 6 2018-05-09 08:26:45 -04:00
Robert Maynard
b7ab0f1194 ContourTreeUniform ignores strict-overflow optimization warnings.
Numerous worklets of ContourTreeUniform generate optimizations that
presume no vtkm::Id overflow. This assumption is correct, and the
related warning about this optimization can be safely ignored.
2018-05-08 17:38:35 -04:00
Robert Maynard
2a75dd50ee Merge topic 'morton_codes_maybe-uninitialized_warnings'
62c7b745 VTK-m MortonCodes on GCC 7 was generating maybe-uninitialized warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1189
2018-05-08 16:34:15 -04:00
Robert Maynard
bb279506a1 Merge topic 'cuda_75_signed_warnings'
364b366a Correct signed/unsigned cast warnings from DeviceAdapterAlgorithmThrust

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1193
2018-05-08 16:33:35 -04:00
Robert Maynard
62c7b745df VTK-m MortonCodes on GCC 7 was generating maybe-uninitialized warnings.
The id4 while always valid is constructed using a lookup table and the
compiler can't see if that will always be a valid vec 4.
2018-05-08 15:45:38 -04:00
Robert Maynard
cd85892670 Merge topic 'connectivity_maybe_uninitialized'
b26a428d DataSetBuilderUniform won't trigger false positive uninitialized warning.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !1186
2018-05-08 15:38:37 -04:00
Robert Maynard
0a26f3749e Merge topic 'image_connectivity_warnings'
21b80a5d UnitTestImageConnectivity now uses size_t to index to std::vector
44382300 Make sure all tests use the .cxx extension.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !1190
2018-05-08 15:37:24 -04:00
Robert Maynard
364b366ab3 Correct signed/unsigned cast warnings from DeviceAdapterAlgorithmThrust
Found with CUDA 7.5
2018-05-08 15:29:11 -04:00
Sujin Philip
78577345e2 Fix warnings
Fixes "switch statement contains 'default' but no 'case' labels" warning.
2018-05-08 15:03:10 -04:00
Utkarsh Ayachit
e7c3b2f849 Merge topic 'fixing-warnings'
593061cf UnitTestPointTransform: fix errors when using `double` as float type.
20e7cd41 Demo.cxx: fix type conversion warning
bd43f4b1 UnitTestCellDerivative: fix type conversion warning.
7f58019e cleanup doxygen warnings
16444517 CellDerivative: fix type conversion warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !1188
2018-05-08 15:02:44 -04:00
Utkarsh Ayachit
593061cfb0 UnitTestPointTransform: fix errors when using double as float type. 2018-05-08 14:52:23 -04:00
Utkarsh Ayachit
bd43f4b1fd UnitTestCellDerivative: fix type conversion warning. 2018-05-08 14:52:22 -04:00
Utkarsh Ayachit
7f58019eb6 cleanup doxygen warnings 2018-05-08 14:52:22 -04:00
Utkarsh Ayachit
1644451715 CellDerivative: fix type conversion warnings 2018-05-08 14:52:22 -04:00
Robert Maynard
b26a428d36 DataSetBuilderUniform won't trigger false positive uninitialized warning.
The logic inside DataSetBuilderUniform has some tricky logic but for all
cases the dimensions are correct. We just initialize the variable to make
the compiler stop warning.
2018-05-08 13:57:50 -04:00
Robert Maynard
21b80a5dcd UnitTestImageConnectivity now uses size_t to index to std::vector 2018-05-08 13:52:54 -04:00
Robert Maynard
443823007c Make sure all tests use the .cxx extension. 2018-05-08 13:52:32 -04:00
Robert Maynard
d0fc332cc0 Correct conversion warnings in the streamline filter.
The strealine filter was incorrectly converting all inputs to
vtkm::FloatDefault which can cause a warning when FloatDefault is double
2018-05-08 13:25:49 -04:00
Li-Ta Lo
269b940fe6 Merge topic 'connected_component'
d3dbdd59 remove using namespace, specify fully qualified names
ae5e3be8 Merge branch 'connected_component' of gitlab.kitware.com:ollielo/vtk-m into connected_component
f655e8f1 add overload of Run() for ArrayHandle
6f853971 Add vtkm::worklet::connectivity namespace
ce27f5fc Change signature of ImageConnectivity::Run()
648b0dec add installation of header files in CMakeLists.txt
d94f2cae Add ImageConnectivity worklet
ca0e9d20 Change signature of ImageConnectivity::Run()
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1154
2018-05-08 11:08:54 -04:00
Dave Pugmire
4fec7e6919 Merge topic 'point_translate'
6dd82d69 Create a new worklet for point transformations. Also provide a unitest.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1177
2018-05-08 08:32:57 -04:00
Kenneth Moreland
0da5573085 Fix scaling of x/y field of views
Prevously, the x field of view was computed by scaling the y field of
view by the aspect ratio of the canvas. However, this is wrong because
the field of view angles do not scale linearly with the aspect ratio.
Fix this issue by using trig functions to convert the angle to distance,
scale the distance, and then convert back to angle.
2018-05-07 18:40:45 -06:00
Kenneth Moreland
39b347dbd0 Fix raytrace using wrong fov with standard camera
The raytracing code has its own version of camera that maintains two
field of view (fov) parameters: one for the x direction and one for the
y. The standard vtkm::rendering::Camera contains only one fov. As is
consistent with OpenGL's gluPerspective and VTK's camera, the fov is
specified in the y direction. However, the raytracing code was
incorrectly using it in the x direction. That caused it to do a weird
rescaling when the aspect ratio was not 1.
2018-05-07 18:03:03 -06:00
Robert Maynard
ed7487d150 Merge topic 'worklets_obey_device_adapter'
626a49cc Worklet Dispatcher calls now consistently specify a device adapter
a6bf830f ParticleAdvection run method now obeys the passed in device adapter

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1179
2018-05-04 17:25:33 -04:00
Robert Maynard
dcbd5b9e81 Merge topic 'correct_gcc_7_warnings'
737ea7e1 Suppress maybe-uninitialized warnings for gcc 4+
7ac4ae15 Marching Cubes test doesn't abuse fall through case statements

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1182
2018-05-04 17:25:10 -04:00
Robert Maynard
737ea7e156 Suppress maybe-uninitialized warnings for gcc 4+
The maybe uninitialized warnings condition logic wasn't correct the
first time, and needed to be extended for gcc4+. This locally has
resolved the problems the first try didn't solve.
2018-05-04 15:28:44 -04:00
Robert Maynard
7ac4ae1507 Marching Cubes test doesn't abuse fall through case statements 2018-05-04 15:19:11 -04:00
Robert Maynard
626a49cc0b Worklet Dispatcher calls now consistently specify a device adapter
Some worklets Run() method accidentally used the default device adapter
which should be avoided. Instead they should use a passed in device
adapter so that we support multiple device adapters in the same
binary/executable.
2018-05-04 15:12:49 -04:00
Robert Maynard
a6bf830f5f ParticleAdvection run method now obeys the passed in device adapter
Previous ParticleAdvection would dispatch some of the worklets
on the default device adapter and not the explicitly requested
device adapter
2018-05-04 15:12:49 -04:00
Robert Maynard
fb0da7f2de Allow vtkm_find_gl CMake function to be used no matter vtk-m settings
Previously vtkm_find_gl was only usable when rendering was enabled.
This is problematic as examples would use vtkm_find_gl even if
they didn't use vtkm rendering library.
2018-05-04 15:01:06 -04:00
Matthew Letter
d32f8213e4 Removed template for device from execution object
the execution object is no longer passed when making execution object instead it is pass in the transport tag to create the final execution object
2018-05-03 14:59:54 -06:00
Matthew Letter
fce5fea31f Changed how TriangulateTables.h was creating ExecutionObjects
abstracted out execution objects for both tetrahedralize and triangulate and removed the device template requirement from the execution object factory for both classes
2018-05-03 14:59:54 -06:00
Matthew Letter
5d1e8cccb4 corrected logical error in texture2d and cleaned up particles.h
cleaned up a logic error texture2d and cleaned how the constructor for execution object was being called. Also, went and cleaned up how the execution object was being created for particle to align it with the same method for creating the execution object.
2018-05-03 14:45:22 -06:00
Matthew Letter
7eb3556491 Created an execution object for Texture2D
abstracted out the execution object from the execution object factory and removed the device template from the factory.
2018-05-03 14:45:22 -06:00
Matthew Letter
7cb2421edf moved a function out of the execution environment
The factory should not eb being called from the execution environment.
2018-05-03 14:45:22 -06:00
Matthew Letter
35085442b4 cleaning up compilation warings in particles.h 2018-05-03 14:45:22 -06:00