mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-12 16:55:37 +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){
|
template<class sobj> inline Lattice<vobj> & operator = (const sobj & r){
|
||||||
auto me = View(CpuWrite);
|
vobj vtmp;
|
||||||
thread_for(ss,me.size(),{
|
vtmp = r;
|
||||||
me[ss]= r;
|
auto me = View(AcceleratorWrite);
|
||||||
|
accelerator_for(ss,me.size(),vobj::Nsimd(),{
|
||||||
|
auto stmp=coalescedRead(vtmp);
|
||||||
|
coalescedWrite(me[ss],stmp);
|
||||||
});
|
});
|
||||||
me.ViewClose();
|
me.ViewClose();
|
||||||
return *this;
|
return *this;
|
||||||
|
Loading…
Reference in New Issue
Block a user