Commit Graph

7536 Commits

Author SHA1 Message Date
Kenneth Moreland
66aa10aab7 Fix issues with warnings about data loss from type conversion
Fix compile warnings that come up with the flags

  -Wconversion -Wno-sign-conversion

This catches several instances (mostly in the testing framework) where
types are implicitly converted. I expect these changes to fix some of
the warnings we are seeing in MSVC.

I was going to add these flags to the list of extra warning flags, but
unfortunately the Thrust library has several warnings of these types,
and I don't know a good way to turn on the warnings for our code but
turn them off for Thrust.
2015-05-07 16:34:06 -06:00
Kenneth Moreland
29319d1c3d Merge branch 'test-array-handle-permutation-error' 2015-05-07 13:22:29 -06:00
Kenneth Moreland
229579c337 Compare with tolerance in UnitTestArrayHandlePermutation
The UnitTestArrayHandlePermutation test was failing when compiled with
icc. I believe the issue is that the icc optimization takes some
liberties when computing literal floating point values versus computing
them at run time that makes the two slightly different. I changed all
the applicable comparisons in this test from using the == operator to
using the test_equal function, which adds a tolerance to the comparison.
I expect this to fix the test failure.
2015-05-07 13:22:10 -06:00
Kenneth Moreland
1f7ed4311b Merge branch 'cuda-errors' 2015-05-07 13:14:46 -06:00
Kenneth Moreland
c9f6628c5b Make VTKM_ASSERT_CONT gracefully ignore CUDA devices
There are often instances where one wants to make an assert check in a
method that can run in either the control or execution environment. This
is rather difficult in general for the execution environment, but with
this change you can place the VTKM_ASSERT_CONT macro in such a method,
and it should compile even under CUDA. It works by removing the macro if
compiling for a CUDA device.
2015-05-07 13:13:50 -06:00
Robert Maynard
6564d7af1c Enable SortByKey Test on the Device Adapter. 2015-05-06 09:27:59 -04:00
Robert Maynard
e201778cc0 Merge branch 'help_msvc_out' 2015-05-06 09:27:03 -04:00
Robert Maynard
2af64c4097 Enable big object file creation when using visual studio.
By default visual studio limits the number of sections in an object file
to 2^16 which isn't enough when creating some of our tests. So we enable
/bigobj which increases that number to 2^32.
2015-05-06 09:25:45 -04:00
Robert Maynard
cdac2ca29c Make sure we include as little form windows.h as possible.
Using NOMINMAX and WIN32_LEAN_AND_MEAN allows us to reduce the number
of macro's and functions we bring in from windows.
2015-05-06 09:24:49 -04:00
Robert Maynard
8280fac1f5 Merge branch 'more_fancy_array_portals' 2015-05-05 14:26:22 -04:00
Robert Maynard
c2f2c166c0 Test all Fancy ArrayHandles and Array Portals on every device adapter.
Fancy array handles being Counting, Implicit, Permutation, Transform, and Zip.
2015-05-05 14:25:48 -04:00
Robert Maynard
1d170b8fdd Add ArrayHandleZip.
Allows both reading and writing to a vtkm::pair of values.
2015-05-05 14:03:40 -04:00
Robert Maynard
078d623173 Allow ArrayPortalFromThrust to be used inside a zip portal. 2015-05-05 14:03:40 -04:00
Kenneth Moreland
ce124b91e4 Merge branch '3d-dispatcher-base-schedule' 2015-05-05 09:15:14 -06:00
Kenneth Moreland
dad18e1170 Improve 3D scheduling mechanism in DispatcherBase
Previously, DispatcherBase had an ivar to determine whether to use the
numInstances passed on the stack or to use a 3D range held in a
different ivar. This change allows either a 1D range or 3D range to be
passed on the stack, which I expect to be closer to how we we handle
this when 3D ranges are fully supported.

This also fixes a bug introduced with commit
fdac208acbfa47b613d899a36cefc32a01e8f0a8 where the Use3DSchedule ivar
was not set correctly in UnitTestDispatcherBase.
2015-05-05 08:46:23 -06:00
Robert Maynard
189a530577 Merge branch 'dont_include_exec_cuda_unless_enabled' 2015-05-05 08:00:12 -04:00
Robert Maynard
1348aa0ec1 Don't try to include vtkm/exec/cuda unless cuda is enabled. 2015-05-05 07:59:44 -04:00
Kenneth Moreland
fdcbb9cd21 Merge branch 'simplify-array-handle' 2015-05-04 17:40:51 -06:00
Kenneth Moreland
0c14d62e6f Merge branch 'fancy-array-portals'
In retrospect, I probably should have called this branch fancy-array-handles,
but it's not that much different.
2015-05-04 17:36:54 -06:00
Kenneth Moreland
d15074153d Remove comments about textures from ArrayManagerExecutionThrustDevice
Per a discussion with Robert Maynard, we no longer have plans to bind
textures or use texture objects. Instead, we are now using the __ldg
command to load from global memory inside the execution portal, which
gives us most of the benefits of textures, but doesn't incur any
bookkeeping.
2015-05-04 14:18:00 -06:00
Robert Maynard
19ee2be2b6 Allow ArrayHandleTransform Control Portal to be accessed when using cuda.
Because of the device/control markups previously we couldn't access the
control portal when compiling with cuda enabled.
2015-05-04 10:58:07 -04:00
Robert Maynard
d101d41c8d ArrayManagerExecution needed to update the RetrieveOutputData signature. 2015-05-04 10:58:07 -04:00
Kenneth Moreland
1c733d4e32 Update the ArrayTransfer classes to new interface merged in
For what it's worth, the implementation of these classes simplified
quite a bit.
2015-04-30 22:01:02 -06:00
Kenneth Moreland
d9f45f09a5 Merge branch 'simplify-array-handle' into fancy-array-portals 2015-04-30 21:37:16 -06:00
Kenneth Moreland
e14fc427f0 Change storage references to storage pointers.
Previously ArrayTransfer and ArrayManagerExecution received a reference
to a Storage class in their constructor and held the reference as an
ivar. In retrospect, this is just asking for trouble. First, it is way
too easy to pass by value when you mean to pass by reference. Second, if
there ever is a bug where the Storage goes out of scope before the
classes holding a reference, it is that much harder to debug.
2015-04-30 21:29:58 -06:00
Kenneth Moreland
ec0adf8b16 Change interface of ArrayTransfer to be more like ArrayHandle.
This includes changing methods like LoadDataForInput to PrepareForInput.
It also changed the interface a bit to save a reference to the storage
object. (Maybe it would be better to save a pointer?) These changes also
extend up to the ArrayManagerExecution class, so it can effect device
adapter implementations.
2015-04-30 21:07:36 -06:00
Kenneth Moreland
c5b831b726 Remove LoadDataForInput that takes portals.
This API change effects both ArrayTransfer and ArrayManagerExecution.
This is in preparation for a future change to make the API more
consistent with ArrayHandle.
2015-04-28 11:30:30 -04:00
Kenneth Moreland
a2c280993c Remove UserPortal from ArrayHandle.
The UserPortal in ArrayHandle was used to copy a pointer the user
created into an ArrayHandle to use in VTK-m algorithms. However, this is
only really valid for a basic storage, so the functionality has been
moved there, and you have to construct an ArrayHandle with a storage
instead of an array portal.
2015-04-28 10:49:46 -04:00
Robert Maynard
f089f0f0cf Merge branch 'cleanup_old_docs' 2015-04-28 09:54:10 -04:00
Robert Maynard
8bd99b3871 Cleanup the documentation for VTK-m 2015-04-28 09:53:50 -04:00
Kenneth Moreland
fe444e1267 Add ArrayHandlePermutation
Also found a problem with ArrayHandle that manifests itself with derived
types when you first do a PrepareForInput and then a PrepareForInPlace.
The ArrayHandle assumes the data is already moved to the device and
skips the in place call to the array transfer. However, this means the
transfer of the derived array handle does not have a chance to set up
for in place.

I think the appropriate solution may be to move the appropriate logic
from ArrayHandle to ArrayTransfer. I will look into that next.
2015-04-23 20:45:24 -04:00
Kenneth Moreland
04a3be81c1 Fix GetNumberOfValues in transformed array handle portal
The number of values in the array handle portal was screwy and the
GetNumberOfValues method was flat out wrong (thanks to Rob Maynard for
pointing that out). This is fixed.

Also fixed a subtle but nasty typing problem in the Storage's
GetPortalConst method.
2015-04-23 11:07:26 -04:00
Robert Maynard
3a36b28a12 Merge branch 'cleanup_enabling_cuda' 2015-04-23 09:38:01 -04:00
Robert Maynard
30c5ee9cf4 Remove SetThrustForCuda as we explicitly use the thrust cuda system.
The only reason SetThrustForCuda was ever needed was that we used
::thrust::device_vector instead of ::thrust::system::cuda::vector.
2015-04-23 09:23:41 -04:00
Robert Maynard
b6f6056db6 Include the Cuda ArrayManagerExecution when it is the default backend. 2015-04-23 09:22:38 -04:00
Robert Maynard
adc96b1ba7 Merge branch 'enable_more_device_adapter_tests' 2015-04-16 10:26:07 -04:00
Robert Maynard
dca1f3b487 Enable Algorithm testing on all the DeviceAdapters. 2015-04-16 10:25:44 -04:00
Robert Maynard
c806348c94 Remove debug code from cuda schedule algorithm. 2015-04-16 08:56:08 -04:00
Jeremy Meredith
5e2c22d9fa switching to using cell sets instead of connectivity objects in data set. 2015-04-15 13:01:00 -04:00
Jeremy Meredith
1629045986 adding initial cell set structures 2015-04-15 12:43:12 -04:00
Jeremy Meredith
2e7e3fff64 using dynamic array handle in field. 2015-04-15 12:33:27 -04:00
Jeremy Meredith
64f80a1de9 Merge branch 'datamodel-design' of public.kitware.com:vtkm into datamodel-design 2015-04-15 12:15:18 -04:00
Jeremy Meredith
aadd307332 renaming to fix build errors. 2015-04-15 11:07:37 -04:00
Jeremy Meredith
e8ee229bc8 Merge branch 'datamodel-design' of public.kitware.com:vtkm into datamodel-design 2015-04-15 10:52:35 -04:00
Jeremy Meredith
75971e9abb fixing comments and removing old worklet. 2015-04-15 10:52:09 -04:00
Dave Pugmire
8294d500fe move connectivity into their own files 2015-04-15 10:45:39 -04:00
Kenneth Moreland
f7daaf36a8 Add ArrayHandleTransform. 2015-04-13 14:43:18 -06:00
Robert Maynard
e582da7f53 Merge branch 'use_cuda_schedule' 2015-04-13 14:19:38 -04:00
Kenneth Moreland
e6d9e120eb Add ArrayHandleImplicit. 2015-04-13 12:15:28 -06:00
Robert Maynard
3a10a63e8c make sure the 3d block size makes sense. 2015-04-08 15:57:35 -04:00