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

Assign from non-lattice made accelerator resident

This commit is contained in:
Peter Boyle 2024-04-05 01:05:12 -04:00
parent 13713b2a76
commit 57552d8ca3

View File

@ -234,9 +234,12 @@ public:
}
template<class sobj> inline Lattice<vobj> & 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;