mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-17 07:17:06 +01:00
Conjugate residual algorithm; some more unary functions
This commit is contained in:
@ -27,9 +27,9 @@ PARALLEL_FOR_LOOP
|
||||
return ret;
|
||||
};
|
||||
|
||||
template<class vobj> inline auto real(const Lattice<vobj> &z) -> Lattice<decltype(real(z._odata[0]))>
|
||||
template<class vobj> inline auto real(const Lattice<vobj> &z) -> Lattice<vobj>
|
||||
{
|
||||
Lattice<decltype(real(z._odata[0]))> ret(z._grid);
|
||||
Lattice<vobj> ret(z._grid);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<z._grid->oSites();ss++){
|
||||
ret._odata[ss] = real(z._odata[ss]);
|
||||
@ -37,9 +37,9 @@ PARALLEL_FOR_LOOP
|
||||
return ret;
|
||||
}
|
||||
|
||||
template<class vobj> inline auto imag(const Lattice<vobj> &z) -> Lattice<decltype(imag(z._odata[0]))>
|
||||
template<class vobj> inline auto imag(const Lattice<vobj> &z) -> Lattice<vobj>
|
||||
{
|
||||
Lattice<decltype(imag(z._odata[0]))> ret(z._grid);
|
||||
Lattice<vobj> ret(z._grid);
|
||||
PARALLEL_FOR_LOOP
|
||||
for(int ss=0;ss<z._grid->oSites();ss++){
|
||||
ret._odata[ss] = imag(z._odata[ss]);
|
||||
|
Reference in New Issue
Block a user