Commit Graph

209 Commits

Author SHA1 Message Date
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
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
Robert Maynard
e582da7f53 Merge branch 'use_cuda_schedule' 2015-04-13 14:19:38 -04: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
Kenneth Moreland
de34bcbeba Merge branch 'expose-array-handle-allocate' 2015-02-10 16:11:23 -07:00
Kenneth Moreland
6141e83be4 Expose allocation in ArrayHandle.
Add an Allocate method in ArrayHandle that basically forwards the
alllocate request to the storage object. This allows some measure of
control of the array from the control side. You can allocate the array
and set values (by getting the control array portal) if you so desire.
2015-02-10 15:58:41 -07:00
Kenneth Moreland
2f781dfe7a Preserve data in ArrayHandle::ReleaseResourcesExecution
Previously when ReleaseResourcesExecution was called, the method blindly
deleted the execution array regardless of whether there was a valid copy
in the control environment. This could potentially lose data. What if
someone wanted to conserve memory on the device by clearing the array of
an output array?

There is also now an internal method that blindly deletes the array.
This is good for internal functions that are doing something to
invalidate the execution data anyway.
2015-02-10 15:49:55 -07:00
Kenneth Moreland
68ae208dad Merge branch 'get-portal-control-from-empty-array' 2015-02-09 14:54:50 -07:00
Kenneth Moreland
c224c2b98a Make ArrayHandle work better when uninitialized
Fixed a problem where ArrayHandle would cause a crash if you tried to
get the control portal on an uninitialized array (it was supposed to
throw an exception).

Also changed some methods in ArrayHandle so that they work resonably
without error when used with an uninitialized array. Specifically, the
aforementioned behavior was changed to "allocate" an array of size 0
(that is, call Allocate(0) on the storage object) to return an empty
array portal rather than throw an error. Although this use of
ArrayHandle can be considered erroneous, it is convenient the get an
empty array portal when dealing with a potentially unallocated array
rather than create a special condition.
2015-02-09 14:54:04 -07:00
Robert Maynard
3e3596ab7a Merge branch 'release_cuda_memory' 2015-01-28 15:55:03 -05:00
Robert Maynard
3c8ce36666 Properly deallocate cuda memory when we are done with it. 2015-01-28 15:54:45 -05:00
Robert Maynard
a3c4b92dcd Merge branch 'make_vtkmMacros_relocatable' 2015-01-27 09:11:46 -05:00
Robert Maynard
1306d389e5 Allow vtkmMacros to be called by users of vtkm. 2015-01-27 09:11:17 -05:00
Robert Maynard
10da28d5fe Merge branch 'suppress_windows_compile_warnings' 2015-01-26 10:19:32 -05:00
Robert Maynard
19abc0b2e9 Suppress warnings on windows. 2015-01-26 10:19:11 -05:00
Robert Maynard
7f73c4f404 Merge branch 'cuda_DeviceAdapterAlgorithm' 2015-01-20 15:29:08 -05:00
Robert Maynard
46df484ca7 Redesign the way we implement when to choose texture portals.
The logic to select texture portals is easier to understand now.
2015-01-20 13:58:28 -05:00
Robert Maynard
89f8f07806 Properly specify the iterator type for ArrayHandleCounting. 2015-01-20 13:58:28 -05:00
Robert Maynard
e26040282b Properly map TexturePortals to Iterators.
Also at the same time disable the Texture support by default.
2015-01-20 13:58:28 -05:00
Robert Maynard
389faf5262 Mark all cuda related CMake variables as advanced. 2015-01-20 09:26:19 -05:00
Robert Maynard
99cda04976 Merge branch 'incorrect_vtkm_naming' 2015-01-20 09:18:13 -05:00
Robert Maynard
a10f16d2d1 Enforce the VTKm name for all CMake variables. 2015-01-20 09:17:53 -05:00
Robert Maynard
ed8ff07dbb Disable the Cuda backend by default. 2015-01-20 09:08:19 -05:00
Robert Maynard
04bc41cad3 Fix multiple issue in the cuda array handle unit tests.
The namespaces need to be different for each test, or else only the first
implementation of the function will be used for all tests that call that
function.

Also updated the test to verify that we can count starting from a non zero
number.
2015-01-20 09:03:24 -05:00
Robert Maynard
f8bb4214ad Implicit Storage containers don't return anything from GetPortal/Const()
This means you can't assign the results of the function call to a variable.
This was causing nvcc to crash.
2015-01-20 09:03:24 -05:00
Robert Maynard
9f60876a0a Move the MapField testing worklets to a worklet namespace.
NVCC is unable to handle finding the worklets when they are in an anonymous
namespace. It only looks at the the anonymous namespaces included by the
files that device code uses, and misses our anon namespace. Moving to a named
namespace solves these issues.
2015-01-19 14:25:54 -05:00
John Biddiscombe
b1b3ba1131 Fix problem with find cuda/thrust cmake code 2015-01-19 14:25:54 -05:00
Kenneth Moreland
ef093d5c07 The DoWorkletInvokeFunctor methods were missing VTKM_EXEC_EXPORT. 2015-01-15 22:47:28 -07:00
Kenneth Moreland
76ac77b2e5 Move another FunctionInterface manipulation to be exclusively control 2015-01-15 22:42:36 -07:00
Kenneth Moreland
51b5cc63c4 Merge branch 'no-function-interface-zip' into cuda_DeviceAdapterAlgorithm 2015-01-15 22:35:38 -07:00
Kenneth Moreland
dcf1679020 FunctionInterface Append and Replace methods control environment only
They were declared as in both control and execution, but this would
cause problems when the FunctionInterface contained objects that could
only be copied in the control environment. Using these methods probably
only makes sense in the control environment anyway. (They are a bit
heavyweight to use in an inner loop of the execution environment.)
2015-01-15 22:34:04 -07:00