From a3e935c9028a77938603168aa0edd6b24f05d607 Mon Sep 17 00:00:00 2001 From: Raoul Hodgson Date: Mon, 27 Feb 2023 11:38:16 +0000 Subject: [PATCH] Batched block project/promote size checks --- Grid/lattice/Lattice_transfer.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Grid/lattice/Lattice_transfer.h b/Grid/lattice/Lattice_transfer.h index 556785c0..4d1292a4 100644 --- a/Grid/lattice/Lattice_transfer.h +++ b/Grid/lattice/Lattice_transfer.h @@ -294,6 +294,8 @@ inline void batchBlockProject(std::vector>> &co const VLattice &Basis) { int NBatch = fineData.size(); + assert(coarseData.size() == NBatch); + GridBase * fine = fineData[0].Grid(); GridBase * coarse= coarseData[0].Grid(); @@ -622,7 +624,9 @@ inline void batchBlockPromote(const std::vector std::vector> &fineData, const VLattice &Basis) { - int NBatch = fineData.size(); + int NBatch = coarseData.size(); + assert(fineData.size() == NBatch); + GridBase * fine = fineData[0].Grid(); GridBase * coarse = coarseData[0].Grid(); for (int k=0; k