Commit Graph

1030 Commits

Author SHA1 Message Date
Robert Maynard
c06c54b1fb Merge topic 'enable_vectorization'
4ceb111a Enable vectorization inside the Serial and TBB backends.
514ea09a Teach VTK-m how to enable vectorization for gcc, clang, and icc.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !275
2015-11-27 09:36:15 -05:00
Robert Maynard
4ceb111a68 Enable vectorization inside the Serial and TBB backends. 2015-11-25 15:59:13 -05:00
Sujin Philip
9c31290619 Merge topic 'io-reader-unsupported-cells'
066e1bf3 Convert unsupported cell types to supported types

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !273
2015-11-24 15:29:58 -05:00
Sujin Philip
066e1bf3b1 Convert unsupported cell types to supported types 2015-11-24 13:56:23 -05:00
Patricia Kroll Fasel - 090207
6c4fb856df Add example data file for streamline. 2015-11-23 17:00:22 -07:00
Patricia Kroll Fasel - 090207
cba0e218d8 Verify unit test results 2015-11-23 16:46:23 -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
02f84a1992 StreamLine filter outputs dataset. Add example. 2015-11-23 12:54:12 -07:00
Robert Maynard
514ea09afc Teach VTK-m how to enable vectorization for gcc, clang, and icc. 2015-11-23 12:44:05 -05:00
Patricia Kroll Fasel - 090207
e34aaa02ea Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into streamline 2015-11-12 16:08:44 -07:00
Patricia Kroll Fasel - 090207
82d9c10206 Pass input and output datasets and not arrays. Support FORWARD, BACKWARD and BOTH. 2015-11-12 15:35:46 -07:00
Sujin Philip
c6a562aeba Fix for MSVC conversion warning 2015-11-12 10:29:30 -05:00
Sujin Philip
503f9197fd Fix VTK DataSet IO to work correctly with DynamicArrayHandle 2015-11-12 10:28:22 -05:00
Sujin Philip
2b771418e6 Update Clip worklets to work with more types 2015-11-12 10:28:22 -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
Kenneth Moreland
7b05604a66 Add more tolerance to UnitTestParametricCoordinates
I noticed a failure in a dashboard run of UnitTestParametricCoordinates.
This test uses randomly generated numbers to test the behavior of some
cell shapes, and there was an instance that occured with seed 1447261681
that caused one of the comparisons to be just slightly larger than the
default tolerance but still within reasonable value.

I just increased the tolerance of that particular comparison. Hopefully
this will prevent all future failures.
2015-11-11 10:38:17 -07: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
Kenneth Moreland
2fd2174378 Use bit-wise math to compute MC case. 2015-11-10 14:56:26 -07:00
Robert Maynard
54a8a713e7 Merge topic 'bidirectional-array-transform'
af32a21b Add support for bidirectional array transforms.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !214
2015-11-10 15:47:06 -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
Patricia Kroll Fasel - 090207
add67881db Rework stream code 2015-11-10 10:33:21 -07:00
Kenneth Moreland
377b7123ff Remove divide from ClassifyCell.
Previously, there was a table holding the number of vertices produced
for each MC case. However, what we really need is the number of
triangles, so we would have to divide that by 3. Instead, just store the
number of triangles.
2015-11-09 22:13:26 -07:00
Robert Maynard
b3687c6f3c Workaround inclusive_scan issues in thrust 1.8.X for complex value types.
The original workaround for inclusive_scan bugs in thrust 1.8 only solved the
issue for basic arithmetic types such as int, float, double. Now we go one
step further and fix the problem for all types.

The solution is to provide a proper implementation of destructive_accumulate_n
and make sure it exists before any includes of thrust occur.
2015-11-09 17:14:30 -05:00
Patricia Kroll Fasel - 090207
d3e9d5df3b Compiles and runs under cuda. 2015-11-09 12:51:45 -07:00
Kenneth Moreland
1898ab473c Remove unnecessary comment.
It was a TODO comment that is already done.
2015-11-08 18:28:08 -07:00
Kenneth Moreland
8ef0a4ee50 Fix conversion warnings.
Recent changes to algorithm implementations caused CellDerivative to be
called in a way such that it gave conversion warnings on some compilers.
Fix that.
2015-11-07 13:13:17 -07:00
Kenneth Moreland
342a57efcd Fix double reference compile error. 2015-11-07 11:23:03 -07:00
Kenneth Moreland
9409a54191 Make new tetrahedralize functors work on CUDA
The previous implementation was declaring static arrays in methods,
which cannot be used on a CUDA device. Instead, make static tables that
can be passed to the device with array handles (much like clip tables
do).
2015-11-07 10:09:19 -07:00
Kenneth Moreland
0d394db0ce Fix conversion warnings when using double precision.
There were some conversion warnings issued when the default float was set
to 64-bit. Fixed these (on clang).
2015-11-07 06:35:24 -07:00
Kenneth Moreland
bf03243516 Add ability to multiply any Vec by vtkm::Float64.
This has been requested on the mailing list to make it easier to
interpolate integer vectors.

There are a couple of downsides to this addition. First, it implicitly
casts doubles back to whatever the vector type is, which can cause a
loss of precision. Second, it makes it more likely to get overload
errors when multiplying with Vec. In particular, the operator to cast
Vec of size 1 to the component class had to be removed.
2015-11-07 06:33:50 -07:00
Kenneth Moreland
d44860c3cf Change tetrahedralize filters to use new Scatter mechanism
The tetrahedralize algorithms have been changed to use the Scatter
classes to build indices rather than build them on their own.

To implement this efficiently with structured grids, a new ScatterUniform
class was made. I also added a new execution argument tag that allows
you to get the thread indices object from within the worklet.
2015-11-07 04:57:16 -07:00
Kenneth Moreland
740adc70f3 Save triangle counts from isosurface classify as IdComponent.
When compiling with 64-bit ids (which is the default), this can save
quite a bit of time.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
8ab2938b8c When iteratively computing output map in count scatter, compute visit
It is the case that there are two ways to create the output to input map in
a count scatter. The first is to use a parallel find for every output index.
The second, which is used when there are lots of output, is to iterate over
the input and write out the reverse map. In this case, it is trivial to also
write out the visit indices, so do that instead of a bunch more searches.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
45abbb5c75 Share from indices vector.
Previously, each VecFromPortalPermute (the type that held the from field
values) held its own copy of the indices. For point to cell on
structured grids, this was a lot of repeated data values, which has the
potential to fill up cache and registers. Instead, just use pointer
references.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
f7789f0ed7 Fix issue with const types in Thrust array management
Previously, there was a declaration ConstArrayPortalFromThrust<const T>
in ArrayManagerExecutionThrustDevice. This proved problematic because
values read from the array in the worklet were typed as const T rather
than simply T. Any Vec or Matrix built from that type would then fail
because they are not meant to work with a const value (which means they
have to be set on construction and never changed.

Instead, declare ConstArrayPortalFromThrust<T> and internally set all
the Thrust pointers to have type const T. Also declare other thrust
pointers used as method parameters to have const T rather than T. This
should work as conversion from T to const T should be fine, but not the
other way around.
2015-11-06 18:05:21 -07:00
Kenneth Moreland
b7fdbb7294 Fix issue with indexing into triangle table offset
Each triangle in the isosurface table has three index entries. Thus,
each visit index must increment by 3.
2015-11-06 18:05:20 -07: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
Kenneth Moreland
5b54af546a Change Isosurface algorithm to work with scatter counting
Now that ScatterCounting is implemented, we can use that to implement a
good part of the triangle generation in the isosurface algorithm. This
changes the worklet from a basic map to a topology map, which also
reduces a lot of code.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
e6a9c96c96 Adding ScatterCounting 2015-11-06 18:05:20 -07:00
Kenneth Moreland
7b6e6e4a66 Enable output to input map in fetch mechanism.
This changes the interface to the ThreadIndices classes to have both
input and output indices. It also adds a visit index to ThreadIndices.

Also added the VisitIndex execution signature tag, which relies on this
behavior.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
b0c5a32611 Add Scatter parameters to Invocation.
We are passing in execution objects with the Invocation when the Worklet
is scheduled, but we are not using it yet.
2015-11-06 18:05:20 -07:00
Kenneth Moreland
e48e3d8086 Implement basic Scatter add to base worklet. 2015-11-06 18:05:20 -07:00
Kenneth Moreland
53d8e98440 Handle unstable sort in test for cell-to-point connectivity.
The parallel implementation in CellSetExplicit that builds cell-to-point
connectivity from point-to-cell connectivity uses a parallel sort-by-
key. The sort-by-key in the device adapter is not guaranteed to be
stable, so values associated with a particular key can be in any order.
The test for the result was expecting the connectivity array to be in a
particular order. Change the test to allow any connectivity ordering
that is still valid.
2015-11-06 14:43:02 -07:00
Patricia Kroll Fasel - 090207
123322f4b9 First code for stream lines worklet 2015-11-05 16:08:54 -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
Patricia Kroll Fasel - 090207
4757c0ae9e Merge branch 'master' of gitlab.kitware.com:Fasel/vtk-m into cell_to_point 2015-11-04 13:28:08 -07:00
Sujin Philip
3c57cd4388 Merge topic 'add-vtk-legacy-importers'
668b0e47 Change 'writers' to 'writer'
cf372c70 Add legacy VTK file readers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !250
2015-11-04 15:03:07 -05:00
Sujin Philip
668b0e47db Change 'writers' to 'writer' 2015-11-04 14:23:16 -05:00
Sujin Philip
cf372c7014 Add legacy VTK file readers 2015-11-04 14:23:16 -05:00