diff --git a/lib/lattice/Lattice_trace.h b/lib/lattice/Lattice_trace.h index f97c8d97..f0951cd4 100644 --- a/lib/lattice/Lattice_trace.h +++ b/lib/lattice/Lattice_trace.h @@ -42,9 +42,9 @@ inline auto trace(const Lattice &lhs) -> Lattice { Lattice ret(lhs._grid); - parallel_for(int ss=0;ssoSites();ss++){ + accelerator_loop( ss, lhs, { ret._odata[ss] = trace(lhs._odata[ss]); - } + }); return ret; }; @@ -55,9 +55,9 @@ template inline auto TraceIndex(const Lattice &lhs) -> Lattice(lhs._odata[0]))> { Lattice(lhs._odata[0]))> ret(lhs._grid); - parallel_for(int ss=0;ssoSites();ss++){ + accelerator_loop( ss, lhs, { ret._odata[ss] = traceIndex(lhs._odata[ss]); - } + }); return ret; };