Commit Graph

55 Commits

Author SHA1 Message Date
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
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
791e0c477c Add a test to use Reduce and ArrayHandleZip together. 2015-06-12 11:56:46 -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
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
Chun-Ming Chen
c60b9688fc TBB may fail in the new test case 2015-06-10 16:37:52 -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
Chun-Ming Chen
8a3cc844e8 Include ArrayHandleZip in related testing codes 2015-06-08 13:31:31 -04:00
Chun-Ming Chen
bf44b9a840 Remove unncecessary comments 2015-06-08 12:13:19 -04:00
Chun-Ming Chen
5d87c1fa79 add testing ReduceByKey with zipped array with heterogeneous value types 2015-06-08 11:57:29 -04:00
Chun-Ming Chen
1533d7c63a Add ReduceByKey support for zip array input. A testing codelet to demo the problem. 2015-06-08 11:57:29 -04:00
Robert Maynard
0bd7d5e0f5 Merge branch 'schedule_id3_serial' 2015-06-08 10:38:20 -04:00
Robert Maynard
1d595b868c Make Schedule 3D use a larger dim size to throughly test implementations.
A smaller dim size can hide problems with algorithms that don't sum properly,
or do to much math per iteration.
2015-06-08 09:47:17 -04:00
Robert Maynard
8a8fc9ea73 Remove unused code from TestingDeviceAdapter. 2015-06-08 08:45:38 -04:00
Robert Maynard
b43fb01ff0 Redesign StorageBasic to allow modification of user provided memory.
The driving desire for this change was to make vtk-m ArrayHandle behave more
like the standard vector. The canonical example of what we want to support is:

```
std::vector<vtkm::Id> values;
values.resize(100);
vtkm::cont::ArrayHandle<vtkm::Id> array = vtkm::cont::make_ArrayHandle(values);
vtkm::cont::DeviceAdapterAlgorithm<DeviceAdapter>::Sort(array);
```

And with-out the ability to modify user provided memory, this was impossible.
2015-06-05 10:32:48 -04:00
Robert Maynard
98bd557a4f TestingDeviceAdapter now doesn't use initializer lists for vtkm::Vec
Since initializer lists are a c++11 feature we shouldn't use them.
2015-06-01 14:50:35 -04:00
Chun-Ming Chen
7ea9563d19 Fixed bug in ReduceByKey 2015-06-01 12:33:08 -04:00
Robert Maynard
d54aee7eb5 Merge branch 'fix_typo_in_copyright' 2015-05-21 10:32:08 -04:00
Robert Maynard
6b8e7822be The Copyright statement now has all the periods in the correct location. 2015-05-21 10:30:11 -04:00
Robert Maynard
f2b47ffd4a Add ReduceByKey to the DeviceAdapter. 2015-05-21 08:23:28 -04:00
Robert Maynard
d4adcb464a Merge branch 'reduce' 2015-05-19 16:53:59 -04:00
Kenneth Moreland
97847fb9f4 Fix warning about converting between an int and a float. 2015-05-17 18:29:35 -06:00
Robert Maynard
e38caafe37 Adding Reduce with custom operator to the DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
5d9f369d0c Adding ScanInclusive with custom binary operator to DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
9519737b3a Adding Reduce to the DeviceAdapterAlgorithm. 2015-05-14 15:16:49 -04:00
Robert Maynard
6564d7af1c Enable SortByKey Test on the Device Adapter. 2015-05-06 09:27:59 -04:00
Robert Maynard
cdac2ca29c Make sure we include as little form windows.h as possible.
Using NOMINMAX and WIN32_LEAN_AND_MEAN allows us to reduce the number
of macro's and functions we bring in from windows.
2015-05-06 09:24:49 -04:00
Kenneth Moreland
e14fc427f0 Change storage references to storage pointers.
Previously ArrayTransfer and ArrayManagerExecution received a reference
to a Storage class in their constructor and held the reference as an
ivar. In retrospect, this is just asking for trouble. First, it is way
too easy to pass by value when you mean to pass by reference. Second, if
there ever is a bug where the Storage goes out of scope before the
classes holding a reference, it is that much harder to debug.
2015-04-30 21:29:58 -06:00
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
Robert Maynard
dca1f3b487 Enable Algorithm testing on all the DeviceAdapters. 2015-04-16 10:25:44 -04: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
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
7f94eafc9c Remove vtkm::Scalar and vtkm::Vector# types
Providing these types tends to "lock in" the precision of the algorithms
used in VTK-m. Since we are using templating anyway, our templates
should be generic enough to handle difference precision in the data.
Usually the appropriate type can be determined by the data provided. In
the case where there is no hint on the precision of data to use (for
example, in the code that provides coordinates for uniform data), there
is a vtkm::FloatDefault.
2014-10-09 08:54:56 -06:00
Kenneth Moreland
c3fbe073e8 Change VectorTraits to VecTraits.
Matches the previous move from Tuple to Vec. We can unify on this name.
2014-10-08 10:09:43 -06:00
Kenneth Moreland
cbe6284b83 Add IdComponent and other base types with explicit widths
In preparation for supporting base types with more widths, add typedefs
for the base types with explicit widths (number of bits).

Also added a IdComponent type that should be used for indices for
components into tuples and vectors. There now should be no reason to use
"int" inside of VTK-m code (especially for indexing). This change cleans
up many of the int types that were used throughout.
2014-10-08 10:09:42 -06:00
Kenneth Moreland
8839e615e6 Remove GetIteratorBegin/End from all ArrayPortal classes.
Replace them (and their use) with the new ArrayPortalToIterators
functionality.
2014-09-08 14:59:11 -06:00
Kenneth Moreland
21823500c3 Change ArrayContainerControl to Storage.
After a talk with Robert Maynard, we decided to change the name
ArrayContainerControl to Storage. There are several reasons for this
change.

1. The name ArrayContainerControl is unwieldy. It is long, hard for
humans to parse, and makes for long lines and wraparound. It is also
hard to distinguish from other names like ArrayHandleFoo and
ArrayExecutionManager.

2. The word container is getting overloaded. For example, there is a
SimplePolymorphicContainer. Container is being used for an object that
literally acts like a container for data. This class really manages
data.

3. The data does not necessarily have to be on the control side.
Implicit containers store the data nowhere. Derivative containers might
have all the real data on the execution side. It is possible in the
future to have storage on the execution environment instead of the
control (think interfacing with a simulator on the GPU).

Storage is not a perfect word (what does implicit storage really mean?),
but its the best English word we came up with.
2014-06-24 09:58:32 -06:00
Kenneth Moreland
a789d54e99 Remove CopyInto method from array-support classes
It was originally put there to support CopyInto in ArrayHandle, but that
has already been removed. It really only makes sense for trivial
examples and testing code, and it sometimes causes complications with
coding.
2014-06-11 16:15:46 -06:00
Kenneth Moreland
ed9cf46a17 Make sure all header wrapper macros start with vtk_m_ rather than vtkm_
We made this change a while ago to help with completion in IDEs.
(Completion was matching a bunch of wrapper macros that were almost
never used anywhere.) Most of the changes are in comments, but there are
a few bad macro definitions.
2014-06-11 10:43:36 -06:00