From b7c7000d0d7afbfa9dafaccb4c2b91734093bb52 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Fri, 22 Dec 2023 18:10:23 -0500 Subject: [PATCH] Don't need the numerical rounding tolerance in multigrid --- Grid/lattice/Lattice_transfer.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/Grid/lattice/Lattice_transfer.h b/Grid/lattice/Lattice_transfer.h index ff8b1ec2..27f4ff26 100644 --- a/Grid/lattice/Lattice_transfer.h +++ b/Grid/lattice/Lattice_transfer.h @@ -301,6 +301,37 @@ inline void blockProject(Lattice > &coarseData, // std::cout << GridLogPerformance << " blockProject : blockZaxpy : "< +inline void blockProjectFast(Lattice > &coarseData, + const Lattice &fineData, + const VLattice &Basis) +{ + GridBase * fine = fineData.Grid(); + GridBase * coarse= coarseData.Grid(); + + Lattice> ip(coarse); + Lattice fineDataRed = fineData; + + autoView( coarseData_ , coarseData, AcceleratorWrite); + autoView( ip_ , ip, AcceleratorWrite); + RealD t_IP=0; + RealD t_co=0; + for(int v=0;v + t_IP+=usecond(); + t_co-=usecond(); + accelerator_for( sc, coarse->oSites(), vobj::Nsimd(), { + convertType(coarseData_[sc](v),ip_[sc]); + }); + t_co+=usecond(); + } + // std::cout << GridLogPerformance << " blockProjectFast : blockInnerProduct : "<