Commit Graph

2778 Commits

Author SHA1 Message Date
David C. Lonie
c928b14cfe Fix warnings on GCC6. 2017-01-10 14:22:22 -05:00
Kenneth Moreland
f23ff9fa49 Fix warnings about assignment operators not being generated
For some reason when VTK-m was being compiled as an accelerator in VTK,
Visual Studio 2013 gave a bunch of warnings about not being able to generate
assignment operators for many classes. This happened for classes with a
const ivar that could not be automatically set. (Automatic copy constructors
are fine on this count.) I'm not sure why these warnings did not happen
when just compiling VTK-m, nor am I sure why they were generated at all as
no code actually used the copy constructors.

This commit fixes the problems by adding a private declaration for assignment
operators that cannot be automatically created. No implementation is
provided, nor should any be needed.
2017-01-10 11:10:38 -07:00
Robert Maynard
03292c7149 Merge topic 'expose_failing_tbb_tests'
ad28ccad Update the default ARRAY_SIZE in TestingDeviceAdapter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !653
2017-01-10 12:58:51 -05:00
Kenneth Moreland
7ec8c03489 Remove warning about constant conditional in VTKM_ASSUME
It is common practice to swallow a semicolon in a macro using a do/
while(false) loop that only executes once. However, the Visual Studio
2013 compiler was stupidly warning about having a constant expression
for the loop. Get around the problem by creating our own swallow
semicolon macros that disable this warning as necessary.
2017-01-10 10:40:17 -07:00
David C. Lonie
4a9b8b6f77 Inherit std::exception in vtkm::cont::Error.
Fixes #58.
2017-01-10 12:23:42 -05:00
Patricia Kroll Fasel - 090207
62a1cceea6 Add file that creates test data sets and use that instead for contour tree. 2017-01-09 15:50:23 -07:00
Patricia Kroll Fasel - 090207
f6140c39e2 Add LANL/LLC copyright notification. 2017-01-09 14:53:59 -07:00
Patricia Kroll Fasel - 090207
9412584bf2 First implementation of contour tree 2D and 3D, serial and cuda. 2017-01-09 13:54:47 -07:00
Robert Maynard
ad28ccad5a Update the default ARRAY_SIZE in TestingDeviceAdapter.
This will expose bugs inside the tbb backend. We had to use heap allocations
for test arrays, instead of stack as the new array increases started to
cause stack overflow on windows.
2017-01-09 13:41:21 -05:00
Robert Maynard
589285eb5e Merge topic 'correct_reduce_tbb'
a339f3ac Had to rewrite tbb reduce to correct all the problems.
0120157e Correct tbb reduction algorithm to be correct when using multiple threads.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !654
2017-01-05 09:25:23 -05:00
Robert Maynard
a339f3ac0e Had to rewrite tbb reduce to correct all the problems.
The previous implementation(s) didn't properly handle non identity
initial values properly.
2017-01-04 17:27:21 -05:00
Robert Maynard
0120157e2e Correct tbb reduction algorithm to be correct when using multiple threads. 2017-01-04 13:43:55 -05:00
Robert Maynard
f4ccd33588 Merge topic 'cuda_warnings_brought_up_from_vtk_bindings'
270ece24 Types and Matrix don't emit Wunused-value warnings from __builtin_expect
1052a715 ConnectivityPermuted explicitly suppress cuda host/device warnings
137dffb4 CellSetPermutation copy constructor to suppress cuda warnings.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !651
2017-01-03 12:37:17 -05:00
Robert Maynard
270ece24b3 Types and Matrix don't emit Wunused-value warnings from __builtin_expect
When using Types or Matrix with the nvcc compiler with Wunused-value
enabled you would get the following warning:
(__builtin_expect(!(rowIndex < (this,NUM_ROWS)), 0)) ?
__assert_rtn(__func__, "vtkm/Matrix.h", 86, "rowIndex < this->NUM_ROWS") :
((void)0);

This is solved by changing this->NUM_ROWS to just NUM_ROWS.
2017-01-03 11:05:25 -05:00
Robert Maynard
b5d4ccbb31 Merge topic 'tag_intersection'
4a870718 Fix a unused parameter warning in the UnitTestListTag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !650
2017-01-02 13:23:36 -05:00
Robert Maynard
1052a71523 ConnectivityPermuted explicitly suppress cuda host/device warnings
The class can emit false positive warnings when being compiled with
cuda but SMP backends.
2017-01-02 11:38:05 -05:00
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
4a8707189a Fix a unused parameter warning in the UnitTestListTag 2017-01-02 10:39:41 -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