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