Commit Graph

83 Commits

Author SHA1 Message Date
Kenneth Moreland
f81e8c642f Fix example that was using the old interface to VTKDataSetWriter
As a bonus, fix a compiler warning about an unused typedef.
2016-03-17 09:13:25 -06:00
Robert Maynard
8e4a47ef57 Update IsosurfaceUniformGrid to use the marching cubes filter.
This way we have an example of how to use the filter code.
2016-03-14 08:39:17 -04:00
Robert Maynard
ad4f6c6485 All examples now use the proper CMake CUDA found variable. 2016-02-22 11:25:15 -05:00
Robert Maynard
ee368d0d68 Do not add c++ compiler optimizations to all compilers, but on a target basis.
As reported in Issue #54 the add_compile_options pollutes the global compile
flags. Instead we provided cmake flags for people to use.
2016-01-25 14:38:06 -05:00
Kenneth Moreland
ed43dad6ca Simplify and unify cast interface.
Previously, DynamicArrayHandle and DynamicCellSet had slightly different
interfaces to their CastTo feature. It was a bit confusing and not all
that easy to use.

This change simplifies and unifies them by making each class have a single
CopyTo method that takes a reference to a cast object (an ArrayHandle or
CellSet, respectively) and fills that object with the data contained if
the cast is successfull. This interface gets around having to declare
strange types.

Each object also has a Cast method that has to have a template parameter
specified and returns a reference of that type (if possible).

In addition, the old behavior is preserved for DynamicArrayHandle (but
not DynamicCellSet). To avoid confusion, the name of that cast method is
CastToTypeStorage. However, the method was chaned to not take parameters
to make it consistent with the other Cast method.

Also, the IsType methods have been modified to reflect changes in
cast/copy. IsType now no longer takes arguments. However, an alternate
IsSameType does the same thing but does take an argument.
2016-01-18 15:58:04 -07:00
Robert Maynard
4bb3cce016 Use the DataSetBuilderExplicitIterative helper where it is useful. 2016-01-18 16:19:48 -05:00
Robert Maynard
e7456fa120 Update vtkm tests and examples to use DataSetBuilders. 2016-01-15 15:44:56 -05:00
Robert Maynard
f5f9939f26 Update all of vtkm to understand it can only identify as one compiler. 2016-01-12 11:05:40 -05:00
Robert Maynard
c70da5fc23 Extend vtkm::DeviceAdapterTraits to include a unique numeric identifier.
Previously each device adapter only had a unique string name. This was
not the best when it came to developing data structures to track the status
of a given device at runtime.

This adds in a unique numeric identifier to each device adapter. This will
allow classes to easily create bitmasks / lookup tables for the validity of
devices.
2015-12-16 11:18:52 -05:00
Robert Maynard
a7127f0fc3 Adding vtkm::cont::RuntimeDeviceInformation.
The RuntimeDeviceInformation class allows developers to check if a given
device is supported on a machine at runtime. This allows developers to properly
check for CUDA support before running any worklets.
2015-12-15 17:25:27 -05:00
Robert Maynard
7d249e8996 Move DeviceAdapterTraits into vtkm::cont as they are user API.
When writing multiple backend code users of vtkm need to use the
DeviceAdapterTraits classes, so therefore we should move them to vtkm::cont
to signify this.
2015-12-11 09:52:18 -05:00
T.J. Corona
e14dba7ed4 Use vtkm::Float32 with OpenGL, not vtkm::FloatDefault.
When vtkm is built with VTKm_USE_DOUBLE_PRECISION, the IsosurfaceUniformGrid
example would not compile. Now it does.
2015-12-03 15:02:41 -05:00
T.J. Corona
baa73eaad8 Merge topic 'marching-cubes'
33b0d1bf Move marching cubes edge table out of the worklet.
a5ae4127 Remove IsosurfaceUniformGrid.
35355382 Generalize IsosurfaceUniformGrid to Accept explicit cell sets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !272
2015-12-03 14:54:02 -05:00
T.J. Corona
a5ae4127e0 Remove IsosurfaceUniformGrid. 2015-12-02 15:11:56 -05:00
Kenneth Moreland
0d0294d4b2 Fix conversion warnings in streamline example.
vtkm::Id is a signed integer whereas size_t used by standard C++
functions is unsigned. It doesn't matter, but compilers like to complain
about it. Make any such conversions explicit.
2015-11-30 14:14:07 -07:00
Patricia Kroll Fasel - 090207
6c4fb856df Add example data file for streamline. 2015-11-23 17:00:22 -07:00
Patricia Kroll Fasel - 090207
3946b0c462 Add unit test, pass all args in Run() 2015-11-23 16:19:26 -07:00
Patricia Kroll Fasel - 090207
09e4377891 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into streamline 2015-11-23 12:56:27 -07:00
Patricia Kroll Fasel - 090207
02f84a1992 StreamLine filter outputs dataset. Add example. 2015-11-23 12:54:12 -07:00
Patricia Kroll Fasel - 090207
34cc971969 StreamLine particle tracing returns output dataset. 2015-11-23 12:50:13 -07:00
Kenneth Moreland
b5803a5f05 Merge branch 'improve-cmake-module' into 'master'
Improve CMake module

Some improvements to VTKmConfig.cmake and the device configuration scripts to better support CMake projects using VTK-m.

See merge request !271
2015-11-12 18:09:01 -05:00
Kenneth Moreland
fac5d79a52 Remove direct use of TBB_LIBRARIES and TBB_INCLUDE_DIRS
Instead, use VTKm_LIBRARIES and VTKm_INCLUDE_DIRS where the configuration
stores all necessary libraries and include directories.
2015-11-12 14:34:31 -07:00
Sujin Philip
70b2eff85e Update clipping example to use the new io framework 2015-11-12 10:29:30 -05:00
T.J. Corona
9414120b6a Replace ArrayHandleCastForInput with the more versatile ArrayHandleCast. 2015-11-11 17:13:04 -05:00
Kenneth Moreland
1a538ca196 Merge branch 'scatter-worklets' into 'master'
Scatter in worklets

Add the functionality to perform a scatter operation from input to output in a worklet invocation. This allows you to, for example, specify a variable amount of outputs generated for each input.

See merge request !221
2015-11-11 13:09:47 -05:00
Robert Maynard
88a605549e Merge topic 'more_efficient_opengl_interop'
4d270187 Update the opengl interop code to be significantly faster with cuda.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !261
2015-11-11 09:40:07 -05:00
T.J. Corona
af32a21b2e Add support for bidirectional array transforms.
Array transforms can now be created with an inverse functor, allowing for
casts back into the native array type. As a result, array transforms with
both a functor and inverse functor defined can perform read and write
operations. As an example, ArrayHandleCast now supports this operation. The
original implementation of ArrayHandleCast (i.e. read only) has been renamed
'ArrayHandleCastForInput'.
2015-11-10 15:13:02 -05:00
Kenneth Moreland
58aa46df74 Fix spacing in Isosurface test code.
The original isosurface code was not treating the origin and spacing of
the point coordinates correctly. Instead, it was ignoring the origin and
spacing and instead scaling all point coordinates to be in the unit cube
in world space (except there was also an off-by-one error in that). This
change recompensates by adjusting the origin and spacing to make the
correct position where the geometry was previously errantly placed.
2015-11-06 18:05:20 -07:00
Robert Maynard
4d270187c7 Update the opengl interop code to be significantly faster with cuda.
Now that we hold the state information about the transferring of an array,
we can do a far more efficient transferring.
2015-11-05 13:50:35 -05:00
Sujin Philip
1b8fe17f1b Fix for several warnings 2015-11-03 09:11:38 -05:00
Sujin Philip
fd244c4142 Fix errors and warnings caused by recent changes to device adapter tag logic 2015-11-03 09:11:38 -05:00
Robert Maynard
160f0099e5 Merge topic 'cleanup_cmake_logic'
7a356b2c By default do not export all symbols in vtk-m.
91a09c8b Remove unneeded cmake code from the examples.
e24bdfb6 Bump the minimum cmake version to 2.8.11
05ea81d3 Teach vtk-m CMake about new policies from CMake 3.X.X

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !243
2015-10-22 12:19:04 -04:00
Robert Maynard
91a09c8ba2 Remove unneeded cmake code from the examples.
This is needed as it allows the policies specified in the root of
vtk-m to propagate properly to the examples. When CMake
sees a cmake_minimum_required command it resets all policy flags.
2015-10-21 10:27:21 -04:00
Kenneth Moreland
4f8f76f3f7 Fix line endings.
There were a couple of files checked into the git repository with DOS
line endings. Most git implementations really expect there to be Unix
line endings and should do the appropriate conversions as necessary.
This commit should change the line endings to the appropriate Unix endings.
2015-10-20 12:32:29 -06:00
Patricia Kroll Fasel - 090207
65c9de08bd Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-10-08 16:07:18 -06:00
Patricia Kroll Fasel - 090207
5f6a552a26 Compiler warnings 2015-10-08 12:12:49 -06:00
Patricia Kroll Fasel - 090207
c94dca791b Compiler warnings 2015-10-08 12:07:13 -06:00
Patricia Kroll Fasel - 090207
b74737125c Compiler warnings GL deprecated 2015-10-08 11:45:50 -06:00
Patricia Kroll Fasel - 090207
2b43e52516 Compiler warnings 2015-10-08 11:38:56 -06:00
Patricia Kroll Fasel - 090207
2f532bf379 Compiler warnings 2015-10-08 11:11:08 -06:00
Patricia Kroll Fasel - 090207
cba29a1e67 Fix compiler warnings 2015-10-08 10:52:34 -06:00
Patricia Kroll Fasel - 090207
0b9cffe4f4 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_explicit 2015-10-08 09:56:44 -06:00
Patricia Kroll Fasel - 090207
5569d8c1b1 Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-10-08 09:35:10 -06:00
Patricia Kroll Fasel - 090207
5a7b3668ee Correct for gcc and pgi compilers and CastTo. Add CellSetSingleType for output. 2015-09-29 11:20:05 -06:00
Kenneth Moreland
7404f4edda Wrap boost include.
Wrap VTKM_THIRDPARTY_PRE_INCLUDE and VTKM_THIRDPARTY_POST_INCLUDE around
a boost include. This suppresses some warnings.
2015-09-29 10:25:27 -04:00
Patricia Kroll Fasel - 090207
deceb79edc Fix to work with gcc and pgi compilers. Change to use CellSetSingleType. 2015-09-28 16:23:03 -06:00
Patricia Kroll Fasel - 090207
78239c5571 Minor corrections for Allocate of shapes, numindices. 2015-09-24 16:17:50 -06:00
Patricia Kroll Fasel - 090207
a821310b6f Changes in CellSetExplicit for shape and numindices types. Made one Run() method
by getting point dimensions from the dataset.
2015-09-24 16:07:45 -06:00
Patricia Kroll Fasel - 090207
3e4ca9ae8f Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into tetra_uniform 2015-09-24 11:55:33 -06:00
Patricia Kroll Fasel - 090207
3e94b4295b Types for shapes and numindices changed in CellSetExplicit. 2015-09-24 11:52:38 -06:00