Commit Graph

503 Commits

Author SHA1 Message Date
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
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
Robert Maynard
cbf3faf135 Simplify the SortGreater and SortLesser Implementation. 2015-06-10 14:15:40 -04:00
Robert Maynard
549a7dd7c7 Adding support to cuda backend to write to a ZipHandle. 2015-06-10 14:15:40 -04:00
Robert Maynard
493d201029 Add tests to verify that you can properly sort ArrayHandleZip.
We have increased the ARRAY_SIZE for the TestingDeviceAdapter to work
around issues with backends not using parallel algorithms for arrays of length
500 or less.
2015-06-10 14:15:40 -04:00
Robert Maynard
543a3a0453 Allow TBB Device Adapter to sort array handle zip. 2015-06-10 14:15:39 -04:00
Robert Maynard
3a3a577e1b Allow Serial Device Adapter to sort array handle zip. 2015-06-10 14:15:39 -04:00
Robert Maynard
5b96d435c7 Give IteratorFromArrayPortalValue class a less operator.
This is required so that they can be sorted, which happens when sorting
an ArrayHandleZip.
2015-06-10 14:15:39 -04:00
Robert Maynard
ee4687f8ee Allow vtkm::Pair Dimension and Numeric Tab to be found.
For now the pair's numeric type is determined by the first elements type.
2015-06-10 14:15:39 -04:00
Robert Maynard
90835e7982 Merge branch 'thrust_use_cuda_execution_policy' into 'master'
Explicitly invoke all thrust algorithms using the cuda policy.

This is required if we ever want to use thrust from another device adapter.

See merge request !30
2015-06-10 11:41:42 -04:00
Robert Maynard
040d7e761e Explicitly invoke all thrust algorithms using the cuda policy.
This is required if we ever want to use thrust from another device adapter.
2015-06-10 09:41:06 -04:00