Commit dfadaabf authored by Robert Maynard's avatar Robert Maynard
Browse files

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> ...@@ -47,7 +47,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayIn, ContObjectType, Device>
{ {
VTKM_IS_ARRAY_HANDLE(ContObjectType); VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst; using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInput(Device()));
template <typename InputDomainType> template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(const ContObjectType& object, VTKM_CONT ExecObjectType operator()(const ContObjectType& object,
......
...@@ -50,7 +50,7 @@ struct Transport<vtkm::cont::arg::TransportTagArrayInOut, ContObjectType, Device ...@@ -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. // is not an array handle as an argument that is expected to be one.
VTKM_IS_ARRAY_HANDLE(ContObjectType); VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::Portal; using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInPlace(Device()));
template <typename InputDomainType> template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(ContObjectType object, VTKM_CONT ExecObjectType operator()(ContObjectType object,
......
...@@ -49,7 +49,8 @@ struct Transport<vtkm::cont::arg::TransportTagArrayOut, ContObjectType, Device> ...@@ -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. // is not an array handle as an argument that is expected to be one.
VTKM_IS_ARRAY_HANDLE(ContObjectType); 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> template <typename InputDomainType>
VTKM_CONT ExecObjectType operator()(ContObjectType object, VTKM_CONT ExecObjectType operator()(ContObjectType object,
......
...@@ -50,10 +50,8 @@ struct Transport<vtkm::cont::arg::TransportTagCellSetIn<FromTopology, ToTopology ...@@ -50,10 +50,8 @@ struct Transport<vtkm::cont::arg::TransportTagCellSetIn<FromTopology, ToTopology
{ {
VTKM_IS_CELL_SET(ContObjectType); VTKM_IS_CELL_SET(ContObjectType);
using ExecObjectType = using ExecObjectType = decltype(
typename ContObjectType::template ExecutionTypes<Device, std::declval<ContObjectType>().PrepareForInput(Device(), FromTopology(), ToTopology()));
FromTopology,
ToTopology>::ExecObjectType;
template <typename InputDomainType> template <typename InputDomainType>
VTKM_CONT ExecObjectType VTKM_CONT ExecObjectType
......
...@@ -87,7 +87,8 @@ struct Transport<vtkm::cont::arg::TransportTagTopologyFieldIn<TopologyElementTag ...@@ -87,7 +87,8 @@ struct Transport<vtkm::cont::arg::TransportTagTopologyFieldIn<TopologyElementTag
{ {
VTKM_IS_ARRAY_HANDLE(ContObjectType); VTKM_IS_ARRAY_HANDLE(ContObjectType);
using ExecObjectType = typename ContObjectType::template ExecutionTypes<Device>::PortalConst;
using ExecObjectType = decltype(std::declval<ContObjectType>().PrepareForInput(Device()));
VTKM_CONT VTKM_CONT
ExecObjectType operator()(const ContObjectType& object, 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