Commit Graph

2711 Commits

Author SHA1 Message Date
Robert Maynard
137dffb4a1 CellSetPermutation copy constructor to suppress cuda warnings.
Without an explicit copy constructor when cuda is used it generates a
copy constructor which is marked up as host/device and than emits warnings.
2017-01-02 11:29:32 -05:00
Robert Maynard
8828e8809f Merge topic 'tag_intersection'
c27bb01f Introduces ListTagUniversal which represents a list of everything.
9eb28841 vtkm::filter now deduces the subset of valid field types.
49c5e822 vtkm can now find the intersection of two ListTags.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !649
2017-01-01 13:35:58 -05:00
Robert Maynard
c27bb01f26 Introduces ListTagUniversal which represents a list of everything.
This makes the FilterTraits design simpler and easier to understand.
2016-12-30 15:44:21 -05:00
Robert Maynard
9eb288419e vtkm::filter now deduces the subset of valid field types.
Previously the ApplyPolicy logic was to use the filters
field set, and ignore the policy field set.

But this caused problems, as a filter couldn't express that
it was able to work on all valid types. This caused
certain complex types Vec of Vec's to fail to work properly,
and would cause compile use code paths that would never
be valid for a given policy.
2016-12-30 08:30:44 -05:00
Robert Maynard
49c5e8222e vtkm can now find the intersection of two ListTags.
This is the first step in having filters which obey both
the filters field policy and the users applied policy in
field what fields they can run on.
2016-12-29 17:18:29 -05:00
Robert Maynard
d6f7aed873 Merge topic 'filters_apply_policy_to_cellsets'
c064e006 The Average filters now obey the policy when casting DynamicCellSets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !648
2016-12-29 15:54:29 -05:00
Robert Maynard
c064e0066c The Average filters now obey the policy when casting DynamicCellSets. 2016-12-29 11:19:30 -05:00
Robert Maynard
d4cfc025f9 Merge topic 'point_gradient_use_correct_device'
66fc2fa5 PointGradients now use the proper device adapter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !647
2016-12-23 16:19:03 -05:00
Robert Maynard
66fc2fa5d7 PointGradients now use the proper device adapter. 2016-12-23 15:11:56 -05:00
Ben Boeckel
be8c31fbfb Merge topic 'add_gradient_divergence'
b0a6b179 Add support for computing divergence to the gradient filter.
5eade282 Restrict Gradient to scalar values and vec<3> of scalar values.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !646
2016-12-23 13:05:28 -05:00
Robert Maynard
b0a6b17924 Add support for computing divergence to the gradient filter. 2016-12-23 09:34:33 -05:00
Robert Maynard
5eade282ee Restrict Gradient to scalar values and vec<3> of scalar values. 2016-12-23 09:03:35 -05:00
Kenneth Moreland
a52f2b5521 Merge topic 'transport-with-input-domain'
eb0691f5 Fix example data set for marching cubes test
a5817da4 Fix cow nose data set
02bf444d Test that the array transports check the size of input arrays
9ea10317 Add passing input domain to transport operator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !643
2016-12-21 13:34:17 -05:00
Kenneth Moreland
eb0691f5df Fix example data set for marching cubes test
It was not properly setting the number of points.
2016-12-20 13:03:24 -07:00
Kenneth Moreland
a5817da438 Fix cow nose data set
It was not properly setting the number of points.
2016-12-19 17:59:16 -07:00
Kenneth Moreland
02bf444dc2 Test that the array transports check the size of input arrays 2016-12-19 17:30:41 -07:00
Kenneth Moreland
9ea10317d9 Add passing input domain to transport operator
Previously, the operator for a Transport class took the object being
transported to the execution environment and the size of the output
domain. This change also passes in the control-side argument for the
input domain. This will help check input array sizes as well as make
other potential transformations based on the input domain.
2016-12-19 17:03:15 -07:00
Robert Maynard
6ab5e26a42 Merge topic 'vorticity_move_exec_markup'
75288e2d Correct location of VTKM_EXEC on Vorticity worklets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !642
2016-12-19 16:49:54 -05:00
Robert Maynard
75288e2dd6 Correct location of VTKM_EXEC on Vorticity worklets 2016-12-19 16:08:47 -05:00
Robert Maynard
d5c80802c4 Merge topic 'add_vorticity_and_qcriterion'
f71f3ed0 Allow the gradient filter to compute Vorticity and QCriterion.
efb119ea Sort the worklet headers, as they should be in alphabetical order.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !638
2016-12-19 15:31:33 -05:00
Kenneth Moreland
078a2135e0 Merge topic 'msvc-20150-warning'
c9e146a2 Make literals for bits unsigned

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !641
2016-12-16 16:14:28 -05:00
Kenneth Moreland
a7941098ac Merge topic 'ambiguous-cell-set-explicit-constructor'
1c3f1694 Remove ambiguous CellSetExplicit constructor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !640
2016-12-16 16:13:57 -05:00
Kenneth Moreland
c9e146a2a1 Make literals for bits unsigned
Literals that are used to represent the bits of certain floating point
numbers (e.g. VTKM_NAN_BITS_64) are placed into unsigned integers before
converted to floating points. We ran into an example where the compiler
complained that a literal (specifically VTKM_NEG_INF_BITS_64) was
declared signed and was negative but then placed in an unsigned (64-bit)
integer. This should fix the problem by making the literal itself
unsigned.
2016-12-16 08:47:18 -07:00
Kenneth Moreland
1c3f1694ea Remove ambiguous CellSetExplicit constructor
CellSetExplicit had a constructor that took a single argument that is
the number of points in the data and another constructor that had two
arguments of the number of points and the name. The problem was that the
latter constructor had a default argument for the second argument. Thus,
if you tried to construct a CellSetExplicit with just the number of
points, it would fail to compile because the compiler would not know
which constructor to use.

Fix the issue by removing the single argument constructor.
2016-12-16 08:41:13 -07:00
Kenneth Moreland
4dd16c5bcb Merge topic 'check-cuda-errors'
98c8cb86 Do not attempt to execute CUDA kernels with no blocks
fda3ec71 Don't call std functions in math nonfinte functions for CUDA
55c159d6 Check error codes from CUDA functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !632
2016-12-16 10:27:06 -05:00
Kenneth Moreland
1d605f6703 Merge topic 'add-test-data-set'
ce7d2190 Fix winding of hexahedrons
22b3a4a7 Add a small test data set

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !639
2016-12-16 10:23:43 -05:00
Kenneth Moreland
ce7d2190e4 Fix winding of hexahedrons
While writing a test I noticed that some of the MakeTestDataSet
hexahedrons had improper point ordering. It was close but backwards so
that all the faces pointed in instead of out.
2016-12-16 07:22:01 -07:00
Robert Maynard
f71f3ed011 Allow the gradient filter to compute Vorticity and QCriterion. 2016-12-16 08:42:16 -05:00
Kenneth Moreland
22b3a4a72a Add a small test data set
This new explicit data set example is interesting in that it contains
several different cell types (one of every 3D cell shape currently
defined).
2016-12-15 16:04:38 -07:00
Robert Maynard
efb119ead0 Sort the worklet headers, as they should be in alphabetical order. 2016-12-15 15:16:49 -05:00
Robert Maynard
649a07e05a Merge topic 'simplify_average_worklets'
f698a006 Simplify the implementation of the average worklets.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !637
2016-12-15 15:12:46 -05:00
Kenneth Moreland
98c8cb8657 Do not attempt to execute CUDA kernels with no blocks
I noticed that when I attempted to execute a CUDA kernel with 0 blocks,
it generated a CUDA error. The error did not really matter since nothing
was really supposed to run anyway. However, once we are careful about
checking CUDA errors, it will cause test failures and likely other
misdiagnoses.
2016-12-15 11:33:48 -07:00
Kenneth Moreland
fda3ec71c5 Don't call std functions in math nonfinte functions for CUDA
The math nonfinite check functions (like IsNan) were calling the std
equivalent function. This is fine for most architectures, but is not
available for devices under CUDA. Instead, call the CUDA version of
these functions when compiling with CUDA.

This fixes an issue that became apparent once we added CUDA error code
checking.
2016-12-15 10:40:17 -07:00
Robert Maynard
3c9b8f1793 Merge topic 'add_pointaverage_filter'
854e298b CellAverage filter now verifies the field is a point field.
b85cb2dd Add a PointAverage Filter.
daa75d74 Add a PointAverage worklet which is the twin to CellAverage.
839d8e83 CellAverage first control parameter is now the cellset.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !636
2016-12-15 12:18:57 -05:00
Robert Maynard
f698a006fc Simplify the implementation of the average worklets. 2016-12-15 09:10:53 -05:00
Robert Maynard
854e298be6 CellAverage filter now verifies the field is a point field. 2016-12-15 09:10:33 -05:00
Robert Maynard
b85cb2dd33 Add a PointAverage Filter. 2016-12-14 15:10:43 -05:00
Robert Maynard
daa75d744b Add a PointAverage worklet which is the twin to CellAverage. 2016-12-14 14:05:50 -05:00
Robert Maynard
839d8e8392 CellAverage first control parameter is now the cellset.
This was done so that it consistently matches other cell based worklets,
and the majority of examples inside the VTK-m Users Guide.
2016-12-14 14:04:57 -05:00
Robert Maynard
1c88307867 Merge topic 'add_gradient_filter'
eba19df3 Add a filter that handles all the gradient computations.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !635
2016-12-14 13:07:04 -05:00
Kenneth Moreland
55c159d6f0 Check error codes from CUDA functions
Most functions in the CUDA runtime API return an error code that must be
checked to determine whether the operation completed successfully. Most
operations in VTK-m just called the function and assumed it completed
correctly, which could lead to further errors. This change wraps most
CUDA calls in a VTKM_CUDA_CALL macro that checks the error code and
throws an exception if the call fails.
2016-12-14 10:43:44 -07:00
Robert Maynard
eba19df361 Add a filter that handles all the gradient computations. 2016-12-14 11:00:07 -05:00
Robert Maynard
ce651e479d Merge topic 'de_virtual'
8223eacc De-virtualize classes that have no need of a vtable.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !634
2016-12-14 08:34:47 -05:00
Robert Maynard
c2f5647ec7 Merge topic 'add_point_gradient'
d1336c7f CellDerivativeFor2DCell now creates Space2D of the correct type.
134f2449 Add a point gradient worklet.
06af2fbc Make it easier to construct ThreadIndices by hand.
60843cba Allow people to get the portal from ExecutionWholeArray.
e462d34c ExecutionWholeArray now has consistent ValueType defines.
9f2b6805 WholeCellSetIn now uses the proper fetch tag.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !621
2016-12-13 08:58:40 -05:00
Robert Maynard
d1336c7f84 CellDerivativeFor2DCell now creates Space2D of the correct type.
Previously vtkm::Vec<> fields would construct Space2D types incorrectly
2016-12-12 13:26:16 -05:00
Robert Maynard
134f24496b Add a point gradient worklet. 2016-12-12 13:26:16 -05:00
Robert Maynard
06af2fbcbf Make it easier to construct ThreadIndices by hand.
In some cases it is necessary to construct ThreadIndices to manually
use vtkm::exec::Fetch. This now makes it possible.
2016-12-12 13:26:16 -05:00
Robert Maynard
60843cbab8 Allow people to get the portal from ExecutionWholeArray.
This is required when doing some optimizations to PointGradient.
2016-12-12 13:26:16 -05:00
Robert Maynard
e462d34c60 ExecutionWholeArray now has consistent ValueType defines. 2016-12-12 13:26:16 -05:00
Robert Maynard
9f2b680594 WholeCellSetIn now uses the proper fetch tag. 2016-12-12 13:26:16 -05:00