From 15e668eef140b22bda76446de30fc913cae502b6 Mon Sep 17 00:00:00 2001 From: Francesco Sanfilippo Date: Mon, 20 Feb 2017 22:49:06 +0100 Subject: [PATCH] now it is possible to pass {coords list} to a peek or poke --- lib/cartesian/Cartesian_base.h | 2 +- lib/cartesian/Cartesian_full.h | 2 +- lib/cartesian/Cartesian_red_black.h | 2 +- lib/lattice/Lattice_peekpoke.h | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/cartesian/Cartesian_base.h b/lib/cartesian/Cartesian_base.h index 72b21ee3..bd5fd11c 100644 --- a/lib/cartesian/Cartesian_base.h +++ b/lib/cartesian/Cartesian_base.h @@ -77,7 +77,7 @@ public: // GridCartesian / GridRedBlackCartesian //////////////////////////////////////////////////////////////// virtual int CheckerBoarded(int dim)=0; - virtual int CheckerBoard(std::vector &site)=0; + virtual int CheckerBoard(const std::vector &site)=0; virtual int CheckerBoardDestination(int source_cb,int shift,int dim)=0; virtual int CheckerBoardShift(int source_cb,int dim,int shift,int osite)=0; virtual int CheckerBoardShiftForCB(int source_cb,int dim,int shift,int cb)=0; diff --git a/lib/cartesian/Cartesian_full.h b/lib/cartesian/Cartesian_full.h index b0d20441..7e29d311 100644 --- a/lib/cartesian/Cartesian_full.h +++ b/lib/cartesian/Cartesian_full.h @@ -49,7 +49,7 @@ public: virtual int CheckerBoarded(int dim){ return 0; } - virtual int CheckerBoard(std::vector &site){ + virtual int CheckerBoard(const std::vector &site){ return 0; } virtual int CheckerBoardDestination(int cb,int shift,int dim){ diff --git a/lib/cartesian/Cartesian_red_black.h b/lib/cartesian/Cartesian_red_black.h index 6a4300d7..2f132c19 100644 --- a/lib/cartesian/Cartesian_red_black.h +++ b/lib/cartesian/Cartesian_red_black.h @@ -49,7 +49,7 @@ public: if( dim==_checker_dim) return 1; else return 0; } - virtual int CheckerBoard(std::vector &site){ + virtual int CheckerBoard(const std::vector &site){ int linear=0; assert(site.size()==_ndimension); for(int d=0;d<_ndimension;d++){ diff --git a/lib/lattice/Lattice_peekpoke.h b/lib/lattice/Lattice_peekpoke.h index 19d349c4..b3e53a27 100644 --- a/lib/lattice/Lattice_peekpoke.h +++ b/lib/lattice/Lattice_peekpoke.h @@ -86,7 +86,7 @@ PARALLEL_FOR_LOOP // Poke a scalar object into the SIMD array ////////////////////////////////////////////////////// template - void pokeSite(const sobj &s,Lattice &l,std::vector &site){ + void pokeSite(const sobj &s,Lattice &l,const std::vector &site){ GridBase *grid=l._grid; @@ -120,7 +120,7 @@ PARALLEL_FOR_LOOP // Peek a scalar object from the SIMD array ////////////////////////////////////////////////////////// template - void peekSite(sobj &s,const Lattice &l,std::vector &site){ + void peekSite(sobj &s,const Lattice &l,const std::vector &site){ GridBase *grid=l._grid;