1
0
mirror of https://github.com/paboyle/Grid.git synced 2025-04-11 22:50:45 +01:00

Better init

This commit is contained in:
paboyle 2017-03-28 13:25:05 -04:00
parent e55a751e23
commit d805867e02

View File

@ -54,22 +54,22 @@ ImprovedStaggeredFermion5D<Impl>::ImprovedStaggeredFermion5D(GaugeField &_Uthin,
_FiveDimRedBlackGrid(&FiveDimRedBlackGrid), _FiveDimRedBlackGrid(&FiveDimRedBlackGrid),
_FourDimGrid (&FourDimGrid), _FourDimGrid (&FourDimGrid),
_FourDimRedBlackGrid(&FourDimRedBlackGrid), _FourDimRedBlackGrid(&FourDimRedBlackGrid),
Stencil (_FiveDimGrid,npoint,Even,directions,displacements), Stencil (&FiveDimGrid,npoint,Even,directions,displacements),
StencilEven(_FiveDimRedBlackGrid,npoint,Even,directions,displacements), // source is Even StencilEven(&FiveDimRedBlackGrid,npoint,Even,directions,displacements), // source is Even
StencilOdd (_FiveDimRedBlackGrid,npoint,Odd ,directions,displacements), // source is Odd StencilOdd (&FiveDimRedBlackGrid,npoint,Odd ,directions,displacements), // source is Odd
mass(_mass), mass(_mass),
c1(_c1), c1(_c1),
c2(_c2), c2(_c2),
u0(_u0), u0(_u0),
Umu(_FourDimGrid), Umu(&FourDimGrid),
UmuEven(_FourDimRedBlackGrid), UmuEven(&FourDimRedBlackGrid),
UmuOdd (_FourDimRedBlackGrid), UmuOdd (&FourDimRedBlackGrid),
UUUmu(_FourDimGrid), UUUmu(&FourDimGrid),
UUUmuEven(_FourDimRedBlackGrid), UUUmuEven(&FourDimRedBlackGrid),
UUUmuOdd(_FourDimRedBlackGrid), UUUmuOdd(&FourDimRedBlackGrid),
_tmp(&FiveDimRedBlackGrid), Lebesgue(&FourDimGrid),
Lebesgue(_FourDimGrid), LebesgueEvenOdd(&FourDimRedBlackGrid),
LebesgueEvenOdd(_FourDimRedBlackGrid) _tmp(&FiveDimRedBlackGrid)
{ {
// some assertions // some assertions
@ -173,8 +173,7 @@ void ImprovedStaggeredFermion5D<Impl>::DhopDir(const FermionField &in, FermionFi
Compressor compressor; Compressor compressor;
Stencil.HaloExchange(in,compressor); Stencil.HaloExchange(in,compressor);
PARALLEL_FOR_LOOP parallel_for(int ss=0;ss<Umu._grid->oSites();ss++){
for(int ss=0;ss<Umu._grid->oSites();ss++){
for(int s=0;s<Ls;s++){ for(int s=0;s<Ls;s++){
int sU=ss; int sU=ss;
int sF = s+Ls*sU; int sF = s+Ls*sU;
@ -235,14 +234,12 @@ void ImprovedStaggeredFermion5D<Impl>::DhopInternal(StencilImpl & st, LebesgueOr
// Dhop takes the 4d grid from U, and makes a 5d index for fermion // Dhop takes the 4d grid from U, and makes a 5d index for fermion
if (dag == DaggerYes) { if (dag == DaggerYes) {
PARALLEL_FOR_LOOP parallel_for (int ss = 0; ss < U._grid->oSites(); ss++) {
for (int ss = 0; ss < U._grid->oSites(); ss++) {
int sU=ss; int sU=ss;
Kernels::DhopSiteDag(st, lo, U, UUU, st.CommBuf(), LLs, sU,in, out); Kernels::DhopSiteDag(st, lo, U, UUU, st.CommBuf(), LLs, sU,in, out);
} }
} else { } else {
PARALLEL_FOR_LOOP parallel_for (int ss = 0; ss < U._grid->oSites(); ss++) {
for (int ss = 0; ss < U._grid->oSites(); ss++) {
int sU=ss; int sU=ss;
Kernels::DhopSite(st,lo,U,UUU,st.CommBuf(),LLs,sU,in,out); Kernels::DhopSite(st,lo,U,UUU,st.CommBuf(),LLs,sU,in,out);
} }