mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
consistent pointer offloading instead of views
This commit is contained in:
parent
e2abbf9520
commit
dd091d0960
@ -225,7 +225,7 @@ void axpy(Lattice<vobj> &ret,sobj a,const Lattice<vobj> &x,const Lattice<vobj> &
|
|||||||
autoView( x_v , x, AcceleratorRead);
|
autoView( x_v , x, AcceleratorRead);
|
||||||
autoView( y_v , y, AcceleratorRead);
|
autoView( y_v , y, AcceleratorRead);
|
||||||
accelerator_for(ss,x_v.size(),vobj::Nsimd(),{
|
accelerator_for(ss,x_v.size(),vobj::Nsimd(),{
|
||||||
auto tmp = a*x_v(ss)+y_v(ss);
|
auto tmp = a*coalescedRead(x_v[ss])+coalescedRead(y_v[ss]);
|
||||||
coalescedWrite(ret_v[ss],tmp);
|
coalescedWrite(ret_v[ss],tmp);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -125,7 +125,7 @@ void basisRotate(VField &basis,Matrix& Qt,int j0, int j1, int k0,int k1,int Nm)
|
|||||||
|
|
||||||
for(int k=k0; k<k1; ++k){
|
for(int k=k0; k<k1; ++k){
|
||||||
auto tmp = coalescedRead(Bp[ss*nrot+j]);
|
auto tmp = coalescedRead(Bp[ss*nrot+j]);
|
||||||
coalescedWrite(Bp[ss*nrot+j],tmp+ Qt_p[jj*Nm+k] * coalescedRead(basis_v[k][sss]));
|
coalescedWrite(Bp[ss*nrot+j],tmp+ Qt_p[jj*Nm+k] * coalescedRead(basis_vp[k][sss]));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -134,7 +134,7 @@ void basisRotate(VField &basis,Matrix& Qt,int j0, int j1, int k0,int k1,int Nm)
|
|||||||
int jj =j0+j;
|
int jj =j0+j;
|
||||||
int ss =sj/nrot;
|
int ss =sj/nrot;
|
||||||
int sss=ss+s;
|
int sss=ss+s;
|
||||||
coalescedWrite(basis_v[jj][sss],coalescedRead(Bp[ss*nrot+j]));
|
coalescedWrite(basis_vp[jj][sss],coalescedRead(Bp[ss*nrot+j]));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user