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:
parent
13713b2a76
commit
57552d8ca3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user