1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-06-12 20:27:06 +01:00

Added support for Ta to Lattice types

This commit is contained in:
neo
2015-06-04 18:29:55 +09:00
parent b9edadc53e
commit 7fc54fc904
3 changed files with 29 additions and 12 deletions

View File

@ -48,5 +48,16 @@ PARALLEL_FOR_LOOP
}
template<class vobj> inline auto Ta(const Lattice<vobj> &z) -> Lattice<decltype(Ta(z._odata[0]))>
{
Lattice<decltype(Ta(z._odata[0]))> ret(z._grid);
PARALLEL_FOR_LOOP
for(int ss=0;ss<z._grid->oSites();ss++){
ret._odata[ss] = Ta(z._odata[ss]);
}
return ret;
}
}
#endif