Commit Graph

28 Commits

Author SHA1 Message Date
Robert Maynard
9a8809f933 Add CellSetPermutation which allows custom iteration over a cell set.
When you create a CellSetPermutation you provide an array of the cell ids that
you want to iterate. This allows the user to do custom blanking of a data set,
or to do multi iteration over a set of cells.
2015-10-01 09:23:10 -04:00
Robert Maynard
011849a251 Add CellSetSingleType 2015-09-25 13:41:41 -04:00
Kenneth Moreland
891182ee19 Add ArrayHandleIndex class.
This is the most common use case for ArrayHandleCounting, and this class
is a bit easier to use and a bit faster.
2015-09-14 22:11:09 -06:00
Kenneth Moreland
91db8ad06f Remove PointCoordinates classes
The idea of the PointCoordinate classes was to make it easier to define
new special types of point coordinate arrays. But ultimately you have to
create an array handle type, and the CoordinateSystem class pretty much
handles everything else for you. Thus, these classes where being used
nowhere.
2015-08-25 14:38:50 -06:00
Kenneth Moreland
6b68666d0c Created DynamicCellSet
The DynamicCellSet will be used in place of the pointer to a CellSet
in a DataSet. This will prevent us from having to cast it all the time
and also remove reliance on boost smart_ptr.
2015-07-27 16:58:29 -06:00
Sujin Philip
91b191bf83 Add compute bounds to Fields 2015-07-22 12:17:33 -04:00
Robert Maynard
47f9874132 Extend the array handle testing to be done on a per device basis.
Now we test ArrayHandle with all the vtkm types to make sure all the
transfer logic / access logic works for all T types.
2015-06-25 08:21:49 -04:00
Robert Maynard
7f2ee8d050 Merge branch 'master' into datamodel-design 2015-06-03 14:36:53 -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
Dave Pugmire
9c0931f24f Create a class that generates small test datasets. Converted the unit tests to use this. 2015-05-18 13:17:03 -04:00
Robert Maynard
cc1f4e37d2 Split the Explicit and Regular grid cont tests into two separate tests. 2015-05-12 14:42:43 -04:00
Jeremy Meredith
b2fdff2873 Merge branch 'master' into datamodel-design 2015-05-11 15:14:08 -04:00
Robert Maynard
c2f2c166c0 Test all Fancy ArrayHandles and Array Portals on every device adapter.
Fancy array handles being Counting, Implicit, Permutation, Transform, and Zip.
2015-05-05 14:25:48 -04:00
Kenneth Moreland
fe444e1267 Add ArrayHandlePermutation
Also found a problem with ArrayHandle that manifests itself with derived
types when you first do a PrepareForInput and then a PrepareForInPlace.
The ArrayHandle assumes the data is already moved to the device and
skips the in place call to the array transfer. However, this means the
transfer of the derived array handle does not have a chance to set up
for in place.

I think the appropriate solution may be to move the appropriate logic
from ArrayHandle to ArrayTransfer. I will look into that next.
2015-04-23 20:45:24 -04:00
Kenneth Moreland
f7daaf36a8 Add ArrayHandleTransform. 2015-04-13 14:43:18 -06:00
Kenneth Moreland
e6d9e120eb Add ArrayHandleImplicit. 2015-04-13 12:15:28 -06:00
Dave Pugmire
01dce61672 data model tweaks.
fix a bad commit.
2015-01-28 11:27:15 -05:00
Kenneth Moreland
9bbbaecab6 Add ArrayPortalToIterators functionality.
This moves the ability to get an iterator from an array portal out of
the portal itself. The next step is to move the GetIteratorBegin/End out
of ArrayPortal. This should make the implemenation a bit cleaner.
2014-09-08 13:39:58 -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
50a5210a7d Add Timer class.
Helpful for safely timing parallel code across different devices.
2014-06-10 12:54:18 -06:00
Kenneth Moreland
7d769a8f4a Add classes to manage point coordinates.
Each type of point coordinates has its own class with the name
PointCoordinates*. Currently there is a PointCoordiantesArray that contains
an ArrayHandle holding the point coordinates and a PointCoordinatesUniform
that takes the standard extent, origin, and spacing for a uniform rectilinear
grid and defines point coordiantes for that. Creating new PointCoordinates
arrays is pretty easy, and we will almost definitely add more. For example,
we should have an elevation version that takes uniform coordinates for
a 2D grid and then an elevation in the third dimension. We can probably
also use a basic composite point coordinates that can build them from
other coordinates.

There is also a DynamicPointCoordinates class that polymorphically stores
an instance of a PointCoordinates class. It has a CastAndCall method that
behaves like DynamicArrayHandle; it can call a functor with an array handle
(possible implicit) that holds the point coordinates.
2014-05-15 13:41:45 -06:00
Kenneth Moreland
ff31afca3e Merge branch 'composite-vector-array' into dynamic-point-coordinates 2014-05-14 14:26:23 -06:00
Kenneth Moreland
261157ed22 Created ArrayHandleCompositeVector.
This derived array handle creates an array of vectors whose components come
from other arrays of vectors. In either case ArrayHandleCompositeVector
handles scalars as vectors of size 1.
2014-05-13 15:31:07 -06:00
Kenneth Moreland
406e655910 Add implicit array for uniform grid point coordinates. 2014-05-01 19:19:54 -04:00
Kenneth Moreland
d309fa7ae5 Add a dynamic array handle.
The dynamic array handle holds a reference to an array handle of an
unknown type. It contains the ability to try to cast it to an instance
of array handle or to try lists of types and containers.

There is currently an issue that is causing the test code not to
compile. It is the case that some combinations of types and containers
are not compatible. For example, an implict container is bound to a
certain type, and the container is undefined if they do not agree. There
needs to be a mechanism to detect these invalid combinations and skip
over them in the MTP for each.
2014-04-03 14:04:48 -06:00
Kenneth Moreland
c2d926fa49 Add tag-based type list templates
Provies a list of types in a template like boost::mpl::vector and a
method to call a functor on each type. However, rather than explicitly
list each type, uses tags to identify the list. This provides the
following main advantages:

1. Can use these type lists without creating horrendously long class
names based on them, making compiler errors easier to read. For example,
you would have a typename like MyClass<TypeListTagVectors> instead of
MyClass<TypeList<Id3,Vector2,Vector3,Vector4> > (or worse if variadic
templates are not supported). This is the main motivation for this
implementation.

2. Do not require variadic templates and usually few constructions. That
should speed compile times.

There is one main disadvantage to this approach: It is difficult to get
a printed list of items in a list during an error. If necessary, it
probably would not be too hard to make a template to convert a tag to a
boost mpl vector.
2014-03-31 17:45:52 -06:00
Robert Maynard
c2101b8ffc Add in a serial device adapter and required supporting classes.
We now can verify that the array handle is usable by a device adapter.
2014-02-11 12:34:56 -05:00
Robert Maynard
a94abd7a71 Add in the minimum part of the control env to have a testable array handle. 2014-02-10 15:00:17 -05:00