From d26d76deaf17af5b3ec223ab28cf219b2e5e8bd3 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Fri, 3 Feb 2023 07:05:58 -0500 Subject: [PATCH] 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. --- vtkm/exec/arg/FetchTagArrayTopologyMapIn.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h index 9f12a9256..e272289de 100644 --- a/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h +++ b/vtkm/exec/arg/FetchTagArrayTopologyMapIn.h @@ -227,15 +227,13 @@ struct Fetch; - ValueType result; - result[0] = portal.Get(offset1 + xgcidx.PointIds[0][0]); - result[1] = portal.Get(offset1 + xgcidx.PointIds[0][1]); - result[2] = portal.Get(offset1 + xgcidx.PointIds[0][2]); - result[3] = portal.Get(offset2 + xgcidx.PointIds[1][0]); - result[4] = portal.Get(offset2 + xgcidx.PointIds[1][1]); - result[5] = portal.Get(offset2 + xgcidx.PointIds[1][2]); - return result; + return ValueType(portal.Get(offset1 + xgcidx.PointIds[0][0]), + portal.Get(offset1 + xgcidx.PointIds[0][1]), + portal.Get(offset1 + xgcidx.PointIds[0][2]), + portal.Get(offset2 + xgcidx.PointIds[1][0]), + portal.Get(offset2 + xgcidx.PointIds[1][1]), + portal.Get(offset2 + xgcidx.PointIds[1][2])); }