diff --git a/lib/qcd/action/fermion/FermionOperatorImpl.h b/lib/qcd/action/fermion/FermionOperatorImpl.h index 5300063b..ffb82989 100644 --- a/lib/qcd/action/fermion/FermionOperatorImpl.h +++ b/lib/qcd/action/fermion/FermionOperatorImpl.h @@ -478,10 +478,7 @@ class GparityWilsonImpl : public ConjugateGaugeImpl > tmp_full; - std::vector > tmp_half; - - GparityWilsonImpl(const ImplParams &p = ImplParams()) : Params(p), tmp_full(GridThread::GetThreads()), tmp_half(GridThread::GetThreads()){}; + GparityWilsonImpl(const ImplParams &p = ImplParams()) : Params(p){}; bool overlapCommsCompute(void) { return Params.overlapCommsCompute; }; @@ -563,86 +560,6 @@ class GparityWilsonImpl : public ConjugateGaugeImpl - void GparityTwistPermute(SiteSpinorType &into, const SiteSpinorType &from, const int direction, const int distance, const int perm, GridBase* grid){ -#if 0 - typedef typename SiteSpinorType::scalar_object sobj; - sobj stmp; - std::vector vals(grid->Nsimd()); - extract(from,vals); - std::vector icoor; - for(int s=0;sNsimd();s++){ - grid->iCoorFromIindex(icoor,s); - assert((icoor[direction]==0)||(icoor[direction]==1)); - - int permute_lane; - if ( distance == 1) { - permute_lane = icoor[direction]?1:0; - } else { - permute_lane = icoor[direction]?0:1; - } - if(perm) permute_lane = !permute_lane; - - if ( permute_lane ) { - stmp(0) = vals[s](1); - stmp(1) = vals[s](0); - vals[s] = stmp; - } - } - merge(into,vals); -#else - int permute_type = grid->PermuteType(direction); - typedef typename SiteSpinorType::vector_type vtype; - vtype tmp1, tmp2, tmp3, tmp4; - - for(int s=0;s 1h 1l - exchange(tmp2,tmp3, from(0)(s)(c), tmp1, permute_type); // 0l 0h , 1h 1l -> 0l 1h 0h,1l - permute(tmp4, tmp3, permute_type); //0h,1l -> 1l,0h - - if( (distance == 1 && !perm) || (distance == -1 && perm) ){ - //Pulled fermion through forwards face, GPBC on upper component - //Need 0= 0l 1h 1= 1l 0h - into(0)(s)(c) = tmp2; - into(1)(s)(c) = tmp4; - }else if( (distance == -1 && !perm) || (distance == 1 && perm) ){ - //Pulled fermion through backwards face, GPBC on lower component - //Need 0= 1l 0h 1= 0l 1h - into(0)(s)(c) = tmp4; - into(1)(s)(c) = tmp2; - }else assert(0); - } - } -#endif - } - - - template - const SiteSpinorType & GparityGetChi(int &g, SiteSpinorType const* in, const int dir, const int f, StencilEntry *SE, StencilImpl &st){ - const int mmu = dir % 4; - const int direction = st._directions[dir]; - const int sl = st._grid->_simd_layout[direction]; - const int perm = SE->_permute; - g = f; - - if(SE->_around_the_world && Params.twists[mmu]){ - if(sl == 1){ //not SIMD vectorized in G-parity direction so just change the flavor index accessed to implement the twist - g = (f+1) % 2; - return in[SE->_offset]; - }else{ //SIMD vectorized in Gparity direction - const int me = omp_get_thread_num(); - const int distance = st._distances[dir]; - assert(distance == -1 || distance == 1); - SiteSpinorType &tmp = GparityWilsonImpl_helper::getAB::ref(tmp_full[me], tmp_half[me]); - GparityTwistPermute(tmp, in[SE->_offset], direction, distance, perm, st._grid); - return tmp; - } - }else return in[SE->_offset]; - } - - - inline void DoubleStore(GridBase *GaugeGrid,DoubledGaugeField &Uds,const GaugeField &Umu) { conformable(Uds._grid,GaugeGrid); diff --git a/lib/qcd/action/fermion/WilsonKernelsHand.cc b/lib/qcd/action/fermion/WilsonKernelsHand.cc index ea04845e..e1243304 100644 --- a/lib/qcd/action/fermion/WilsonKernelsHand.cc +++ b/lib/qcd/action/fermion/WilsonKernelsHand.cc @@ -59,14 +59,6 @@ Author: paboyle {const SiteHalfSpinor &ref(buf[offset]); LOAD_CHI_BODY(F); } -//G-parity implementations using implementation method -#define LOAD_CHIMU_GPARITY_IMPL(DIR,F) \ - { int g; const SiteSpinor & ref = GparityGetChi(g,in._odata.data(),DIR,F,SE,st); LOAD_CHIMU_BODY(g); } - -#define LOAD_CHI_GPARITY_IMPL(DIR,F) \ - { int g; const SiteHalfSpinor &ref = GparityGetChi(g,buf,DIR,F,SE,st); LOAD_CHI_BODY(g); } - - //G-parity implementations using in-place intrinsic ops //1l 1h -> 1h 1l @@ -156,13 +148,7 @@ Author: paboyle } - - - -//#define LOAD_CHI_GPARITY(DIR,F) LOAD_CHI_GPARITY_IMPL(DIR,F) #define LOAD_CHI_GPARITY(DIR,F) LOAD_CHI_GPARITY_INPLACE_TWIST(DIR,F) - -//#define LOAD_CHIMU_GPARITY(DIR,F) LOAD_CHIMU_GPARITY_IMPL(DIR,F) #define LOAD_CHIMU_GPARITY(DIR,F) LOAD_CHIMU_GPARITY_INPLACE_TWIST(DIR,F) // To splat or not to splat depends on the implementation