Commit dfadaabf authored by Robert Maynard's avatar Robert Maynard

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.
parent 0544ee6b
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment