mirror of
https://github.com/paboyle/Grid.git
synced 2026-10-08 00:38:06 +01:00
Assign from non-lattice made accelerator resident
This commit is contained in:
1 parent
13713b2a76
commit
57552d8ca3
1 file changed
+6
-3
@@ -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;
|
||||||
|
|||||||
Reference in new issue
Block a user