Commit Graph

251 Commits

Author SHA1 Message Date
Kenneth Moreland
4276b0cdcb Fix warning about uninitialized object
It is not important for this test, but we might as well make the
compiler happy.
2015-05-17 18:32:07 -06:00
Kenneth Moreland
97847fb9f4 Fix warning about converting between an int and a float. 2015-05-17 18:29:35 -06:00
Kenneth Moreland
84ea9b8490 Merge branch 'exec-object-fix' 2015-05-14 10:20:20 -06:00
Kenneth Moreland
c83b585b14 Fix ExecObject tag in WorkletBase
The ExecObject tag for the ControlSignature was not declared right so
would cause a compile error if it was ever used. Clearly this was not
being tested properly, so the dispatcher base unit test now passes an
ExecObject parameter.
2015-05-13 18:44:44 -06:00
Kenneth Moreland
4afb6fe5ff Merge branch 'constant-array-handle' 2015-05-13 14:25:23 -06:00
Kenneth Moreland
d77342a7c6 Add ArrayHandleConstant 2015-05-13 14:24:51 -06:00
Robert Maynard
59618b3a50 Merge branch 'sort_by_key' 2015-05-11 08:04:09 -04:00
Robert Maynard
ca0d1ade55 Merge branch 'test_permutation_as_output' 2015-05-08 15:32:37 -04:00
Robert Maynard
1bafa94194 Verify the permutation handle can be used as output on all devices 2015-05-08 15:32:06 -04:00
Kenneth Moreland
9db8483b5a Merge branch 'msvc-warnings' 2015-05-08 10:55:24 -06:00
Kenneth Moreland
dd897c0565 Remove template parameter for IncrementBy2
THe IncrementBy2 test type previously allowed any subtype including
floating point numbers. The meaning of this is actually a little unclear
and the feature was causing implicit type conversion warnings that were
hard to template out. The utility of of templating this class is dubious
in the first place, so class is now a fixed type.

I'm a little unsure whether we should keep this test class at all. It's
math operations are ad hoc and it could be difficult to determine if a
problem is caused by an actual problem or just bad math operators.
2015-05-08 10:53:28 -06:00
Kenneth Moreland
209053b79e Fix issues with implicitly converting ints to floats
MSVC complains that converting a 32-bit int to a 32-bit float could
cause loss of precision.
2015-05-08 10:33:59 -06:00
Kenneth Moreland
b2e39ad895 Merge branch 'type-conversions' 2015-05-07 16:37:17 -06:00
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