1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-09 23:45:36 +00:00

Back out zero change

This commit is contained in:
Peter Boyle 2024-05-21 01:14:08 +01:00
parent 890c5ea1cd
commit cfe1b13225

View File

@ -236,11 +236,18 @@ public:
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){ template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
vobj vtmp; vobj vtmp;
vtmp = r; vtmp = r;
#if 1
auto me = View(CpuWrite);
thread_for(ss,me.size(),{
me[ss]= r;
});
#else
auto me = View(AcceleratorWrite); auto me = View(AcceleratorWrite);
accelerator_for(ss,me.size(),vobj::Nsimd(),{ accelerator_for(ss,me.size(),vobj::Nsimd(),{
auto stmp=coalescedRead(vtmp); auto stmp=coalescedRead(vtmp);
coalescedWrite(me[ss],stmp); coalescedWrite(me[ss],stmp);
}); });
#endif
me.ViewClose(); me.ViewClose();
return *this; return *this;
} }