From c273fb051cdb7c739f4eba1ad6a15e203f1fcab0 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Tue, 1 Sep 2020 15:27:59 -0400 Subject: [PATCH] Peek poke laattice --- Grid/lattice/Lattice_peekpoke.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Grid/lattice/Lattice_peekpoke.h b/Grid/lattice/Lattice_peekpoke.h index c79becf2..5caab214 100644 --- a/Grid/lattice/Lattice_peekpoke.h +++ b/Grid/lattice/Lattice_peekpoke.h @@ -182,6 +182,14 @@ inline void peekLocalSite(sobj &s,const LatticeView &l,Coordinate &site) return; }; +template +inline void peekLocalSite(sobj &s,const Lattice &l,Coordinate &site) +{ + autoView(lv,l,CpuRead); + peekLocalSite(s,lv,site); + return; +}; + // Must be CPU write view template inline void pokeLocalSite(const sobj &s,LatticeView &l,Coordinate &site) @@ -210,6 +218,14 @@ inline void pokeLocalSite(const sobj &s,LatticeView &l,Coordinate &site) return; }; +template +inline void pokeLocalSite(const sobj &s, Lattice &l,Coordinate &site) +{ + autoView(lv,l,CpuWrite); + pokeLocalSite(s,lv,site); + return; +}; + NAMESPACE_END(Grid); #endif