Commit Graph

190 Commits

Author SHA1 Message Date
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
Kenneth Moreland
694010b8d7 Fix annoying warning about converting signed to unsigned. 2015-01-15 22:32:04 -07:00
Kenneth Moreland
37dac92052 Add index tags to FunctionInterface features.
The functors in the ForEach, StaticTransform, and DynamicTransform
methods sometimes can use the index of the parameter that they are
operating on. This can be a helpful diagnostic in compile and run-time
errors. It is also helpful when linking parameters from one
FunctionInterface with those of another.

This new features are now replacing implementations using the Zip
functionality that was removed earlier. The implementation is actually
simplified a bit.
2015-01-15 22:13:47 -07:00
Kenneth Moreland
0fdc311682 Remove test of Zip functionality from UnitTestFunctionInterface
Since that feature has been removed.
2015-01-12 19:24:53 -08:00
Kenneth Moreland
93e42bc3e1 Remove Zip functionality in FunctionInterface.
The Zip function does not work when compiling with CUDA because it
forces the parameters to be in both the control and execution (host and
device) environments.
2015-01-12 18:08:32 -08:00
Robert Maynard
797aac5537 Worklet tests build for cuda device adapter now use the cuda device adapter.
We have to work around some bugs in the CMake cuda target logic.
2014-12-19 13:47:28 -05:00
Robert Maynard
3e8ac22fe6 Allow worklet tests to be built for the cuda device adapter. 2014-12-19 13:47:28 -05:00
Robert Maynard
1b5c5a6ce5 Add in initial support for texture binding of input arrays. 2014-12-19 13:47:28 -05:00
Robert Maynard
a509dae909 Use pinned memory for error reporting on the cuda backend.
This reduces the amount of explicit cuda Device to Host memory copies.
2014-12-19 13:47:28 -05:00
Robert Maynard
d9270e408d Adding a cuda device adapter to vtkm.
Porting the dax device adapter over to vtkm. Unlike the dax version, doesn't
use the thrust::device_vector, but instead uses thrust::system calls so that
we can support multiple thrust based backends.

Also this has Texture Memory support for input array handles. Some more work
will need to be done to ArrayHandle so that everything works when using an
ArrayHandle inplace with texture memory bindings.
2014-12-19 13:47:28 -05:00
Robert Maynard
e2eb901be3 move DeviceAdapterAlgorithm to correct folder as it's namespace 2014-12-18 11:09:15 -05:00
Kenneth Moreland
e8556c2b48 Merge branch 'disable-function-interface-timing-test' 2014-12-10 09:47:05 -07:00
Kenneth Moreland
25613a26ad Re-disable timing test in FunctionInterface unit test
When fixing a problem where the disabled test had left some unused
classes, which some compilers picked up on (SHA
eae8921dc714c9bdb12058db365f890425291ea2), I used a preprocessor wrapper
to enable/disable the code (mostly to preserve history). However, I
forgot to leave the code disabled. Disable that here.
2014-12-10 09:44:54 -07:00
Robert Maynard
bcc6b770db Merge branch 'remove_references_to_dax' 2014-12-10 10:39:18 -05:00
Robert Maynard
735a2ff25a Update the documentation to use vtkm::FloatDefault instead of vtkm::Scalar. 2014-12-10 10:38:03 -05:00
Robert Maynard
519509bba1 Update the documentation to note have references to dax. 2014-12-10 10:37:25 -05:00
Kenneth Moreland
d754bad470 Merge branch 'documentation-fixes' 2014-12-09 16:08:28 -07:00
Kenneth Moreland
a6622aeea9 Documentation fixes.
Fix documentation comments in FunctionInterface.h and some declarations
that are only for documentation in DeviceAdapterAlgorithm.h.
2014-12-09 16:07:27 -07:00
Kenneth Moreland
d7c70acc2d Merge branch 'icc-fixes' 2014-11-12 09:01:51 -07:00
Kenneth Moreland
4ab4dc9cf2 Use test_equal instead of == for comparing numbers in exec worklets.
A couple of tests were failing with the Intel compiler due to
imprecision in comparing floating point values.

Also snuck in some minor documentation fixes in a comment for
FunctionInterface.
2014-11-12 08:53:03 -07:00