mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 07:55:35 +00:00
Faster exponentiation for lattice fields
This commit is contained in:
parent
cd73897b8d
commit
10f2872aae
@ -66,10 +66,21 @@ namespace Grid {
|
||||
Lattice<obj> ret(rhs._grid);
|
||||
ret.checkerboard = rhs.checkerboard;
|
||||
conformable(ret,rhs);
|
||||
obj unit(1.0);
|
||||
parallel_for(int ss=0;ss<rhs._grid->oSites();ss++){
|
||||
ret._odata[ss]=Exponentiate(rhs._odata[ss],alpha, Nexp);
|
||||
//ret._odata[ss]=Exponentiate(rhs._odata[ss],alpha, Nexp);
|
||||
ret._odata[ss] = unit;
|
||||
for(int i=Nexp; i>=1;--i)
|
||||
ret._odata[ss] = unit + ret._odata[ss]*rhs._odata[ss]*(alpha/RealD(i));
|
||||
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user