Commit Graph

236 Commits

Author SHA1 Message Date
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
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
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
Robert Maynard
fdac208acb use cuda scheduling versus thrust scheduling. 2015-04-03 10:18:05 -04:00
Robert Maynard
b7841c1251 Merge branch 'cuda_dont_pre_clear_vectors' 2015-04-03 10:14:09 -04:00
Robert Maynard
d340a573d9 don't clear ::thrust::vectors as that is not our intended behavior. 2015-03-23 09:01:42 -04:00
Robert Maynard
0659f3a0e3 Merge branch 'properly_allocate_unit8_on_cuda' 2015-03-11 10:48:14 -04:00
Robert Maynard
e4bd0132e6 Merge branch 'use_ldg_cuda_load' 2015-03-11 10:47:57 -04:00
Robert Maynard
86dc8f1d38 Move back to thrust::cuda::vector to properly handle allocating uint8's
Our approach of using the underlying allocator inside thrust was a bad approach,
for some reason it fails to properly allocate uint8's or int8's on the correct
boundaries. I expect that this logic is somewhere else in the code and
instead we should use thrust::system::cuda::vector which does this properly.
2015-03-10 10:10:03 -04:00
Robert Maynard
63b1f03187 Simplify the implementation of loading through textures.
We don't need this super complicated system for texture loading.
2015-03-09 16:37:45 -04:00
Robert Maynard
9b49973621 Use __ldg instead of texture object. 2015-03-05 18:31:44 -05:00
Kenneth Moreland
0c49c20035 Merge branch 'fix-copyright-check' 2015-02-11 09:48:39 -07:00
Kenneth Moreland
baf941beb1 Fix the date manipulation on the check copyright script
When a new file is added to VTK-m, the copyright statement should go at
the top of the file. The copyright contains a date. What should that date
be? I usually set the date to the current year so older files will have
an older copyright whereas newer files will have a newer one. The check
copyright script needs to be flexible on the date.

There was an error in the script that was copied over from Dax. It was
checking for the year 2011, the start of the Dax project, and replacing
that in the text. VTK-m started in 2014, so the script really needs to
check for that year instead.
2015-02-11 09:45:36 -07:00