Commit Graph

995 Commits

Author SHA1 Message Date
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
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
Robert Maynard
5bc89c5d8a Correct a member initialization reorder warning. 2015-09-04 09:49:10 -04:00
Robert Maynard
c75facf940 Add a HelloWorld example that uses opengl interop.
Based on the work of Tyson Neuroth and Huu Tan Nguyen at the VTK-m code
sprint.

Shows how to invoke a simple worklet to generate coordinates and colors,
and than use opengl interop to display it to the screen.
2015-09-04 09:38:07 -04:00
Robert Maynard
5e5e307939 Move IsoSurface example to its own directory. 2015-09-03 16:05:21 -04:00
Robert Maynard
72450e87f3 Make thrust use fast paths when doing sort and scan.
By introducing our own custom thrust execution policy we can make sure
to hit the fastest code paths in thrust for the sort operation. This makes
sure that for UInt32,Int32, and Float32 we use the radix sort from thrust
which offers a 2x to 3x speed improvement over the merge sort implementation.

Secondly by telling thrust that our BinaryOperators are commutative we
make sure that we get the fastest code paths when executing Inclusive
and Exclusive Scan

Benchmark 'Radix Sort on 1048576 random values vtkm::Int32' results:
  median = 0.0117049s
  median abs dev = 0.00324614s
  mean = 0.0167615s
  std dev = 0.00786269s
  min = 0.00845875s
  max = 0.0389063s
Benchmark 'Radix Sort on 1048576 random values vtkm::Float32' results:
  median = 0.0234463s
  median abs dev = 0.000317249s
  mean = 0.021452s
  std dev = 0.00470307s
  min = 0.011255s
  max = 0.0250643s
Benchmark 'Merge Sort on 1048576 random values vtkm::Int32' results:
  median = 0.0310486s
  median abs dev = 0.000182129s
  mean = 0.0286914s
  std dev = 0.00634102s
  min = 0.0116225s
  max = 0.0317379s
Benchmark 'Merge Sort on 1048576 random values vtkm::Float32' results:
  median = 0.0310617s
  median abs dev = 0.000193583s
  mean = 0.0295779s
  std dev = 0.00491531s
  min = 0.0147257s
  max = 0.032307s
2015-09-03 16:00:37 -04:00
Robert Maynard
0d6dfb1e40 Make it possible to use Cuda TextureMemory from device/host method. 2015-09-03 11:52:40 -04:00
Robert Maynard
1906e273d2 Merge branch 'make_cont_export_macro_be_device_host' into 'master'
Revert the VTKM_EXEC_EXPORT changes.

Figuring out a better approach.

See merge request !180
2015-09-02 23:38:45 -04:00
Robert Maynard
8d5765f55f Revert the VTKM_EXEC_EXPORT changes. 2015-09-02 20:01:22 -04:00
Robert Maynard
f2502c2e58 Merge topic 'unused_variable_warning'
7fb4ed12 Fix warnings in IsosurfaceUniformGrid code.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !177
2015-09-02 18:09:12 -04:00
Robert Maynard
7fb4ed12fe Fix warnings in IsosurfaceUniformGrid code. 2015-09-02 17:58:18 -04:00
Kenneth Moreland
be1524409d Merge branch 'optimize-uniform-coordinates' into 'master'
Optimize uniform coordinates

Add specializations when dealing with uniform coordinates on lines, quads (a.k.a. pixels), and hexahedra (a.k.a. voxels).

See merge request !172
2015-09-02 17:16:57 -04:00
Kenneth Moreland
20c5819397 Remove unused typedef
A typedef in a method was left over from a copy/paste. Although
harmless, it was causing a (valid) warning on some compilers.
2015-09-02 13:54:54 -07:00
Kenneth Moreland
68428c6487 Add test to make sure uniform coords work in topology map
Although this is labeled as a unit test, this is more of an integration
test to make sure that when a uniform point coordinate is passed as a
field to a WorkletTopologyMap from points to cells with a regular cell
set, you get the specialized VecRectilinearPointCoordinates in the
worklet argument.
2015-09-02 13:54:54 -07:00
Kenneth Moreland
08f9c04fab Add specialization of topology map fetch for regular point coords
In the special case where you are loading the point coordinates for a
structured grid in a point to cell map (an important use case), create a
VecRectilinearPointCoordinates rather than build a Vec of the values.
This will activate the cell specalizations in previous commits.

These changes also added some flat-to-logical index conversion and vice
versa in ConnectivityStructuredInternals. This change also fixed a bug
in getting cells attached to points in 2D grids. (Actually, technically
someone else fixed it and checked it in first. The changes were merged
during a rebase.)

I also added a specalization to Vec for 1D that implicitly converts
between the 1D Vec and the component. This can be convenient when
templating on the Vec length.
2015-09-02 13:54:51 -07:00
Kenneth Moreland
b58543297a Special implementation of cell derivative for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
284fda03fd Special implementation of cell interpolate for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
493656e419 Special implementation of parametric coordinates for rectilinear cells 2015-09-02 13:50:31 -07:00
Kenneth Moreland
429f9c0cb7 Add VecRectilinearPointCoordinates class
This class implicitly stores the point coordinates for a rectilinear
cell (such as a voxel) with just the location of the lower left point
and the spacing in each dimension. In addition to saving space, this
class should allow cell-specific functions to specialize for faster
processing.
2015-09-02 13:50:31 -07:00
Kenneth Moreland
294e8843cb Merge branch 'misc-fixes' into 'master'
Misc fixes

Miscellaneous fixes to errors and warnings that are popping up during the code sprint.

See merge request !175
2015-09-02 16:49:14 -04:00
Kenneth Moreland
c5e9ce4769 Fix compiler warnings for isosurface code 2015-09-02 13:47:48 -07:00
Kenneth Moreland
9749e57838 Fix pyexpander errors
There was some inconsistencies between the input and output files for
pyexpander checked into the repository. This just makes them consistent.
2015-09-02 13:47:33 -07:00
Robert Maynard
ed463d903c Merge topic 'opengl_interop_iterator_deref'
41b40ae3 Always pass raw memory pointers to glBufferSubData.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !170
2015-09-02 16:42:06 -04:00
Sujin Philip
6fde50160b Update VertexClustering to use the new features in vtkm 2015-09-02 16:41:54 -04:00
Sujin Philip
8a11f9b302 Merge topic 'missing_install_headers'
ed3949b4 install DispatcherBaseDetailInvoke but don't test build it.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !173
2015-09-02 16:24:55 -04:00
Christopher Sewell
7fc0b25bdb Merge topic 'isosurface-render-example'
493ca4e0 Merging with master
a10d1fc2 Removing unnecessary cell fields from isosurface test and example, and adding a few comments
70c49b14 Changing translation for isosurface example
a96da4e0 Moving viewpoint for IsosurfaceUniformGrid example
30100e2a Adding examples directory with isosurface rendering example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !163
2015-09-02 16:22:21 -04:00
Christopher Meyer Sewell - 188584
493ca4e0c6 Merging with master 2015-09-02 14:18:05 -06:00
Robert Maynard
ed3949b4c7 install DispatcherBaseDetailInvoke but don't test build it. 2015-09-02 16:03:56 -04:00
Kenneth Moreland
06db9fdd29 Merge branch 'topic-additional-Pi-constants' into 'master'
Add other Pi fraction constants and 2Pi

Add Pi constant helper functions for Pi halves, thirds, fourths, and 2 * Pi

See merge request !169
2015-09-02 15:46:45 -04:00
Christopher Meyer Sewell - 188584
a10d1fc237 Removing unnecessary cell fields from isosurface test and example, and adding a few comments 2015-09-02 12:03:49 -06:00
Jeremy Meredith
2ae2df9a8f Merge branch 'newtopology' into 'master'
adding cell-to-point topology support and worklet

This adds code to support a cell-to-point topological mapping worklet.

For explicit cell set, there is code to calculate a cell-to-point topology from the canonical point-to-cell topology.  (It is not parallelized at this point.)  Most of the required code for structured grids was already in place.

See merge request !154
2015-09-02 13:34:54 -04:00