mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-04 19:25:56 +01:00
Accelerator loosp
This commit is contained in:
parent
d70709a8e8
commit
e9c8ba5ef7
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user