Commit Graph

8 Commits

Author SHA1 Message Date
Kenneth Moreland
6307686008 Suppress CUDA warnings
There was a warning comes from the functors in support of the portals
for ArrayHandleMultiplexer. The template has no good way to determine
whether the object it is calling is for control or execution, so it
supports both. It is not useful to warn when it happens to compile only
for the host.
2019-09-09 18:33:38 -06:00
Kenneth Moreland
3039a18baf Add ability to get an array from a Field for a particular type
This is done through a new version of ApplyPolicy. This version takes
a type of the array as its first template argument, which must be
specified.

This requires having a list of potential storage to try. It will use
that to construct an ArrayHandleMultiplexer containing all potential
types. This list of storages comes from the policy. A StorageList
item was added to the policy.

Types are automatically converted. So if you ask for a vtkm::Float64 and
field contains a vtkm::Float32, it will the array wrapped in an
ArrayHandleCast to give the expected type.
2019-09-09 08:19:15 -06:00
Kenneth Moreland
2b6e6da6ca Add ability to get VariantArrayHandle as an ArrayHandleMultiplexer 2019-09-09 08:19:15 -06:00
Kenneth Moreland
eaf87e4519 Remove special ArrayHandleMultiplexer template case
There was a special case for ArrayHandleMultiplexer where if you gave it
just one type it would treat that as a value type rather than an array
to support and instead provide a default list of types. However, GCC 4.8
is having trouble compiling the code to create the default list, the
semantics are confusing, and the more I think about it the less likely I
think we will need this functionality. So, just getting rid of that.
2019-07-30 14:48:35 -06:00
Kenneth Moreland
d80a8125cc Sprinkle noexcept goodness on Variant and ArrayPortalMultiplexer
Allow Variant copy constructor/operators and its CastAndCall to operate
in noexcept methods. This can help the compiler make optimizations.
2019-07-25 15:25:29 -06:00
Kenneth Moreland
0aa15c97ce Fix 'Failed to specialize alias template' error from Visual Studio
The code was working fine on all the dashboards except for the Visual
Studio 2015 compiles on delve. It gave an error like:

ArrayHandleMultiplexer.h(398): error C2938: 'ArrayHandleToStorageTag<unknown-type>' : Failed to specialize alias template

A StackOverflow article (https://stackoverflow.com/questions/43411542/
metaprogramming-failed-to-specialize-alias-template) suggests that this
is a bug in older versions of Visual Studio. Although fixed in more
recent versions, we might have to support older versions.
2019-07-22 08:36:28 -06:00
Kenneth Moreland
7b72e31dfb Fixes for CUDA 2019-07-22 08:36:28 -06:00
Kenneth Moreland
5e23853521 Create ArrayHandleMultiplexer 2019-07-22 08:36:28 -06:00