1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-04 19:25:56 +01:00

Accelerator loosp

This commit is contained in:
paboyle 2018-01-24 13:39:54 +00:00
parent d70709a8e8
commit e9c8ba5ef7

View File

@ -42,9 +42,9 @@ inline auto trace(const Lattice<vobj> &lhs)
-> Lattice<decltype(trace(lhs._odata[0]))>
{
Lattice<decltype(trace(lhs._odata[0]))> ret(lhs._grid);
parallel_for(int ss=0;ss<lhs._grid->oSites();ss++){
accelerator_loop( ss, lhs, {
ret._odata[ss] = trace(lhs._odata[ss]);
}
});
return ret;
};
@ -55,9 +55,9 @@ template<int Index,class vobj>
inline auto TraceIndex(const Lattice<vobj> &lhs) -> Lattice<decltype(traceIndex<Index>(lhs._odata[0]))>
{
Lattice<decltype(traceIndex<Index>(lhs._odata[0]))> ret(lhs._grid);
parallel_for(int ss=0;ss<lhs._grid->oSites();ss++){
accelerator_loop( ss, lhs, {
ret._odata[ss] = traceIndex<Index>(lhs._odata[ss]);
}
});
return ret;
};