VTK-m Transport doesn't rely on 'ExecutionTypes' typedefs.

By using decltype we can allow for more flexible types and
remove the nasty '::template ' syntax.
This commit is contained in:
Robert Maynard 2018-06-19 12:40:39 -04:00
parent 0544ee6b71
commit dfadaabfb7
5 changed files with 8 additions and 8 deletions

@ -47,7 +47,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayIn, ContObjectType, Device>
{
VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst;
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInput(Device()));
template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(const ContObjectType& object,

@ -50,7 +50,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayInOut, ContObjectType, Device
// is not an array handle as an argument that is expected to be one.
VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::Portal;
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInPlace(Device()));
template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(ContObjectType object,

@ -49,7 +49,8 @@ struct Transport<vtkm::cont::arg::TransportTagArrayOut, ContObjectType, Device>
// is not an array handle as an argument that is expected to be one.
VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::Portal;
using ExecObjectType =
decltype(std::declval<ContObjectType>().PrepareForOutput(vtkm::Id{}, Device()));
template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(ContObjectType object,

@ -50,10 +50,8 @@ struct Transport<vtkm::cont::arg::TransportTagCellSetIn<FromTopology, ToTopology
{
VTKM_IS_CELL_SET(ContObjectType);
using ExecObjectType =
typename ContObjectType::template ExecutionTypes<Device,
FromTopology,
ToTopology>::ExecObjectType;
using ExecObjectType = decltype(
std::declval<ContObjectType>().PrepareForInput(Device(), FromTopology(), ToTopology()));
template <typename InputDomainType>
VTKM_CONT ExecObjectType

@ -87,7 +87,8 @@ struct Transport<vtkm::cont::arg::TransportTagTopologyFieldIn<TopologyElementTag
{
VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst;
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInput(Device()));
VTKM_CONT
ExecObjectType operator()(const ContObjectType& object,