mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
Fix construction issue for XGC arrays in topology map fetch
The `Fetch::Load` for an input array of a topology map for an XGC array (that uses `ConnectivityExtrude`) was failing to compile because it creates a return `Vec` and then fills it. That does not work if the input array has values that cannot be default constructed. This is the case for `ArrayHandleRecombineVec`, which creates values that lazily pull data out of portals. Change the code to careful construct the return `Vec` such that it does not require the default constructor of the components.
This commit is contained in:
parent
634847ce20
commit
d26d76deaf
@ -227,15 +227,13 @@ struct Fetch<vtkm::exec::arg::FetchTagArrayTopologyMapIn,
|
|||||||
const vtkm::Id offset2 = (xgcidx.Planes[1] * xgcidx.NumberOfPointsPerPlane);
|
const vtkm::Id offset2 = (xgcidx.Planes[1] * xgcidx.NumberOfPointsPerPlane);
|
||||||
|
|
||||||
using ValueType = vtkm::Vec<typename ExecObjectType::ValueType, 6>;
|
using ValueType = vtkm::Vec<typename ExecObjectType::ValueType, 6>;
|
||||||
ValueType result;
|
|
||||||
|
|
||||||
result[0] = portal.Get(offset1 + xgcidx.PointIds[0][0]);
|
return ValueType(portal.Get(offset1 + xgcidx.PointIds[0][0]),
|
||||||
result[1] = portal.Get(offset1 + xgcidx.PointIds[0][1]);
|
portal.Get(offset1 + xgcidx.PointIds[0][1]),
|
||||||
result[2] = portal.Get(offset1 + xgcidx.PointIds[0][2]);
|
portal.Get(offset1 + xgcidx.PointIds[0][2]),
|
||||||
result[3] = portal.Get(offset2 + xgcidx.PointIds[1][0]);
|
portal.Get(offset2 + xgcidx.PointIds[1][0]),
|
||||||
result[4] = portal.Get(offset2 + xgcidx.PointIds[1][1]);
|
portal.Get(offset2 + xgcidx.PointIds[1][1]),
|
||||||
result[5] = portal.Get(offset2 + xgcidx.PointIds[1][2]);
|
portal.Get(offset2 + xgcidx.PointIds[1][2]));
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user