Commit Graph

1027 Commits

Author SHA1 Message Date
Robert Maynard
c87e1f5e16 Merge topic 'add-gaussian-splatter'
5e72d3a8 Rename kernels directory to splatkernels to avoid confusion
7a2225cf Add Copyright text
d04e4dfa Remove c++11 constexpr keyword
ed5faf5b Fix for M_PI on windows, use vtkm::Pi()
fe284ffb Add unit test for splat kernel integral.
29001e37 Change GaussianSplatter to KernelSplatter to support other kernels
378cb17e Code cleanup, style, debug, unused vars
65d2980f Fix clang compile error, cleanup debug messages
...

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !193
2015-09-17 10:03:26 -04:00
Robert Maynard
9b877ef49b Merge topic 'multiple_backend_example'
fd685210 Always install all device headers even when device isn't enabled.
b1663b24 Add an example of using multiple backends from a single translation unit.
fc0ff69d Methods with try/catch need to be host only.
4d635d64 DeviceAdapter Tags now always exist, and contain if the device is valid.
cf32b430 Teach Configure.h to store if TBB and CUDA are enabled.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !198
2015-09-17 09:49:49 -04:00
Robert Maynard
fd68521066 Always install all device headers even when device isn't enabled.
vtkm_declare_headers now is able to not test headers, by using the
TESTABLE keyword.
2015-09-17 09:28:21 -04:00
Robert Maynard
b1663b24b7 Add an example of using multiple backends from a single translation unit. 2015-09-17 09:28:21 -04:00
Robert Maynard
fc0ff69d04 Methods with try/catch need to be host only.
When compiling with cuda and tbb enabled in a single translation unit you
need to make sure all try/catch blocks are marked as host only otherwise
the cuda compiler will error out.
2015-09-17 09:28:21 -04:00
Robert Maynard
4d635d642b DeviceAdapter Tags now always exist, and contain if the device is valid.
Previously it was really hard to verify if a device adapter was valid. Since
you would have to check for the existence of the tag. Now the tag always
exists, but instead you query the traits of the DeviceAdapter to see if
it is a valid adapter.

This makes compiling with multiple backends alot easier.
2015-09-17 09:28:21 -04:00
Robert Maynard
cf32b430dc Teach Configure.h to store if TBB and CUDA are enabled. 2015-09-17 09:28:21 -04:00
Robert Maynard
1b9486149d Merge branch 'update_examples_to_use_proper_backends' into 'master'
Update examples to use proper backends

See merge request !195
2015-09-16 15:44:21 -04:00
Robert Maynard
9c3ff00b6e Switch over to a simpler way to specify the vtkm backend. 2015-09-16 13:16:25 -04:00
Robert Maynard
cce93638e2 Merge branch 'enable_more_clang_warnings_osx' into 'master'
Enable more warnings when building with AppleClang.

See merge request !196
2015-09-16 08:56:15 -04:00
Kenneth Moreland
fd401f0feb Merge branch 'index-array-handle' into 'master'
Add ArrayHandleIndex

Add an ```ArrayHandleIndex``` class that echoes the index. This is really a special version of ```ArrayHandleCounting``` that is of type ```vtkm::Id``` and starts at 0, but it is the most common case and does not need the extra addition.

Also modified ```ArrayHandleCounting``` to support a step, which makes the use a bit more powerful.

See merge request !192
2015-09-15 21:58:29 -04:00
Robert Maynard
121471c5d0 Enable more warnings when building with AppleClang. 2015-09-15 16:20:24 -04:00
Kenneth Moreland
e23649d290 Fix use of ArrayHandleCounting in TBB device adapter 2015-09-15 14:19:10 -06:00
Robert Maynard
c295a7c174 Merge branch 'remove_thrust_old_pragma' into 'master'
Remove the thrust pragma statements that are not needed.

See merge request !194
2015-09-15 15:35:17 -04:00
Robert Maynard
1d97f886e0 Remove the thrust pragma statements that are not needed. 2015-09-15 14:20:56 -04:00
Robert Maynard
86ef09acd9 Update Isosurface Example to properly use the correct device adapter. 2015-09-15 14:18:36 -04:00
Robert Maynard
5ce3e1f3d0 Update HelloWorld Example to properly use the correct device adapter. 2015-09-15 14:15:56 -04:00
John Biddiscombe
5e72d3a87a Rename kernels directory to splatkernels to avoid confusion 2015-09-15 19:46:53 +02:00
John Biddiscombe
7a2225cfd1 Add Copyright text 2015-09-15 12:03:09 +02:00
John Biddiscombe
d04e4dfaf4 Remove c++11 constexpr keyword 2015-09-15 11:08:36 +02:00
Kenneth Moreland
44fc339a2e ArrayHandleCounting now supports step
Modify ArrayHandleCounting so that it supports both a starting value and
a step (increment). This adds a multiplication, but the common case that
does not use it is already in a separate class (ArrayHandleIndex).
2015-09-14 22:55:44 -06:00
Kenneth Moreland
891182ee19 Add ArrayHandleIndex class.
This is the most common use case for ArrayHandleCounting, and this class
is a bit easier to use and a bit faster.
2015-09-14 22:11:09 -06:00
John Biddiscombe
ed5faf5bac Fix for M_PI on windows, use vtkm::Pi() 2015-09-14 22:52:06 +02:00
John Biddiscombe
fe284ffbfb Add unit test for splat kernel integral.
The test computes the integral using simpsons rule and checks
that the value is unity (+/- epsilon)
2015-09-14 21:39:43 +02:00
John Biddiscombe
29001e377f Change GaussianSplatter to KernelSplatter to support other kernels
Template the splatter algorithm over Kernel type and use abstract kernel
interface to fetch the kernel value.

Add Gaussian, Spline3rdOrder kernel classes templated over dimension.
Other kernels can/will be added in future.

Kernel classes are defined such that the integral of the volume is unity
as is the convention in (for example) SPH simulations.
2015-09-14 21:39:35 +02:00
John Biddiscombe
378cb17e8a Code cleanup, style, debug, unused vars
Pass code through formatter to correct indentation.

Put debug routines in debug:: namespace and #ifdef them.

Remove old unused variables and worklets.
2015-09-12 21:08:45 +02:00
John Biddiscombe
65d2980fb7 Fix clang compile error, cleanup debug messages 2015-09-12 16:01:54 +02:00
John Biddiscombe
c03aef932e Rewrite main routine for gaussian splatter
Clean up the implementation to take a uniform grid dataset as input
and splat using the correct world coordinates of the points into
the volume. Kernels are centred around the splat points in world coordinates
(floating point) and not quantized to the nearest voxel.

Skip the generation of all volume points which is unnecessary (memory usage).

Add ability to specify a radius array with one entry per splat point so
that the size of each splat may be controlled arbitrarily.
2015-09-12 16:01:48 +02:00
John Biddiscombe
ed99cbfed4 Some fixes to get a first working splatter test 2015-09-12 16:00:22 +02:00
John Biddiscombe
d14eb28285 Fix compilation of Gaussian splatter worklet 2015-09-12 15:53:37 +02:00
John Biddiscombe
cc3014fbcb Merge remote-tracking branch 'kitware/master' into add-gaussian-splatter 2015-09-12 10:39:15 +02:00
Sujin Philip
4b70770d48 Merge topic 'fix-typos-CellSetExplicit'
f004d344 Fix some typos in CellSetExplicit.h

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !191
2015-09-11 16:26:34 -04:00
Sujin Philip
f004d344e1 Fix some typos in CellSetExplicit.h 2015-09-11 15:03:18 -04:00
Kenneth Moreland
02287d1ef5 Merge branch 'execution-whole-array-as-portal' into 'master'
Change ExecutionWholeArray interface to match expected for ArrayPortal

When ExecutionWholeArray is passed to a worklet, it is expected to
behave like an array portal. However, it was missing the
GetNumberOfValues method and the ValueType typedef. These are now added.

See merge request !189
2015-09-09 15:50:33 -04:00
Kenneth Moreland
13d4087657 Change ExecutionWholeArray interface to match expected for ArrayPortal
When ExecutionWholeArray is passed to a worklet, it is expected to
behave like an array portal. However, it was missing the
GetNumberOfValues method and the ValueType typedef. These are now added.
2015-09-09 13:30:12 -06:00
Robert Maynard
b767fc405d Merge branch 'wrap_thrust_call_in_try_catches' into 'master'
Correct multiple signature compile issue.

See merge request !188
2015-09-08 10:57:12 -04:00
Robert Maynard
6272fdcc54 Correct multiple signature compile issue. 2015-09-08 09:39:57 -04:00
Robert Maynard
39ff2c2b9d Merge branch 'wrap_thrust_call_in_try_catches' into 'master'
Resolves Issue #42. Now all thrust API calls are in try/catch blocks.

See merge request !187
2015-09-07 13:07:51 -04:00
Robert Maynard
d9dfe01a01 Merge branch 'hello_world_example' into 'master'
Hello world example

See merge request !186
2015-09-07 12:32:13 -04:00
Robert Maynard
aa7f5c34b9 Resolves Issue #42. Now all thrust API calls are in try/catch blocks. 2015-09-07 12:20:31 -04:00
Robert Maynard
628c2acaa1 Remove memory leaks and automatically quit the hello world demo. 2015-09-07 11:32:12 -04:00
Robert Maynard
5b8cc44ed4 Merge branch 'improve_sort_perf_on_thrust' into 'master'
Tell thrust to use fast code paths when using our predicates and operators.

See merge request !176
2015-09-07 10:38:17 -04:00
Robert Maynard
129da40607 Merge topic 'link_to_pthread_when_using_glew'
4cf9ab01 On Linux when using GLEW also link to the Threading library.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !185
2015-09-04 15:32:10 -04:00
Robert Maynard
4cf9ab018a On Linux when using GLEW also link to the Threading library.
This is needed because some implementations GLEW do lazy linking to
PThreads.
2015-09-04 14:38:37 -04:00
Sujin Philip
9a911a9761 Merge topic 'update-VertexClustering'
6fde5016 Update VertexClustering to use the new features in vtkm

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !174
2015-09-04 14:34:44 -04:00
Hendrik Schroots
801d4dd1e5 Merge topic 'make_cont_export_macro_be_device_host'
0d6dfb1e Make it possible to use Cuda TextureMemory from device/host method.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !181
2015-09-04 13:50:13 -04:00
Robert Maynard
e319399693 Merge topic 'hello_world_example'
c75facf9 Add a HelloWorld example that uses opengl interop.
5e5e3079 Move IsoSurface example to its own directory.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !182
2015-09-04 13:49:25 -04:00
Robert Maynard
6341eb30db Merge branch 'consistent_vtkm_configure_vars' into 'master'
Update VTK-m to export to Configure.h if we have opengl interop enabled.

At the same time I rearranged the CMakeLists.txt so that the configuration
for Configure.h is later so that it catches all CMake Variables.

See merge request !184
2015-09-04 13:27:05 -04:00
Robert Maynard
b100cdba52 Merge branch 'correct_reorder_warnings' into 'master'
Correct a member initialization reorder warning.

See merge request !183
2015-09-04 13:26:39 -04:00
Robert Maynard
23b435d031 Update VTK-m to export to Configure.h if we have opengl interop enabled.
At the same time I rearranged the CMakeLists.txt so that the configuration
for Configure.h is later so that it catches all CMake Variables.
2015-09-04 11:43:10 -04:00