mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 05:54:32 +00:00 
			
		
		
		
	Merge branch 'develop' into feature/hirep
This commit is contained in:
		@@ -49,154 +49,171 @@ namespace Grid {
 | 
			
		||||
    template<class Impl> class WilsonKernels : public FermionOperator<Impl> , public WilsonKernelsStatic { 
 | 
			
		||||
    public:
 | 
			
		||||
 | 
			
		||||
     INHERIT_IMPL_TYPES(Impl);
 | 
			
		||||
     typedef FermionOperator<Impl> Base;
 | 
			
		||||
      INHERIT_IMPL_TYPES(Impl);
 | 
			
		||||
      typedef FermionOperator<Impl> Base;
 | 
			
		||||
     
 | 
			
		||||
    public:
 | 
			
		||||
 | 
			
		||||
  template <bool EnableBool = true>
 | 
			
		||||
  typename std::enable_if<Impl::Dimension == 3 && Nc == 3 &&EnableBool, void>::type
 | 
			
		||||
  DiracOptDhopSite(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out) {
 | 
			
		||||
      template <bool EnableBool = true>
 | 
			
		||||
      typename std::enable_if<Impl::Dimension == 3 && Nc == 3 &&EnableBool, void>::type
 | 
			
		||||
	DiracOptDhopSite(
 | 
			
		||||
			 StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
			 std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
			 int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
			 FermionField &out) {
 | 
			
		||||
#ifdef AVX512
 | 
			
		||||
    if (AsmOpt) {
 | 
			
		||||
      WilsonKernels<Impl>::DiracOptAsmDhopSite(st, lo, U, buf, sF, sU, Ls, Ns,
 | 
			
		||||
                                               in, out);
 | 
			
		||||
	if (AsmOpt) {
 | 
			
		||||
	  WilsonKernels<Impl>::DiracOptAsmDhopSite(st, lo, U, buf, sF, sU, Ls, Ns,
 | 
			
		||||
						   in, out);
 | 
			
		||||
 | 
			
		||||
    } else {
 | 
			
		||||
	} else {
 | 
			
		||||
#else
 | 
			
		||||
    {
 | 
			
		||||
	  {
 | 
			
		||||
#endif
 | 
			
		||||
      for (int site = 0; site < Ns; site++) {
 | 
			
		||||
        for (int s = 0; s < Ls; s++) {
 | 
			
		||||
          if (HandOpt)
 | 
			
		||||
            WilsonKernels<Impl>::DiracOptHandDhopSite(st, lo, U, buf, sF, sU,
 | 
			
		||||
                                                      in, out);
 | 
			
		||||
          else
 | 
			
		||||
            WilsonKernels<Impl>::DiracOptGenericDhopSite(st, lo, U, buf, sF, sU,
 | 
			
		||||
                                                         in, out);
 | 
			
		||||
          sF++;
 | 
			
		||||
        }
 | 
			
		||||
        sU++;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
	    for (int site = 0; site < Ns; site++) {
 | 
			
		||||
	      for (int s = 0; s < Ls; s++) {
 | 
			
		||||
		if (HandOpt)
 | 
			
		||||
		  WilsonKernels<Impl>::DiracOptHandDhopSite(st, lo, U, buf, sF, sU,
 | 
			
		||||
							    in, out);
 | 
			
		||||
		else
 | 
			
		||||
		  WilsonKernels<Impl>::DiracOptGenericDhopSite(st, lo, U, buf, sF, sU,
 | 
			
		||||
							       in, out);
 | 
			
		||||
		sF++;
 | 
			
		||||
	      }
 | 
			
		||||
	      sU++;
 | 
			
		||||
	    }
 | 
			
		||||
	  }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  template <bool EnableBool = true>
 | 
			
		||||
    typename std::enable_if<(Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool, void>::type
 | 
			
		||||
  DiracOptDhopSite(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out) {
 | 
			
		||||
    for (int site = 0; site < Ns; site++) {
 | 
			
		||||
      for (int s = 0; s < Ls; s++) {
 | 
			
		||||
        WilsonKernels<Impl>::DiracOptGenericDhopSite(st, lo, U, buf, sF, sU, in,
 | 
			
		||||
                                                     out);
 | 
			
		||||
        sF++;
 | 
			
		||||
      }
 | 
			
		||||
      sU++;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
	template <bool EnableBool = true>
 | 
			
		||||
	  typename std::enable_if<(Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool, void>::type
 | 
			
		||||
	  DiracOptDhopSite(
 | 
			
		||||
			   StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
			   std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
			   int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
			   FermionField &out) {
 | 
			
		||||
	  for (int site = 0; site < Ns; site++) {
 | 
			
		||||
	    for (int s = 0; s < Ls; s++) {
 | 
			
		||||
	      WilsonKernels<Impl>::DiracOptGenericDhopSite(st, lo, U, buf, sF, sU, in,
 | 
			
		||||
							   out);
 | 
			
		||||
	      sF++;
 | 
			
		||||
	    }
 | 
			
		||||
	    sU++;
 | 
			
		||||
	  }
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  template <bool EnableBool = true>
 | 
			
		||||
  typename std::enable_if<Impl::Dimension == 3 && Nc == 3 && EnableBool,
 | 
			
		||||
                          void>::type
 | 
			
		||||
  DiracOptDhopSiteDag(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out) {
 | 
			
		||||
	template <bool EnableBool = true>
 | 
			
		||||
	  typename std::enable_if<Impl::Dimension == 3 && Nc == 3 && EnableBool,
 | 
			
		||||
				  void>::type
 | 
			
		||||
	  DiracOptDhopSiteDag(
 | 
			
		||||
			      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
			      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
			      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
			      FermionField &out) {
 | 
			
		||||
#ifdef AVX512
 | 
			
		||||
    if (AsmOpt) {
 | 
			
		||||
      WilsonKernels<Impl>::DiracOptAsmDhopSiteDag(st, lo, U, buf, sF, sU, Ls,
 | 
			
		||||
                                                  Ns, in, out);
 | 
			
		||||
    } else {
 | 
			
		||||
				    if (AsmOpt) {
 | 
			
		||||
				      WilsonKernels<Impl>::DiracOptAsmDhopSiteDag(st, lo, U, buf, sF, sU, Ls,
 | 
			
		||||
										  Ns, in, out);
 | 
			
		||||
				    } else {
 | 
			
		||||
#else
 | 
			
		||||
    {
 | 
			
		||||
				      {
 | 
			
		||||
#endif
 | 
			
		||||
      for (int site = 0; site < Ns; site++) {
 | 
			
		||||
        for (int s = 0; s < Ls; s++) {
 | 
			
		||||
          if (HandOpt)
 | 
			
		||||
            WilsonKernels<Impl>::DiracOptHandDhopSiteDag(st, lo, U, buf, sF, sU,
 | 
			
		||||
                                                         in, out);
 | 
			
		||||
          else
 | 
			
		||||
            WilsonKernels<Impl>::DiracOptGenericDhopSiteDag(st, lo, U, buf, sF,
 | 
			
		||||
                                                            sU, in, out);
 | 
			
		||||
          sF++;
 | 
			
		||||
        }
 | 
			
		||||
        sU++;
 | 
			
		||||
					for (int site = 0; site < Ns; site++) {
 | 
			
		||||
					  for (int s = 0; s < Ls; s++) {
 | 
			
		||||
					    if (HandOpt)
 | 
			
		||||
					      WilsonKernels<Impl>::DiracOptHandDhopSiteDag(st, lo, U, buf, sF, sU,
 | 
			
		||||
											   in, out);
 | 
			
		||||
					    else
 | 
			
		||||
					      WilsonKernels<Impl>::DiracOptGenericDhopSiteDag(st, lo, U, buf, sF,
 | 
			
		||||
											      sU, in, out);
 | 
			
		||||
					    sF++;
 | 
			
		||||
					  }
 | 
			
		||||
					  sU++;
 | 
			
		||||
					}
 | 
			
		||||
				      }
 | 
			
		||||
				    }
 | 
			
		||||
 | 
			
		||||
				    template <bool EnableBool = true>
 | 
			
		||||
				      typename std::enable_if<
 | 
			
		||||
				      (Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool,
 | 
			
		||||
				      void>::type
 | 
			
		||||
				      DiracOptDhopSiteDag(
 | 
			
		||||
							  StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
							  std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
							  int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
							  FermionField &out) {
 | 
			
		||||
					for (int site = 0; site < Ns; site++) {
 | 
			
		||||
					  for (int s = 0; s < Ls; s++) {
 | 
			
		||||
					    WilsonKernels<Impl>::DiracOptGenericDhopSiteDag(st, lo, U, buf, sF, sU,
 | 
			
		||||
											    in, out);
 | 
			
		||||
					    sF++;
 | 
			
		||||
					  }
 | 
			
		||||
					  sU++;
 | 
			
		||||
					}
 | 
			
		||||
				      }
 | 
			
		||||
 | 
			
		||||
				    void DiracOptDhopDir(
 | 
			
		||||
							 StencilImpl &st, DoubledGaugeField &U,
 | 
			
		||||
							 std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
							 int sF, int sU, const FermionField &in, FermionField &out, int dirdisp,
 | 
			
		||||
							 int gamma);
 | 
			
		||||
 | 
			
		||||
	private:
 | 
			
		||||
				    // Specialised variants
 | 
			
		||||
				    void DiracOptGenericDhopSite(
 | 
			
		||||
								 StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
								 std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
								 int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
				    void DiracOptGenericDhopSiteDag(
 | 
			
		||||
								    StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
								    std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
								    int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
				    void DiracOptAsmDhopSite(
 | 
			
		||||
							     StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
							     std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
							     int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
							     FermionField &out);
 | 
			
		||||
 | 
			
		||||
				    void DiracOptAsmDhopSiteDag(
 | 
			
		||||
								StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
								std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
								int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
								FermionField &out);
 | 
			
		||||
 | 
			
		||||
				    void DiracOptHandDhopSite(
 | 
			
		||||
							      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
							      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
							      int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
				    void DiracOptHandDhopSiteDag(
 | 
			
		||||
								 StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
								 std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
								 int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
	public:
 | 
			
		||||
				    WilsonKernels(const ImplParams &p = ImplParams());
 | 
			
		||||
				  };
 | 
			
		||||
    
 | 
			
		||||
	///////////////////////////////////////////////////////////
 | 
			
		||||
	// Default to no assembler implementation
 | 
			
		||||
	///////////////////////////////////////////////////////////
 | 
			
		||||
	template<class Impl>
 | 
			
		||||
	  void WilsonKernels<Impl >::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
							 std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							 int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
	{
 | 
			
		||||
	  assert(0);
 | 
			
		||||
	}
 | 
			
		||||
	template<class Impl>
 | 
			
		||||
	  void WilsonKernels<Impl >::DiracOptAsmDhopSiteDag(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
							    std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							    int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
	{
 | 
			
		||||
	  assert(0);
 | 
			
		||||
	}
 | 
			
		||||
  
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  template <bool EnableBool = true>
 | 
			
		||||
  typename std::enable_if<
 | 
			
		||||
      (Impl::Dimension != 3 || (Impl::Dimension == 3 && Nc != 3)) && EnableBool,
 | 
			
		||||
      void>::type
 | 
			
		||||
  DiracOptDhopSiteDag(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out) {
 | 
			
		||||
    for (int site = 0; site < Ns; site++) {
 | 
			
		||||
      for (int s = 0; s < Ls; s++) {
 | 
			
		||||
        WilsonKernels<Impl>::DiracOptGenericDhopSiteDag(st, lo, U, buf, sF, sU,
 | 
			
		||||
                                                        in, out);
 | 
			
		||||
        sF++;
 | 
			
		||||
      }
 | 
			
		||||
      sU++;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  void DiracOptDhopDir(
 | 
			
		||||
      StencilImpl &st, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, const FermionField &in, FermionField &out, int dirdisp,
 | 
			
		||||
      int gamma);
 | 
			
		||||
 | 
			
		||||
 private:
 | 
			
		||||
  // Specialised variants
 | 
			
		||||
  void DiracOptGenericDhopSite(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
  void DiracOptGenericDhopSiteDag(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
  void DiracOptAsmDhopSite(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out);
 | 
			
		||||
 | 
			
		||||
  void DiracOptAsmDhopSiteDag(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, int Ls, int Ns, const FermionField &in,
 | 
			
		||||
      FermionField &out);
 | 
			
		||||
 | 
			
		||||
  void DiracOptHandDhopSite(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
  void DiracOptHandDhopSiteDag(
 | 
			
		||||
      StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U,
 | 
			
		||||
      std::vector<SiteHalfSpinor, alignedAllocator<SiteHalfSpinor> > &buf,
 | 
			
		||||
      int sF, int sU, const FermionField &in, FermionField &out);
 | 
			
		||||
 | 
			
		||||
 public:
 | 
			
		||||
  WilsonKernels(const ImplParams &p = ImplParams());
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -1,4 +1,4 @@
 | 
			
		||||
    /*************************************************************************************
 | 
			
		||||
/*************************************************************************************
 | 
			
		||||
 | 
			
		||||
    Grid physics library, www.github.com/paboyle/Grid 
 | 
			
		||||
 | 
			
		||||
@@ -26,68 +26,56 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
 | 
			
		||||
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
 | 
			
		||||
    See the full license in the file "LICENSE" in the top level distribution directory
 | 
			
		||||
    *************************************************************************************/
 | 
			
		||||
    /*  END LEGAL */
 | 
			
		||||
*************************************************************************************/
 | 
			
		||||
/*  END LEGAL */
 | 
			
		||||
 | 
			
		||||
#include <Grid.h>
 | 
			
		||||
 | 
			
		||||
namespace Grid {
 | 
			
		||||
namespace QCD {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  ///////////////////////////////////////////////////////////
 | 
			
		||||
  // Default to no assembler implementation
 | 
			
		||||
  ///////////////////////////////////////////////////////////
 | 
			
		||||
  template<class Impl>
 | 
			
		||||
  void WilsonKernels<Impl>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
					       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
					       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
{
 | 
			
		||||
  assert(0);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
  namespace QCD {
 | 
			
		||||
    
 | 
			
		||||
#if defined(AVX512) 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  ///////////////////////////////////////////////////////////
 | 
			
		||||
  // If we are AVX512 specialise the single precision routine
 | 
			
		||||
  ///////////////////////////////////////////////////////////
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
    ///////////////////////////////////////////////////////////
 | 
			
		||||
    // If we are AVX512 specialise the single precision routine
 | 
			
		||||
    ///////////////////////////////////////////////////////////
 | 
			
		||||
    
 | 
			
		||||
#include <simd/Intel512wilson.h>
 | 
			
		||||
#include <simd/Intel512single.h>
 | 
			
		||||
 | 
			
		||||
static Vector<vComplexF> signs;
 | 
			
		||||
 | 
			
		||||
int setupSigns(void ){
 | 
			
		||||
  Vector<vComplexF> bother(2);
 | 
			
		||||
  signs = bother;
 | 
			
		||||
  vrsign(signs[0]);
 | 
			
		||||
  visign(signs[1]);
 | 
			
		||||
  return 1;
 | 
			
		||||
}
 | 
			
		||||
static int signInit = setupSigns();
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    static Vector<vComplexF> signs;
 | 
			
		||||
    
 | 
			
		||||
    int setupSigns(void ){
 | 
			
		||||
      Vector<vComplexF> bother(2);
 | 
			
		||||
      signs = bother;
 | 
			
		||||
      vrsign(signs[0]);
 | 
			
		||||
      visign(signs[1]);
 | 
			
		||||
      return 1;
 | 
			
		||||
    }
 | 
			
		||||
    static int signInit = setupSigns();
 | 
			
		||||
  
 | 
			
		||||
#define label(A)  ilabel(A)
 | 
			
		||||
#define ilabel(A) ".globl\n"  #A ":\n" 
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
#define MAYBEPERM(A,perm) if (perm) { A ; }
 | 
			
		||||
#define MULT_2SPIN(ptr,pf) MULT_ADDSUB_2SPIN(ptr,pf)
 | 
			
		||||
#define FX(A) WILSONASM_ ##A
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
#undef KERNEL_DAG
 | 
			
		||||
template<>
 | 
			
		||||
void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
						     std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
						     int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
    template<>
 | 
			
		||||
    void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
							 std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							 int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
#include <qcd/action/fermion/WilsonKernelsAsmBody.h>
 | 
			
		||||
 | 
			
		||||
      
 | 
			
		||||
#define KERNEL_DAG
 | 
			
		||||
template<>
 | 
			
		||||
void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSiteDag(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
						     std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
						     int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
    template<>
 | 
			
		||||
    void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSiteDag(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
							    std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							    int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
#include <qcd/action/fermion/WilsonKernelsAsmBody.h>
 | 
			
		||||
 | 
			
		||||
				    
 | 
			
		||||
#undef VMOVIDUP
 | 
			
		||||
#undef VMOVRDUP
 | 
			
		||||
#undef MAYBEPERM
 | 
			
		||||
@@ -98,43 +86,22 @@ void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSiteDag(StencilImpl &st,Lebesgue
 | 
			
		||||
#define VMOVIDUP(A,B,C)                                  VBCASTIDUPf(A,B,C)
 | 
			
		||||
#define VMOVRDUP(A,B,C)                                  VBCASTRDUPf(A,B,C)
 | 
			
		||||
#define MULT_2SPIN(ptr,pf) MULT_ADDSUB_2SPIN_LS(ptr,pf)
 | 
			
		||||
 | 
			
		||||
				    
 | 
			
		||||
#undef KERNEL_DAG
 | 
			
		||||
template<>
 | 
			
		||||
void WilsonKernels<DomainWallVec5dImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
								   std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
								   int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
    template<>
 | 
			
		||||
    void WilsonKernels<DomainWallVec5dImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
								  std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
								  int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
#include <qcd/action/fermion/WilsonKernelsAsmBody.h>
 | 
			
		||||
 | 
			
		||||
				    
 | 
			
		||||
#define KERNEL_DAG
 | 
			
		||||
template<>
 | 
			
		||||
void WilsonKernels<DomainWallVec5dImplF>::DiracOptAsmDhopSiteDag(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
								   std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
								   int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
    template<>
 | 
			
		||||
    void WilsonKernels<DomainWallVec5dImplF>::DiracOptAsmDhopSiteDag(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
								     std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
								     int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out)
 | 
			
		||||
#include <qcd/action/fermion/WilsonKernelsAsmBody.h>
 | 
			
		||||
 | 
			
		||||
				    
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
template void WilsonKernels<WilsonImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U,
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							      int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
 | 
			
		||||
template void WilsonKernels<WilsonImplD>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U, 
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
template void WilsonKernels<GparityWilsonImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U, 
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
template void WilsonKernels<GparityWilsonImplD>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U, 
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
template void WilsonKernels<DomainWallVec5dImplF>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U, 
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
template void WilsonKernels<DomainWallVec5dImplD>::DiracOptAsmDhopSite(StencilImpl &st,LebesgueOrder & lo,DoubledGaugeField &U, 
 | 
			
		||||
							       std::vector<SiteHalfSpinor,alignedAllocator<SiteHalfSpinor> >  &buf,
 | 
			
		||||
							       int ss,int ssU,int Ls,int Ns,const FermionField &in, FermionField &out);		
 | 
			
		||||
}}
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user