Commit e99aa10e authored by Robert Maynard's avatar Robert Maynard Committed by Kitware Robot
Browse files

Merge topic 'leverage_decltype_more_often'

dfadaabf

 VTK-m Transport doesn't rely on 'ExecutionTypes' typedefs.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Sujin Philip's avatarSujin Philip <sujin.philip@kitware.com>
Merge-request: !1272
parents c9762661 dfadaabf
...@@ -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