mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-25 11:12:02 +01:00
Merge branch 'feature/dirichlet' of https://github.com/paboyle/Grid into feature/dirichlet
This commit is contained in:
@ -91,7 +91,6 @@ inline typename vobj::scalar_objectD sumD_cpu(const vobj *arg, Integer osites)
|
||||
for(int i=0;i<nthread;i++){
|
||||
ssum = ssum+sumarray[i];
|
||||
}
|
||||
|
||||
return ssum;
|
||||
}
|
||||
/*
|
||||
|
@ -1083,20 +1083,18 @@ vectorizeFromRevLexOrdArray( std::vector<sobj> &in, Lattice<vobj> &out)
|
||||
template<class VobjOut, class VobjIn>
|
||||
void precisionChangeFast(Lattice<VobjOut> &out, const Lattice<VobjIn> &in)
|
||||
{
|
||||
typedef typename VobjOut::scalar_object SobjOut;
|
||||
typedef typename VobjIn::scalar_object SobjIn;
|
||||
typedef typename VobjOut::vector_type Vout;
|
||||
typedef typename VobjIn::vector_type Vin;
|
||||
const int N = sizeof(VobjOut)/sizeof(Vout);
|
||||
conformable(out.Grid(),in.Grid());
|
||||
out.Checkerboard() = in.Checkerboard();
|
||||
int nsimd = out.Grid()->Nsimd();
|
||||
autoView( out_v , out, AcceleratorWrite);
|
||||
autoView( in_v , in, AcceleratorRead);
|
||||
accelerator_for(idx,out.Grid()->oSites(),nsimd,{
|
||||
auto itmp = coalescedRead(in_v[idx]);
|
||||
auto otmp = coalescedRead(out_v[idx]);
|
||||
#ifdef GRID_SIMT
|
||||
otmp=itmp;
|
||||
#endif
|
||||
coalescedWrite(out_v[idx],otmp);
|
||||
accelerator_for(idx,out.Grid()->oSites(),1,{
|
||||
Vout *vout = (Vout *)&out_v[idx];
|
||||
Vin *vin = (Vin *)&in_v[idx];
|
||||
precisionChange(vout,vin,N);
|
||||
});
|
||||
}
|
||||
//Convert a Lattice from one precision to another
|
||||
@ -1116,7 +1114,7 @@ void precisionChange(Lattice<VobjOut> &out, const Lattice<VobjIn> &in)
|
||||
|
||||
int ndim = out.Grid()->Nd();
|
||||
int out_nsimd = out_grid->Nsimd();
|
||||
|
||||
int in_nsimd = in_grid->Nsimd();
|
||||
std::vector<Coordinate > out_icoor(out_nsimd);
|
||||
|
||||
for(int lane=0; lane < out_nsimd; lane++){
|
||||
|
Reference in New Issue
Block a user