diff --git a/lib/lattice/Lattice_local.h b/lib/lattice/Lattice_local.h index 97e118f0..95b0dd2c 100644 --- a/lib/lattice/Lattice_local.h +++ b/lib/lattice/Lattice_local.h @@ -43,9 +43,9 @@ template inline auto localNorm2 (const Lattice &rhs)-> Lattice { Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ + accelerator_loop(ss,rhs,{ ret._odata[ss]=innerProduct(rhs._odata[ss],rhs._odata[ss]); - } + }); return ret; } @@ -54,9 +54,9 @@ template inline auto localInnerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice { Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ + accelerator_loop(ss,rhs,{ ret._odata[ss]=innerProduct(lhs._odata[ss],rhs._odata[ss]); - } + }); return ret; } @@ -66,9 +66,9 @@ template inline auto outerProduct (const Lattice &lhs,const Lattice &rhs) -> Lattice { Lattice ret(rhs._grid); - parallel_for(int ss=0;ssoSites(); ss++){ + accelerator_loop(ss,rhs,{ ret._odata[ss]=outerProduct(lhs._odata[ss],rhs._odata[ss]); - } + }); return ret; } NAMESPACE_END(Grid);