Commit Graph

11412 Commits

Author SHA1 Message Date
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
Dave Pugmire
82b97c4507 test commit 2015-01-05 15:47:48 -05:00
Jeremy Meredith
f3c1ebf5e6 test commit again 2015-01-05 15:47:10 -05:00
Dave Pugmire
a36e5345cf test commit 2015-01-05 15:45:08 -05:00
Jeremy Meredith
15075dfd6d removing reference to PyExapander (also a test commit for the branch) 2015-01-05 15:40:10 -05: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
Kenneth Moreland
eae8921dc7 Remove unused functor from function interface test.
It was the functor that was used to test the time overhead of invoking
a functor through a FunctionInterface, but that test has been disabled.
2014-11-12 08:39:45 -07:00
Kenneth Moreland
72c62a3556 Merge branch 'dispatch'
Conflicts:
	vtkm/internal/testing/UnitTestFunctionInterface.cxx
2014-11-10 12:27:31 -07:00
Kenneth Moreland
d093a05af5 Minor documentation fixes. 2014-11-10 11:04:05 -07:00
Kenneth Moreland
30893f0b0d Add utility include to Pair.h
Pair.h references std::Pair, which is defined in the utility header.
Thus, that should really be included.
2014-10-23 16:34:52 -06:00
Kenneth Moreland
b341d05f66 Merge branch 'disable-function-interface-timing-test' 2014-10-23 16:04:16 -06:00
Kenneth Moreland
e2e8a3adb9 Disable the timing test for FunctionInterface.
There is a test that tries to determine that the Invoke methods in
FunctionInterface do not add an unreasonable overhead. However, this
test is unreliable. Also, the most critical performance hit would be in
invoking a worklet operation, but that is now done elsewhere anyway.
2014-10-23 16:03:58 -06:00
Kenneth Moreland
8bc96558ab Merge branch 'pgi-fixes' 2014-10-23 15:42:03 -06:00
Kenneth Moreland
bc3e1ebd21 delete operator and std::allocator are not necessarily the same
The unit test for StorageBasic tested the StealArray feature and then
used the delete[] operator on the stolen array to deallocate it. For
many standard libraries the default implementation for delete[] is
the same as (or at least compatible with) std::allocator, but for
the PGI compiler they were not compatible and this resulted in a
run-time error. This change fixes the problem with the test by using
the same allocator as the StorageBasic test.
2014-10-23 15:39:05 -06:00
Kenneth Moreland
343c12b500 Fix ICC warnings.
ICC can be pretty thorough about finding unused elements. In this case
it was picking up an unused method in instances of a templated class
in an anonymous namespace. It was a method that should be there due to
the nature of the class, but it happened to not be used (which was OK,
too). To get around the problem, I just added some use of that method
in another method.
2014-10-23 10:59:18 -06:00
Kenneth Moreland
51e3b2bb1d Add checks for signature tags
It's easy to put accidently put something that is not a valid tag in a
ControlSignature or ExecutionSignature. Previously, when you did that
you got a weird error at the end of a very long template instantiation
chain that made it difficult to find the offending worklet.

This adds some type checks when the dispatcher is instantated to check
the signatures. It doesn't point directly to the signature or its
parameter, but it is much closer.
2014-10-23 08:28:50 -06:00
Kenneth Moreland
40efb51342 Fix MSVC warnings
MSVC is picky about type conversions. To get it to shut up, explicitly
cast the worklet return value to the fetch value in the
WorkletInvokeFunctor. The good is that it will help with needing
explicit conversions on these return values. But that is also bad in
that it might make some unexpected conversions possible.
2014-10-23 07:12:01 -06:00
Kenneth Moreland
6b1db2cf04 Check value type in Invoke input arrays.
Instead of just checking that a dispatcher's Invoke input is an
ArrayHandle, also check that the ValueType of the ArrayHandle is
compatible with the types of the worklet operator. This is done by
adding a template argument to the ControlSignature tags that is a type
list tag that gets passed to the type check.
2014-10-22 16:51:42 -06:00
Kenneth Moreland
f4fb9f0ace Merge branch 'new-list-features' into distpach 2014-10-22 15:21:48 -06:00
Kenneth Moreland
421746d041 Add basic support for type checking of Invoke arguments 2014-10-22 15:21:18 -06:00
Kenneth Moreland
9ac538b6b9 MSVC fixes
One fix is a simple (pointless) compiler warning about precision. The
other fix is an error in one of the test codes that did not clear out
the message string in an error message buffer like it was supposed to.
2014-10-22 10:52:35 -06:00
Kenneth Moreland
b0b0bee4f6 Add VTKM_IS_LIST_TAG checks to dynamic classes 2014-10-22 10:46:54 -06:00
Kenneth Moreland
184118d9a2 Add a template that tests whether a type is in a list.
Also reduced the maximum list size to 15 (which is the current longest
single list we have). Trying to reduce the size of the generated code a
bit, which is getting a little long.
2014-10-22 10:35:56 -06:00
Kenneth Moreland
b368830fc0 Add VTKM_IS_LIST_TAG macro
As part of this is a ListTagCheck class that can be used for other
template magic.
2014-10-22 07:24:04 -06:00
Kenneth Moreland
a0d31278d8 Fix dependency issue with VTKmCheckPyexpander.cmake
Previously, this script would create a file the same name as the desired
output, and then move it to a file with .save appended to it if the
check failed. This is problematic with parallel builds because there is
no dependency set up between the actual header file and the one being
created. Thus, it is possible for some compiles to pick up the created
file before it is moved or deleted.

Instead, just create the file with .save appended to it so that no
compile can every accidently pick it up.
2014-10-22 07:04:16 -06:00
Kenneth Moreland
d4ad846e65 Merge branch 'any-scalar-width' 2014-10-21 16:53:50 -06:00
Kenneth Moreland
7cf25331e2 Fix MSVC compiler warnings
Generally, the MSVC compiler tends to be more picky about implicit type
conversions. It warns if there is any possibility of precision loss.
2014-10-21 16:52:24 -06:00
Kenneth Moreland
80809a8f0f Add DispatcherMapField.
This is a simple version of a dispatcher, but an important one.

Note that there is an issue brought up with UnitTestWorkletMapField in
that there needs to be better ways to specify worklet argument types.
2014-10-21 13:10:00 -06:00
Kenneth Moreland
53a454fe77 Add basic dispatcher functionality.
These changes support the implementation of DispatcherBase. This class
provides the basic functionality for calling an Invoke method in the
control environment, transferring data to the execution environment,
scheduling threads in the execution environment, pulling data for each
calling of the worklet method, and actually calling the worklet.
2014-10-21 11:49:23 -06:00
Kenneth Moreland
b78688f4f4 Add ability to zip function interface objects.
The zip capability allows you to parameter-wise combine two
FunctionInterface objects. The result is another FunctionInterface with
each parameter a Pair containing the respective values of the two
inputs.

Being able to zip allows you to do transforms and invokes on data that
is divided among multiple function interface objects.
2014-10-16 16:31:55 -06:00
Kenneth Moreland
01d6619774 Add basic worklet superclasses and signature tags 2014-10-15 15:47:39 -06:00
Kenneth Moreland
79399c210e Add Fetch class
The Fetch class is responsible for moving data in and out of some
collection in the execution environment. The Fetch class is templated
with a pair of tags (the type of fetch and the aspect) that control the
mechanism used for the fetch.
2014-10-15 13:52:27 -06:00
Kenneth Moreland
30558cf7ed Add Transport class
The Transport class is responsible for moving data from the control
environment to the execution environment. (Actually, it might be more
accurate to say it gets the execution environment associated with a
given control object.) The Transport class is templated with a tag that
controls the mechanism used for the transport.
2014-10-14 10:44:48 -06:00
Kenneth Moreland
797508aa0d Merge branch 'unify-test-value' 2014-10-14 10:01:17 -06:00