diff --git a/Grid/lattice/Lattice_base.h b/Grid/lattice/Lattice_base.h index c293a3e1..1aefd9c1 100644 --- a/Grid/lattice/Lattice_base.h +++ b/Grid/lattice/Lattice_base.h @@ -234,9 +234,12 @@ public: } template inline Lattice & operator = (const sobj & r){ - auto me = View(CpuWrite); - thread_for(ss,me.size(),{ - me[ss]= r; + vobj vtmp; + vtmp = r; + auto me = View(AcceleratorWrite); + accelerator_for(ss,me.size(),vobj::Nsimd(),{ + auto stmp=coalescedRead(vtmp); + coalescedWrite(me[ss],stmp); }); me.ViewClose(); return *this;