Commit Graph

512 Commits

Author SHA1 Message Date
Robert Maynard
bd62ec394e Merge branch 'remove_make_thrust_zip_iter_cruft' into 'master'
Remove dead code for converting zip handles to iterators for cuda.

This code isn't needed anymore as the new iterator facade handles this use case properly.

See merge request !45
2015-06-18 15:35:29 -04:00
Robert Maynard
6c3f669398 Remove dead code for converting zip handles to iterators for cuda.
This code isn't needed anymore as the new iterator facade handles this
use case properly.
2015-06-18 13:53:02 -04:00
Robert Maynard
549dfa544c Merge branch 'correct_cuda_scan' into 'master'
Correct undefined behavior that was causing scan test failures.

We need call PrepareForInput on the input argument before invoking a function.
The order of execution of parameters of a function is undefined, so we need to
make sure input is called before output, or else in-place use case breaks.

See merge request !44
2015-06-17 16:00:18 -04:00
Robert Maynard
9d350fb023 Correct undefined behavior that was causing scan test failures.
We need call PrepareForInput on the input argument before invoking a function.
The order of execution of parameters of a function is undefined, so we need to
make sure input is called before output, or else in-place use case breaks.
2015-06-17 15:35:27 -04:00
Kenneth Moreland
73217515d1 Merge branch 'new-instance-dynamic-array-handle' into 'master'
Add NewInstance method to DynamicArrayHandle.

Per Sujin's recent request on the VTK-m mailing list, here is an implementation of NewInstance added to DynamicArrayHandle.

See merge request !43
2015-06-16 17:48:27 -04:00
Kenneth Moreland
46e1d9e5e7 Add NewInstance method to DynamicArrayHandle. 2015-06-16 15:23:50 -06:00
Robert Maynard
1c14539579 Merge branch 'correct_vtkm_pair_init' into 'master'
Properly initialize vtkm::Pair, and remove the TypeTrait for it.

vtkm::Pair can hold vtkm::Vec so we need to call the proper constructor
for vtkm::Vec.

Now that vtkm::TypeTraits don't error out on unknown types, we don't need
the weird specialization for vtkm::Pair.

See merge request !39
2015-06-16 16:00:44 -04:00
Robert Maynard
3f60ebbd6f Merge branch 'improve_tbb_sort_and_reduce_performance' into 'master'
Correct tbb to properly sort all arrrays in parallel.

See merge request !42
2015-06-16 15:02:17 -04:00
Robert Maynard
6279b8ed28 Correct tbb to properly sort all arrrays in parallel. 2015-06-16 14:40:25 -04:00
Robert Maynard
9ef7fa9b3a Merge branch 'iterator_operator_square_bracket_corrected' into 'master'
Make sure we use ptrdiff_t for index into arrays.

This is a requirement since you can use negative indices into arrays.

See merge request !41
2015-06-16 13:09:17 -04:00
Robert Maynard
7f7038d96b Merge branch 'remove_unneeded_cuda_wrapped_op_overloads' into 'master'
Remove un-needed overloads from WrappedOperators for cuda.

See merge request !40
2015-06-16 13:09:04 -04:00
Robert Maynard
eb7e388adc Properly initialize vtkm::Pair, and remove the TypeTrait for it.
vtkm::Pair can hold vtkm::Vec so we need to call the proper constructor
for vtkm::Vec.

Now that vtkm::TypeTraits don't error out on unknown types, we don't need
the weird specialization for vtkm::Pair.
2015-06-16 13:06:08 -04:00
Robert Maynard
726c914ee5 Make sure we use ptrdiff_t for index into arrays.
This is a requirement since you can use negative indices into arrays.
2015-06-16 11:00:01 -04:00
Robert Maynard
eb6c698e63 Remove un-needed overloads from WrappedOperators for cuda. 2015-06-16 09:48:12 -04:00
Robert Maynard
925d6865d2 Merge branch 'deviceAdapter_zero_init_vtkm_vec' into 'master'
DeviceAdapter now properly initialize vtkm::Vec to the proper value.

See merge request !38
2015-06-16 09:14:42 -04:00
Robert Maynard
2ce14c7760 DeviceAdapter's now properly init all value types.
This is needed when use vtkm::Vec, as it doesn't zero the memory it contains.
2015-06-16 08:35:04 -04:00
Robert Maynard
095f25c3ac vtkm::TypeTraits now work on all types. Plus has ZeroInit helper function. 2015-06-16 08:34:29 -04:00
Robert Maynard
2c91cdfa3b Update cuda/thrust backend scan algorithms to work with vec types. 2015-06-16 08:28:31 -04:00
Robert Maynard
19121fbbfb Remove creating a vtkm::vec from a pointer.
We need to remove this overload to simplify the constructors, and to
allow code such as vtkm::Vec<float,3> f(0). Which when you have both
overloads is ambiguous.
2015-06-16 08:27:37 -04:00
Robert Maynard
e44510eef7 Testing was calling host functions from device+host functions. 2015-06-16 08:27:37 -04:00
Robert Maynard
b7537fec9c Merge branch 'unused_typedef_warnings' into 'master'
Unused typedef warnings

See merge request !37
2015-06-15 14:15:09 -04:00
Robert Maynard
14801c87db Merge branch 'ReduceByKey_fix' into 'master'
Fix ReduceByKey general algorithm to work with parallel ScanInclusive

Also using bit representation for states.  This is using an advanced algorithm, and the fix has very little change from the current implementation.

See merge request !35
2015-06-15 14:00:14 -04:00
Robert Maynard
4088db797d disable conversion warnings inside boost 2015-06-15 11:45:31 -04:00
Robert Maynard
2eba6ecb32 Remove uneeded typedefs. 2015-06-15 11:45:31 -04:00
Chun-Ming Chen
32f3fa6d87 Fix unmerged codes from the previous merge. Use multiply in customed operator ReduceByKey test 2015-06-15 11:12:51 -04:00
Chun-Ming Chen
4d9c25deff Merge remote-tracking branch 'robert/reduce_by_key_custom_binary_function' into ReduceByKey_fix 2015-06-15 10:55:44 -04:00
Chun-Ming Chen
dcc12e733f Fix ReduceByKey general algorithm to work with parallel ScanInclusive. Use bit representation for states. 2015-06-13 02:46:36 -04:00
Robert Maynard
53d7053d7a Fix a bug where DeviceAdapterGeneral::ReduceByKey ignored custom binary functor 2015-06-12 16:11:28 -04:00
Robert Maynard
50ffcec3bb Merge branch 'tbb_SortByKey_ZipArray_fix' into 'master'
TBB sort by key zip array fix

The original codes do not accept when the zip handle array contains two different storage types

See merge request !25
2015-06-12 15:43:09 -04:00
Robert Maynard
65b6d5eefd Merge branch 'more_general_array_copy' into 'master'
A more general Copy that allows copying into a diff. array type.  Testing codes are added.

See merge request !33
2015-06-12 13:16:31 -04:00
Chun-Ming Chen
360279c29a A more general Copy that allows copying into a diff. array type. Testing codes are added. 2015-06-12 12:42:43 -04:00
Robert Maynard
ff2e03f180 Merge branch 'reduce_with_zip_arrays' into 'master'
Fancy Arrays as input to Device Algorithms

Currently working on the general approach to get ArrayHandleZip/Permutation to be handled by all device adapter algorithms.

See merge request !32
2015-06-12 11:57:09 -04:00
Robert Maynard
791e0c477c Add a test to use Reduce and ArrayHandleZip together. 2015-06-12 11:56:46 -04:00
Robert Maynard
2a2159b1e1 Generalize the support for zip handles inside the cuda backend.
Instead of having a single specialization for sort and zip handles,
we know handle any fancy handles being passed to the cuda device adapter.
This was done by reworking how we represent fancy iterators inside thrust,
and instead of using a transform iterator + counting iterator we just use
a iterator_facade.
2015-06-12 11:56:46 -04:00
Robert Maynard
c41f232edc Allow Serial Device to reduce Zip Array Handles. 2015-06-12 10:08:10 -04:00
Robert Maynard
0de858bf70 Allow vtkm::Pair to be easily printed in testing code. 2015-06-12 10:08:10 -04:00
Robert Maynard
a76a97c606 Add a plus operator to vtkm::Pair. 2015-06-12 10:08:10 -04:00
Robert Maynard
cb4e509be7 Correct some missing VTKM_CONT_EXPORT macros. 2015-06-12 10:08:10 -04:00
Chun-Ming Chen
84192883fa Merge branch 'tbb_SortByKey_ZipArray_fix' of https://gitlab.kitware.com/chunmingchen/vtk-m into tbb_SortByKey_ZipArray_fix 2015-06-11 11:51:43 -04:00
Chun-Ming Chen
ebf814cb81 This merge adds ReduceByKey with different keys
Merge branch 'test_tbb_SortByKey' into tbb_SortByKey_ZipArray_fix

Conflicts:
	vtkm/cont/testing/TestingDeviceAdapter.h
2015-06-11 11:48:13 -04:00
Chun-Ming Chen
d42edb51ab Include ArrayHandleZip in related testing codes 2015-06-11 11:29:51 -04:00
Chun-Ming Chen
267505ff0f Remove unncecessary comments 2015-06-11 11:29:51 -04:00
Chun-Ming Chen
19a736fd05 Move Pairwise Add to vtkm namespace 2015-06-11 11:29:51 -04:00
Chun-Ming Chen
c7cf1a27f2 add testing ReduceByKey with zipped array with heterogeneous value types 2015-06-11 11:29:51 -04:00
Chun-Ming Chen
1088e855c3 Add ReduceByKey support for zip array input. A testing codelet to demo the problem. 2015-06-11 11:29:51 -04:00
Kenneth Moreland
8764a17c2d Merge branch 'conversion-warnings' into 'master'
Fix a couple of conversion warnings in OptionParser for testing.

See merge request !31
2015-06-11 10:28:30 -04:00
Chun-Ming Chen
c60b9688fc TBB may fail in the new test case 2015-06-10 16:37:52 -04:00
Kenneth Moreland
6a2140fe57 Fix a couple of conversion warnings in OptionParser for testing. 2015-06-10 13:58:26 -06:00
Robert Maynard
d26cfcf5cc Merge branch 'sort_inplace_zip_arrays' into 'master'
Allow in-place sorting of ArrayHandleZip

See merge request !29
2015-06-10 15:51:40 -04:00
Robert Maynard
c052400ffb CUDA now converts ArrayHandleZip to ::thrust::zip iterator.
This is required so that we can use ArrayHandleZip with Sort/Reduce and
custom comparison operators. ArrayZip and PortalValue don't combine
well together, when used with DeviceAlgorithm that has a custom operator.
The custom operator is actually passed the PortalValue instead of
the real values, and by that point we can't fix anything since we
don't know what the original operator is.
2015-06-10 14:15:40 -04:00