Commit Graph

2792 Commits

Author SHA1 Message Date
Robert Maynard
c4874340e5 Merge topic 'policy-inherit-defaults'
eb26b88c Change DefaultPolicy to PolicyDefault
bb32e408 Allow all policies to inherit defaults

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !619
2016-12-01 08:21:03 -05:00
Robert Maynard
a74bab02f4 Merge topic 'allow_reduction_to_different_T_type'
b97b4cc7 Allow thrust::reduce to work when iterator and initial value types differ.
64bcc343 Refactor MinAndMax to use vtkm::Vec<T,2> instead of Pair.
8d60ed57 Refactor MinAndMax to be a shared binary operator.
18375b54 Update Bound computations to always use a single Reduce call
2cfc9743 Reduce can support reduce to a T type that isn't the arrayhandles T type.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !614
2016-12-01 07:56:30 -05:00
Robert Maynard
f3c2f67660 Merge topic 'static-assert-windows'
349799fa Fix static assert for visual studio

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !618
2016-12-01 07:55:38 -05:00
Robert Maynard
7076b4df6b Merge topic 'cuda_correct_multiple_issues'
2b5b2ab1 Make sure FunctorsGeneral doest produce warnings when parsed by nvcc.
a7baa540 make sure cuda test build executables have all include directories.
213188b2 Properly use CUDA signbit functions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !628
2016-12-01 07:55:30 -05:00
Kenneth Moreland
ec5fd17536 Modify test_equal for values close to zero
I noticed the UnitTestTransform3D test failed using the random seed
1480544620. On closer inspection, I found that the issue was with the
comparison of two numbers close to 0. The numbers were just above the
threshold, but their difference was not quite enough to make the ratio
below the threshold.

After reviewing some other floating point comparisons, they seem to be
more forgiving of numbers close to 0. Thus, I changed this comparison to
pass if the difference between the numbers was below the threshold.

Because this makes the comparison a lot more forgiving for small
numbers, I lowered the default threshold by an order of magnitude. So
far it looks like the tests are passing, but we should look out for
occasional failures.
2016-11-30 21:57:15 -06:00
Robert Maynard
2b5b2ab1f8 Make sure FunctorsGeneral doest produce warnings when parsed by nvcc. 2016-11-30 17:13:12 -05:00
Robert Maynard
a7baa5409d make sure cuda test build executables have all include directories. 2016-11-30 17:12:41 -05:00
Robert Maynard
213188b2c3 Properly use CUDA signbit functions. 2016-11-30 15:36:51 -05:00
Robert Maynard
540ec13287 Merge topic 'cmake_config_require_cmake33'
6db006a2 VTK-m cmake config files not explicitly state we require cmake 3.3

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !625
2016-11-30 15:09:36 -05:00
Robert Maynard
6db006a28b VTK-m cmake config files not explicitly state we require cmake 3.3 2016-11-30 14:10:30 -05:00
Robert Maynard
295de14deb Merge topic 'consistently_guard_around_windows_h'
6b1094c7 Consistently include windows.h by making a wrapper header.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !620
2016-11-30 13:56:49 -05:00
Dave Pugmire
cef40f853e Fix compiler warnings. 2016-11-30 12:52:40 -05:00
Dave Pugmire
3046d45900 Fix some compiler warnings.
Add another rectilinear test.
2016-11-30 12:41:59 -05:00
Dave Pugmire
8383f21a81 Add VTK reader for rectilinear grids. 2016-11-30 10:39:32 -05:00
Robert Maynard
80df037f73 CellSetExplicit Reverse Connectivity is abit more efficient.
Both computing the reverse connectivity and also the total footprint are now
smaller.
2016-11-29 14:17:02 -05:00
Robert Maynard
8a4352a8f6 Merge topic 'remove_rendering_cuda_visibility_warnings'
7233c422 Setup proper symbol visibility flags when building cuda files in a library

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !622
2016-11-29 13:53:32 -05:00
Dave Pugmire
52aa9b9ad0 Fix some compile errors. 2016-11-29 09:33:46 -05:00
Dave Pugmire
23d8d585a0 Add explicit 1D rendering. Also added some data model suport. 2016-11-28 16:07:40 -05:00
Robert Maynard
7233c422df Setup proper symbol visibility flags when building cuda files in a library 2016-11-28 15:40:54 -05:00
Robert Maynard
6b1094c767 Consistently include windows.h by making a wrapper header.
We previously included windows.h in numerous locations using different
techniques to guard against bringing in parts of the file that are bad
(min/max macros, etc). This solves the problem by consistently using
vtkm/internal/Windows.h to setup everything.
2016-11-28 09:54:37 -05:00
Dave Pugmire
db522c4cd1 Add GetCanvas calls to the mapper classes. 2016-11-28 09:41:01 -05:00
Robert Maynard
b97b4cc7ef Allow thrust::reduce to work when iterator and initial value types differ.
natively thrust::reduce is unable to handle the use case where the
iterator type and the initial value/return value are two different
types. We use array handle cast to work around this problem when
we detect this usecase.
2016-11-25 13:11:19 -05:00
Robert Maynard
64bcc34389 Refactor MinAndMax to use vtkm::Vec<T,2> instead of Pair.
The types are the same which makes Vec a more suitable container.
2016-11-25 13:11:19 -05:00
Robert Maynard
8d60ed57ad Refactor MinAndMax to be a shared binary operator. 2016-11-25 11:40:46 -05:00
Robert Maynard
18375b5424 Update Bound computations to always use a single Reduce call 2016-11-25 11:40:46 -05:00
Robert Maynard
2cfc9743e3 Reduce can support reduce to a T type that isn't the arrayhandles T type.
This has been done so that operations such as computing the Min/Max of
an array can be done in a single reduce step.
2016-11-25 11:40:46 -05:00
Robert Maynard
b470af4cc3 Merge topic 'render-no-opengl'
767fc9c6 Do not declare OpenGLHeaders.h when there is no OpenGL
10d9dd44 Remove GLEW_LIBRARIES from Rendering module libraries
0772a157 Revert "Don't build vtkm_rendering if we can't find opengl"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !617
2016-11-25 10:58:20 -05:00
Robert Maynard
53f4e6016d Merge topic 'tbb_parallel_reduce'
c8da8ae3 TBB now uses tbb::parallel_reduce for reductions.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !615
2016-11-25 10:58:03 -05:00
Kenneth Moreland
292500becf Merge topic 're-add-test-builds'
5a444af6 Make ArrayPortalStreaming methods CONT
e1a9264d Re-enable test builds

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !609
2016-11-23 17:54:13 -05:00
Kenneth Moreland
eb26b88cec Change DefaultPolicy to PolicyDefault
This is more in line with the VTK-m coding standards.
2016-11-23 14:05:16 -07:00
Kenneth Moreland
bb32e40804 Allow all policies to inherit defaults
Previously, all declared policies had to implement every tag required by
the policy, even if it was the same as the default. In addition to being
annoying, this makes us less forward compatible because if we add a new
item to the policy any unchanged policy would become incorrect.

This change moves the default policy declarations from the default
policy to PolicyBase. The default policy inherits all of them without
any change. Other policies need only override those that are different
than the default.
2016-11-23 14:00:49 -07:00
Kenneth Moreland
767fc9c659 Do not declare OpenGLHeaders.h when there is no OpenGL 2016-11-23 13:17:33 -07:00
Kenneth Moreland
349799fa81 Fix static assert for visual studio
For some reason on my Visual Studio 2013 the definition of
VTKM_STATIC_ASSERT (without the message) did not report where the actual
error message happened. This change seems to get Visual Studio to report
the location of the failed assert with a reasonable message.
2016-11-23 13:10:56 -07:00
Robert Maynard
c8da8ae354 TBB now uses tbb::parallel_reduce for reductions.
This results in a reductions under tbb have a 2x to 4x performance increase.
2016-11-23 14:32:18 -05:00
Kenneth Moreland
10d9dd440b Remove GLEW_LIBRARIES from Rendering module libraries
The Rendering module will load the optional OpenGL module.
GLEW_LIBRARIES will already be added if it is available, and will not
otherwise.
2016-11-23 12:30:37 -07:00
Kenneth Moreland
0772a157fd Revert "Don't build vtkm_rendering if we can't find opengl"
There are many rendering classes that do not rely on OpenGL. We really
want to be able to use this functionality on systems that do not have
OpenGL. That is a big part of the point.

This reverts commit c75feb74bb6add43e1be9a42a9bf4bf205b97c39.
2016-11-23 12:14:44 -07:00
Kenneth Moreland
4c0f909a2f Merge topic 'cast-error'
02e37f4b Fix an issue with casting a float to an int too soon

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !613
2016-11-23 13:57:04 -05:00
Dave Pugmire
87b1cdcacf cleanup. Remove some compiler warnings. 2016-11-23 13:45:03 -05:00
Kenneth Moreland
4eaa728df7 Merge topic 'redefine-topology-worklets'
e43acbac Fix issue with private class in CUDA
b142a8c0 Fix change in new Gradient worklet
c6cd9d02 Implement CleanGrid filter
ce338d14 Add a worklet for copying cell sets
3f9a1edb Change CellShapeTag*:Id type to vtkm::UInt8
b1754680 Add RemoveUnusedPoints class
63c748f0 Implement ArrayHandleGroupVecVariable
b3d0e1f9 Move VecFromPortal classes to vtkm package

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !598
2016-11-23 12:04:06 -05:00
Dave Pugmire
d38e627057 Support for 1D rendering. 2016-11-23 10:48:22 -05:00
Kenneth Moreland
e43acbac28 Fix issue with private class in CUDA
CUDA has some strange rules about using private classes and anonymous
namespaces. For whatever reason, recent changes have introduced such an
issue. When compiling on CUDA, expose the problematic class. It is
testing code, so it does not matter much.
2016-11-22 17:31:50 -07:00
Kenneth Moreland
b142a8c032 Fix change in new Gradient worklet
Didn't catch the change in the last rebase.
2016-11-22 17:24:10 -07:00
Kenneth Moreland
c6cd9d02ba Implement CleanGrid filter 2016-11-22 17:16:49 -07:00
Kenneth Moreland
ce338d1484 Add a worklet for copying cell sets 2016-11-22 17:15:10 -07:00
Kenneth Moreland
3f9a1edb7b Change CellShapeTag*:Id type to vtkm::UInt8
The shape array in CellSetExplicit was changed a while ago to be of type
vtkm::UInt8. However, the shape types remained at vtkm::IdComponent. I
can think of no reason why they should not be the same type.
2016-11-22 17:12:54 -07:00
Kenneth Moreland
b175468082 Add RemoveUnusedPoints class
RemoveUnusedPoints contains a couple of worklets and some helper methods
to compact the points in a CellSetExplicit. This is helpful when you
have an operation that creates new cells but might not use all the
original points of the inputs.
2016-11-22 17:11:52 -07:00
Kenneth Moreland
63c748f049 Implement ArrayHandleGroupVecVariable
This is a fancy array handle that can group entries in another array by
arbitrary amounts. This allows us to implement input and output arrays
with a different sized Vec for each instance. This is necessary for
generating new topologies with cells of different types.
2016-11-22 17:10:09 -07:00
Kenneth Moreland
b3d0e1f99b Move VecFromPortal classes to vtkm package
These Vec-like objects can be generally usable in both the control and
execution environments.
2016-11-22 17:04:55 -07:00
Kenneth Moreland
02e37f4bc5 Fix an issue with casting a float to an int too soon
There was a case of bad casting where a Float32 that should be in the
range between 0 and 1 was cast to an Id and then multiplied by the size
of an array. The intention is to get a proportional index into the
array, but because the float was cast to an int first, you get either
the first or last index.

Instead, first cast the size of the array to a Float32, multiply it by
the fraction, and then cast back to an Id. That should give the desired
effect.
2016-11-22 15:34:56 -07:00
Robert Maynard
719a8bd35d Merge topic 'nvcc_version_check'
4de37559 fix a pragma location bug
9048e0ba detect cuda versions and decide if to put a diagnostic inside or outside of a class.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !611
2016-11-16 19:21:31 -05:00