Commit Graph

15 Commits

Author SHA1 Message Date
Kenneth Moreland
2b6e6da6ca Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer 2019-09-09 08:19:15 -06:00
Kenneth Moreland
827613263a Avoid touching ListTag internals
Currently, ListTags are implemented by having a subtype name list set to
a brigand::list. However, there is always a chance this will change. To
make things more explicit, create a vtkm::internal::ListTagToBrigandList
to make it clear what the resulting type should be (and provide some
potential future-proofing).

Also add a convenient vtkm::ListTagApply that allows you to  easily
instantiate a template with the list of types in a ListTag.
2019-07-22 08:36:28 -06:00
Robert Maynard
3dda0ab2d6 Correct unused-parameter warnings from defaulted methods.
GCC 6 warns about defaulted methods when parameters have names.
2019-04-30 13:12:32 -04:00
nadavi
fbcea82e78 conslidate the license statement 2019-04-17 10:57:13 -06:00
Robert Maynard
6306ca66ce Merge topic 'refactor_cast_and_call_location'
72cb6343b Move vtkm::cont::CastAndCall into a header in vtkm/cont

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kenneth Moreland <kmorel@sandia.gov>
Merge-request: !1622
2019-04-04 10:05:22 -04:00
Robert Maynard
18f3b0dccc Document all the free functions for VariantArrayHandle 2019-04-03 18:10:31 -04:00
Robert Maynard
72cb6343b8 Move vtkm::cont::CastAndCall into a header in vtkm/cont
Since CastAndCall is meant to be a user callable function,
we should make sure it is part of the vtkm cont headers
2019-04-03 14:15:26 -04:00
Allison Vacanti
e1f5c4dd9b Modify VariantAH::AsVirtual to cast to new ValueType if needed.
E.g:

```
    ArrayHandle<Float64> doubleArray;
    VariantArrayHandle varHandle{doubleArray};
    ArrayHandleVirtual<Float32> = varHandle.AsVirtual<Float32>();
```

If there is a loss in range and/or precision, a warning is logged. If
the ValueTypes are Vecs with mismatched widths, an ErrorBadType is thrown.
Internally, an ArrayHandleCast is used between the VariantArrayHandle's
stored array and the ArrayHandleVirtual.
2019-03-25 11:39:45 -04:00
Allison Vacanti
d1db4ef8b3 Clarify intent of TypeString and TypeName functions.
TypeName is used for logging, and is now TypeToString.

TypeString is used for serialization, and is now SerializableTypeString.
2019-03-01 11:47:53 -05:00
Robert Maynard
ad98d818ce VTK-m now doesn't clobber external DIY installations
Fixes #334
2019-02-05 13:05:14 -05:00
Kenneth Moreland
d59ce11c00 Allow VariantArrayHandle CastAndCall to cast to concrete types
When you call VariantArrayHandle::CastAndCall, it now tries both basic
storage and virtual storage. You can modify the types of storages tried
by giving a type list of storage tags as the first argument.
2019-01-16 22:31:55 -06:00
Robert Maynard
3445047f9e Refactor vtkm::cont::ArrayHandleAny into vtkm::cont::ArrayHandleVirtual
ArrayHandleVirtual can automatically be constructed from any ArrayHandle.
In the cases where the input ArrayHandle doesn't derived from ArrayHandleVirtual,
it will automatically construct StorageAny to hold the array.
2018-12-27 15:42:03 -05:00
Robert Maynard
1f2abbc9c4 vtkm::cont::IsType and vtkm::cont::Cast support VariantArrayHandle 2018-12-27 14:35:56 -05:00
Robert Maynard
7b9fa975f2 Rename: IsVirtualType to IsValueType. 2018-12-27 14:35:56 -05:00
Robert Maynard
0a40c620ac Rename ArrayHandleVariant to VariantArrayHandle. 2018-12-27 14:35:56 -05:00