Commit Graph

2725 Commits

Author SHA1 Message Date
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
Samuel Li
4de37559fd fix a pragma location bug 2016-11-16 09:55:22 -08:00
Kenneth Moreland
5a444af67b Make ArrayPortalStreaming methods CONT
Changing the macros of the methods of ArrayPortalStreaming to be only
for CONT (the control environment) rather than both CONT and EXEC (both
the control and export environments). ArrayPortalStreaming is really
only used in the control environment and passed to the default transport
where the data is copied to the execution environment.

My hope is that this change will eliminate some rather odd and non-
descriptive warnings on the dashboard.
2016-11-16 09:55:15 -07:00
Kenneth Moreland
e1a9264d5d Re-enable test builds
During a round of resolving compile issues on the dashboard, the test
builds were disabled, but never re-enabled. This change re-enables the
test builds.
2016-11-16 09:52:38 -07:00
Kenneth Moreland
a43538b017 Merge topic 'no-inline-export'
fdaccc22 Remove exports for header-only functions/methods

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !588
2016-11-16 11:42:58 -05:00
Samuel Li
9048e0bac1 detect cuda versions and decide if to put a diagnostic inside or outside of a class. 2016-11-15 22:43:40 -08:00
Kenneth Moreland
fdaccc22db Remove exports for header-only functions/methods
Change the VTKM_CONT_EXPORT to VTKM_CONT. (Likewise for EXEC and
EXEC_CONT.) Remove the inline from these macros so that they can be
applied to everything, including implementations in a library.

Because inline is not declared in these modifies, you have to add the
keyword to functions and methods where the implementation is not inlined
in the class.
2016-11-15 22:22:13 -07:00
Robert Maynard
8861beda4b Merge topic 'add_vector_cell_gradient'
8dadf560 Add in support for vector fields to Gradient worklet.
d53f43fb CellDerivaties now support computing the derivatives of vtkm::Vec fields.
b4378c85 Allow vtkm::Matrix to support T values which are vtkm::Vec.
9caabf97 vtkm::Vec now supports +=, -=, *=, and /=.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !608
2016-11-15 23:39:10 -05:00
Robert Maynard
8dadf560cd Add in support for vector fields to Gradient worklet. 2016-11-15 18:54:53 -05:00
Robert Maynard
d53f43fb48 CellDerivaties now support computing the derivatives of vtkm::Vec fields. 2016-11-15 18:54:53 -05:00
Robert Maynard
b4378c8546 Allow vtkm::Matrix to support T values which are vtkm::Vec. 2016-11-15 18:54:53 -05:00
Robert Maynard
b936de0976 Merge topic 'fix_thrust_183_proxy_assignment_regression'
632d2a52 Thrust 1.8.3 uses raw_reference_cast instead of a direct assignment operator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !610
2016-11-15 18:52:51 -05:00
Robert Maynard
632d2a5211 Thrust 1.8.3 uses raw_reference_cast instead of a direct assignment operator
This usage of raw_referenc_cast returns a const PortalValue which is than
assigned too. So to work around the problem we need to mark operator= on
the class as const.
2016-11-15 17:03:59 -05:00
Robert Maynard
523ac98754 Merge topic 'add_scalar_cell_gradient'
7a52fa39 Add in Cell Gradient for scalar fields.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !607
2016-11-14 14:05:47 -05:00
Robert Maynard
9caabf97ce vtkm::Vec now supports +=, -=, *=, and /=.
It is common to write template code that needs to operate across both
scalar and vector values. To facilitate code like this we are required
to provide these common operators.
2016-11-14 13:07:33 -05:00
Robert Maynard
7a52fa3940 Add in Cell Gradient for scalar fields. 2016-11-14 12:52:00 -05:00
Robert Maynard
6251d8bf2c Merge topic 'reduce_gradient_library_size'
7c07afff Reduce the compilation size of the gradient computations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !603
2016-11-13 09:31:16 -05:00
Robert Maynard
7c07afffba Reduce the compilation size of the gradient computations. 2016-11-11 14:36:51 -05:00