Commit Graph

1094 Commits

Author SHA1 Message Date
Kenneth Moreland
1432b160d5 Remove const from ArrayPortalGroupVec.
Remove the const from the ValueType of the delegate portal in
ArrayPortalGroupVec. This was creating a Vec with a const type, which
was immutable, which was problematic when trying to create the Vec in
the first place.
2015-09-29 16:06:39 -04:00
Kenneth Moreland
d47417fd20 Use test_equal for comparison.
The testing of ArrayHandleGroupVec was just using the == operator to
check values. Even though we are not doing any math, optimizers can
sometimes make float values slightly different anyway, so test_equal
should give the correct comparison.
2015-09-29 11:28:57 -04:00
Kenneth Moreland
c89647746a Add ArrayHandleGroupVec
This is a fancy array handle that groups consecutive entries in a
delegate array handle and presents them as a single vec.
2015-09-29 11:28:57 -04:00
Kenneth Moreland
3ced871709 Merge branch 'misc-compiler-warnings' into 'master'
Miscellaneous compiler warnings

Address some compiler warnings in some optional testing code that is not turned on in a lot of dashboards.

See merge request !223
2015-09-29 11:27:28 -04:00
Kenneth Moreland
7404f4edda Wrap boost include.
Wrap VTKM_THIRDPARTY_PRE_INCLUDE and VTKM_THIRDPARTY_POST_INCLUDE around
a boost include. This suppresses some warnings.
2015-09-29 10:25:27 -04:00
Kenneth Moreland
2e64a4e296 Fix warning about wrong type in GL call
Was storing a size in std::size_t and giving that to OpenGL functions,
which are using GLsizeiptr.
2015-09-29 10:24:34 -04:00
Robert Maynard
66715584f2 Merge topic 'single_cell_type_cellset'
c0f3b6ff Make3DExplicitDataSetCowNose now generates a CellSetSingleType.
011849a2 Add CellSetSingleType
c58f8ef1 CellSetExplicit Getters now properly deduce the correct handle type.
5a3e7c77 CellSetExplicit CreateConnectivity works even when NumberOfPoints is zero.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !219
2015-09-28 09:46:50 -04:00
Robert Maynard
c0f3b6ff97 Make3DExplicitDataSetCowNose now generates a CellSetSingleType. 2015-09-25 13:41:41 -04:00
Robert Maynard
011849a251 Add CellSetSingleType 2015-09-25 13:41:41 -04:00
Robert Maynard
c58f8ef193 CellSetExplicit Getters now properly deduce the correct handle type.
Previously the CellSetExplicit presumed that the CellToPoint and PointToCell
Storage tags matched, which they don't when using custom storage tags.
2015-09-25 13:41:41 -04:00
Robert Maynard
5a3e7c779e CellSetExplicit CreateConnectivity works even when NumberOfPoints is zero.
Previously if you created a cell set explicit and didn't set the number of
points you would get a runtime error when you over-ran an array's bounds.
Now we account for this use case and properly generate the Cell To Point
Connectivity.
2015-09-25 13:41:41 -04:00
Robert Maynard
9c85c623f0 Merge topic 'cellset_explicit_user_defined_offsets'
dbed8827 Correct issues found in code review.
82b977da CellSetExplicit::CreateConnectivity now works with implicit NumIndices.
30f5d628 ConnectivityExplicit will not generate IndexOffsets when they are implicit.
f04ea6d7 CellSetExplicit has userdefined offset storage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !212
2015-09-25 13:24:56 -04:00
Robert Maynard
dbed882709 Correct issues found in code review. 2015-09-25 12:32:06 -04:00
Kenneth Moreland
a70b4543a2 Merge branch 'fix-test-equal' into 'master'
Fix issue with test_equal of numbers equal 0

There was an error in the test_equal comparison that would return true
when the second value was 0 (or close to 0) and the first value was not.

This was a bug I introduced with commit
b270438fea8a9fe4200322bfe6344ab2075c4d9a. I clearly misinterpreted how a
conditional worked.

See merge request !218
2015-09-25 10:47:42 -04:00
Kenneth Moreland
fcfe63ef85 Fix unnecessary warning about divide by zero.
Again. Hopefully I got it right this time.
2015-09-24 21:52:58 -06:00
Kenneth Moreland
fa0c695424 Fix issue with test_equal of 0 numbers
There was an error in the test_equal comparison that would return true
when the second value was 0 (or close to 0) and the first value was not.

This was a bug I introduced with commit
b270438fea8a9fe4200322bfe6344ab2075c4d9a. I clearly misinterpreted how a
conditional worked.
2015-09-24 16:48:03 -06:00
Robert Maynard
5c1e82e837 Merge topic 'suppress_more_host_device_warnings'
fc79055f Add suppression pragmas to exec::Fetch classes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !211
2015-09-24 14:00:29 -04:00
Robert Maynard
82b977da0e CellSetExplicit::CreateConnectivity now works with implicit NumIndices. 2015-09-24 12:38:34 -04:00
Robert Maynard
30f5d628cc ConnectivityExplicit will not generate IndexOffsets when they are implicit.
Even when using implicit index's the ConnectivityExplicit would generate
the code to compute the IndexOffsets, which would than fail to compile as
the ArrayHandle would only support read operations. This fixes that issue.
2015-09-24 11:57:34 -04:00
Robert Maynard
f04ea6d72e CellSetExplicit has userdefined offset storage. 2015-09-24 11:24:50 -04:00
Robert Maynard
45ad63c770 Merge topic 'update_cell_connectivity_types'
19cebccf Correct issues that buildbot brought up in the code.
c6dbc0f2 GetNumberOfPointsInCell consistently returns a vtkm::IdComponent
25ff1e94 CellSetExplicit storage tags are now easier to override.
935b3fd6 CellSetExplicit uses UInt8 for shape, and IdComponent for numIndices.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !210
2015-09-24 11:23:54 -04:00
Robert Maynard
fc79055f76 Add suppression pragmas to exec::Fetch classes 2015-09-24 10:39:48 -04:00
Robert Maynard
19cebccf11 Correct issues that buildbot brought up in the code. 2015-09-24 10:15:44 -04:00
Robert Maynard
c6dbc0f20e GetNumberOfPointsInCell consistently returns a vtkm::IdComponent 2015-09-23 15:47:41 -04:00
Robert Maynard
25ff1e9403 CellSetExplicit storage tags are now easier to override. 2015-09-23 15:47:41 -04:00
Robert Maynard
935b3fd6b9 CellSetExplicit uses UInt8 for shape, and IdComponent for numIndices. 2015-09-23 11:17:04 -04:00
Kenneth Moreland
5cb44a7a00 Merge branch 'easier-cast-and-call' into 'master'
Add new version of DynamicArrayHandle::CastToArrayHandle

This takes a reference to an array handle and fills it. This removes a lot of the pain of determining template arguments.

See merge request !205
2015-09-23 11:01:18 -04:00
Robert Maynard
768938f728 Merge topic 'deprecate_warnings'
dda098e8 Suppress Deprecation warnings about glut in the examples.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !208
2015-09-23 10:46:02 -04:00
Robert Maynard
dda098e80f Suppress Deprecation warnings about glut in the examples. 2015-09-23 09:00:51 -04:00
Robert Maynard
17a649da94 Merge branch 'cuda_75_pragma_for_exec_warnings' into 'master'
Cuda 75 pragma for exec warnings

See merge request !207
2015-09-22 10:50:57 -04:00
Robert Maynard
cf4db42bba Merge branch 'cuda_warnings' into 'master'
Cuda warnings

See merge request !206
2015-09-21 15:28:44 -04:00
Robert Maynard
778d670ed3 FunctionInterface suppresses warnings on calling host function from host/device 2015-09-21 15:26:28 -04:00
Robert Maynard
00b732056d Make a define to suppress false positive host/device warnings 2015-09-21 14:25:15 -04:00
Robert Maynard
46dc67c336 Suppress warnings from examples. 2015-09-21 14:17:25 -04:00
Robert Maynard
970ec3f426 Remove conversion warning from opengl interop code. 2015-09-21 14:17:25 -04:00
Robert Maynard
056f69bf96 Remove unused variable and conversion warnings from cuda code. 2015-09-21 14:17:25 -04:00
Kenneth Moreland
fd8cce93dd Switch VTKM_IS_ARRAY_HANDLE to use VTKM_STATIC_ASSERT
This is an attempt to get around a warning with the PGI compiler.
2015-09-20 15:19:46 -06:00
Kenneth Moreland
c97a90fc13 Add simpler type check for DynamicArrayHandle. 2015-09-20 00:55:54 -06:00
Kenneth Moreland
882c20a2cb Support DynamicArrayHandle::CastToArrayHandle for fancy ArrayHandles
Basically, this entails adding a constructor to each fancy ArrayHandle
that accepts the base ArrayHandle with the appropriate type and storage.
2015-09-20 00:28:11 -06:00
Kenneth Moreland
0ea9ceb1f8 Add an operator== to ArrayHandle.
This allows you to query whether two ArrayHandles have the same pointer.
2015-09-20 00:22:29 -06:00
Kenneth Moreland
77568789ea Make vtkm::Pair behave as a better core type
These changes are basically to support some upcoming changes to
ArrayHandleZip. The major additions are an implementation of VecTraits
for Pair and an overloaded << operator to ostream for Pair.

I also had to declare the operator<< for Pair to be in Types.h. Under
some circumstances the operator has to either be declared before the
template is declared or declared in the vtkm namespace. (The reasons are
described at <http://clang.llvm.org/compatibility.html#dep_lookup> but I
still don't understand.) I tried adding it to the vtkm namespace, but
that caused several of the other operator<< to fail. Since there is no
way to guarantee that Pair.h is declared before, say, ArrayHandle.h, I
moved the implementation to Types.h.

Since I was moving operator<< to Types.h, I went ahead and moved the
TypeTraits and VecTraits to their respective headers. Since Pair is
declared (but not implemented) in Types.h, these templated classes can
be implemented without including Pair.h.
2015-09-20 00:01:04 -06:00
Sujin Philip
b11ddf0167 Merge topic 'fix-cuda-valid-only-using-nvcc'
1d2657f3 Make cuda DeviceAdapter valid only when using nvcc

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !203
2015-09-18 17:09:29 -04:00
Sujin Philip
1d2657f360 Make cuda DeviceAdapter valid only when using nvcc
Before it was valid even on a regular compiler, if cuda was available.
2015-09-18 12:21:11 -04:00
Sujin Philip
a1546942fb Merge topic 'fix-CopyInto'
98885186 Fix CopyInto tests that use different DeviceAdapterTag
69b2ad2a Add unit tests for CopyInto function
2c55b15c Add additional control logic for CopyInto function
20c1a048 CopyInto function for ArrayHandles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !202
2015-09-18 12:18:52 -04:00
Sujin Philip
3710c0ac32 Merge topic 'isosurface_example_errors_and_warnings'
c6fa4aa3 Remove unused variables.
83f164da Update isosurface to know about ArrayHandleCounting step parameter.
31930356 Correct warnings in the isosurface example.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip <sujin.philip@kitware.com>
Merge-request: !200
2015-09-18 12:16:24 -04:00
Robert Maynard
c6fa4aa326 Remove unused variables. 2015-09-18 11:40:32 -04:00
Sujin Philip
98885186c8 Fix CopyInto tests that use different DeviceAdapterTag 2015-09-18 10:05:20 -04:00
Kenneth Moreland
e761afc18e Add new version of DynamicArrayHandle::CastToArrayHandle
This takes a reference to an array handle and fills it. This removes a
lot of the pain of determining template arguments.
2015-09-17 22:31:58 -06:00
Kenneth Moreland
fd21a12f4a Merge branch 'xcode-7-warnings' into 'master'
Xcode 7 warnings

The XCode 7 compiler has a new warning for unused typedefs. The Boost code we use has some instances where this warning gets issued. Suppress these warnings.

See merge request !199
2015-09-17 18:12:31 -04:00
Kenneth Moreland
b15940c1e3 Declare new VTKM_STATIC_ASSERT
This is to be used in place of BOOST_STATIC_ASSERT so that we can
control its implementation.

The implementation is designed to fix the issue where the latest XCode
clang compiler gives a warning about a unused typedefs when the boost
static assert is used within a function. (This warning also happens when
using the C++11 static_assert keyword.) You can suppress this warning
with _Pragma commands, but _Pragma commands inside a block is not
supported in GCC. The implementation of VTKM_STATIC_ASSERT handles all
current cases.
2015-09-17 14:40:39 -06:00