Commit Graph

2756 Commits

Author SHA1 Message Date
Kenneth Moreland
28b866920f Merge branch 'reduce-by-key-worklet' into 'master'
Reduce by Key Worklet Type

See merge request !645
2017-01-19 16:25:06 -05:00
Kenneth Moreland
503bebda54 Merge topic 'array-handle-zip-in-place'
4d1da547 Fix ArrayHandleZip::PrepareForInPlace

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !660
2017-01-18 10:00:45 -05:00
Kenneth Moreland
d6eb477a45 Minor fixes to UnitTestWorkletReduceByKey 2017-01-17 15:53:17 -07:00
Kenneth Moreland
058439851e Remove static assert from templated function
There was a static assert in a templated function that was never
supposed to be used. Some compilers were fine as long as there was no
use of the templated function, but others errored out anyway. Change the
implementation to use the =delete keyword instead.

This won't have as nice of an error message, but you would have to jump
through some hoops to get to this point anyway. If this still does not
work, we could just probably remove the invalid templated function. The
compiler error would get even more obfuscated, but again I don't expect
anyone to actually run into it.
2017-01-17 15:53:15 -07:00
Kenneth Moreland
72b85559c2 Add ReducedValues[In][Out] tags to WorkletReduceByKey 2017-01-17 15:53:13 -07:00
Kenneth Moreland
ffa3b167b5 Add ValueCount tag to WorkletReduceByKey 2017-01-17 15:53:10 -07:00
Kenneth Moreland
add10f56cf Add Value[In][Out] tags for WorkletReduceByKey
This lets you give arrays of values paired with the keys that will be
grouped into (hopefully) small Vecs.
2017-01-17 15:53:08 -07:00
Kenneth Moreland
58eb8f168d Add WorkletReduceByKey and dispatcher
And the basic type for a reduce by key worklet and its associated
adapter. Right now the worklet only supports passing in keys. Values
come next.
2017-01-17 15:53:06 -07:00
Kenneth Moreland
cd64b69a55 Add Keys class
This class will manage the keys during a reduce-by-key worklet
execution.
2017-01-17 15:53:04 -07:00
Kenneth Moreland
4d1da5474a Fix ArrayHandleZip::PrepareForInPlace
The implementation was calling PrepareForOutput on the delegate arrays
rather than PrepareForInPlace, do when used with CUDA you did not get
the data on the device.

Also added a regression test to check this.
2017-01-17 15:33:18 -07:00
Robert Maynard
4a56e9f129 Merge branch 'contour-tree' into 'master'
Contour tree

See merge request !658
2017-01-17 17:00:54 -05:00
Kenneth Moreland
f0413c4801 Merge topic 'require-num-points-in-explicit-cell'
713cf422 Make it not possible to create a cell set without specifying num points

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !644
2017-01-12 18:42:13 -05:00
Patricia Kroll Fasel - 090207
fd7f34c95d Fix warnings 2017-01-12 15:44:41 -07:00
Patricia Kroll Fasel - 090207
0950af7aeb Compiler warnings 2017-01-12 14:35:34 -07:00
Patricia Kroll Fasel - 090207
834f81f622 Fix order on class members to match constructor initialization -Wreorder
Make all non-templated PrintVectors methods inline
2017-01-12 13:57:04 -07:00
Kenneth Moreland
713cf4228a Make it not possible to create a cell set without specifying num points
The CellSetExplicit and CellSetSingleType classes have an ivar that
marks the number of points. There were several instances of code
creating cell sets without specifying the number of points. This can be
very bad if subsequent code needs that information.
2017-01-12 13:02:10 -07:00
Patricia Kroll Fasel - 090207
6db0c4e763 PrintVectors.h must be in CMakeLists.txt. Problem with the
non-templated code it contains causing doubly defineds.
2017-01-12 10:52:48 -07:00
Patricia Kroll Fasel - 090207
b3b5149b28 Use cont/testing/MakeTestDataSet.h and add contour tree tests.
Remove worklet/contourtree/PrintVectors.h from CMakeLists.txt.
2017-01-12 10:40:29 -07:00
Robert Maynard
be1e6588c1 Merge topic 'correct_exclusive_scan_tbb_2017'
35585f39 Correct a bug in tbb scan exclusive that was found using tbb 2017.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !652
2017-01-12 11:25:34 -05:00
Patricia Kroll Fasel - 090207
bed40256c8 Fix compiler warnings. Fix case table operation to comply. 2017-01-11 14:02:32 -07:00
Robert Maynard
79b74ccd3c Merge branch 'gcc6_warnings' into 'master'
Fix warnings on GCC6.

See merge request !656
2017-01-11 15:37:30 -05:00
David Lonie
a771c72c84 Merge topic 'exception_hierarchy'
4a9b8b6f Inherit std::exception in vtkm::cont::Error.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !655
2017-01-11 15:28:14 -05:00
Robert Maynard
35585f39ba Correct a bug in tbb scan exclusive that was found using tbb 2017. 2017-01-11 14:10:49 -05:00
Robert Maynard
69006fba60 Merge topic 'TestingDeviceAdapter_warnings'
9335e75e Fix casting warnings in TestingDeviceAdapter.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !659
2017-01-11 10:50:41 -05:00
Kenneth Moreland
5e752a2396 Merge topic 'warnings-compiling-with-vtk'
f23ff9fa Fix warnings about assignment operators not being generated
7ec8c034 Remove warning about constant conditional in VTKM_ASSUME

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !657
2017-01-11 10:46:57 -05:00
Robert Maynard
9335e75e51 Fix casting warnings in TestingDeviceAdapter. 2017-01-11 09:47:24 -05:00
Patricia Kroll Fasel - 090207
9548441565 Fix compiler warnings and test errors before merge. 2017-01-10 16:52:59 -07:00
Patricia Kroll Fasel - 090207
851dfc094b Correct the example compilation for TBB. 2017-01-10 12:33:45 -07:00
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