mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-03 21:44:33 +00:00 
			
		
		
		
	Merge branch 'feature/hadrons' into develop
This commit is contained in:
		
							
								
								
									
										1
									
								
								lib/Hadrons
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								lib/Hadrons
									
									
									
									
									
										Symbolic link
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
../extras/Hadrons
 | 
			
		||||
@@ -110,8 +110,8 @@ public:
 | 
			
		||||
  friend std::ostream& operator<< (std::ostream& stream, Logger& log){
 | 
			
		||||
 | 
			
		||||
    if ( log.active ) {
 | 
			
		||||
      stream << log.background()<< log.topName << log.background()<< " : ";
 | 
			
		||||
      stream << log.colour() <<std::setw(14) << std::left << log.name << log.background() << " : ";
 | 
			
		||||
      stream << log.background()<< std::setw(10) << std::left << log.topName << log.background()<< " : ";
 | 
			
		||||
      stream << log.colour() << std::setw(14) << std::left << log.name << log.background() << " : ";
 | 
			
		||||
      if ( log.timestamp ) {
 | 
			
		||||
	StopWatch.Stop();
 | 
			
		||||
	GridTime now = StopWatch.Elapsed();
 | 
			
		||||
 
 | 
			
		||||
@@ -46,11 +46,13 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
 | 
			
		||||
#endif
 | 
			
		||||
#define PARALLEL_NESTED_LOOP2 _Pragma("omp parallel for collapse(2)")
 | 
			
		||||
#define PARALLEL_REGION       _Pragma("omp parallel")
 | 
			
		||||
#define PARALLEL_CRITICAL     _Pragma("omp critical")
 | 
			
		||||
#else
 | 
			
		||||
#define PARALLEL_FOR_LOOP
 | 
			
		||||
#define PARALLEL_FOR_LOOP_INTERN
 | 
			
		||||
#define PARALLEL_NESTED_LOOP2
 | 
			
		||||
#define PARALLEL_REGION
 | 
			
		||||
#define PARALLEL_CRITICAL
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
namespace Grid {
 | 
			
		||||
 
 | 
			
		||||
@@ -48,8 +48,10 @@ namespace QCD {
 | 
			
		||||
  //    typedef typename XXX         GaugeField;
 | 
			
		||||
  //    typedef typename XXX      GaugeActField;
 | 
			
		||||
  //    typedef typename XXX       FermionField;
 | 
			
		||||
  //    typedef typename XXX    PropagatorField;
 | 
			
		||||
  //    typedef typename XXX  DoubledGaugeField;
 | 
			
		||||
  //    typedef typename XXX         SiteSpinor;
 | 
			
		||||
  //    typedef typename XXX     SitePropagator;
 | 
			
		||||
  //    typedef typename XXX     SiteHalfSpinor;	
 | 
			
		||||
  //    typedef typename XXX         Compressor;	
 | 
			
		||||
  //
 | 
			
		||||
@@ -95,13 +97,15 @@ namespace QCD {
 | 
			
		||||
  
 | 
			
		||||
#define INHERIT_FIMPL_TYPES(Impl)\
 | 
			
		||||
  typedef typename Impl::FermionField           FermionField;		\
 | 
			
		||||
  typedef typename Impl::PropagatorField     PropagatorField;		\
 | 
			
		||||
  typedef typename Impl::DoubledGaugeField DoubledGaugeField;		\
 | 
			
		||||
  typedef typename Impl::SiteSpinor               SiteSpinor;		\
 | 
			
		||||
  typedef typename Impl::SitePropagator       SitePropagator;		\
 | 
			
		||||
  typedef typename Impl::SiteHalfSpinor       SiteHalfSpinor;		\
 | 
			
		||||
  typedef typename Impl::Compressor               Compressor;		\
 | 
			
		||||
  typedef typename Impl::StencilImpl             StencilImpl;		\
 | 
			
		||||
  typedef typename Impl::ImplParams ImplParams;				\
 | 
			
		||||
  typedef typename Impl::Coeff_t       Coeff_t;
 | 
			
		||||
  typedef typename Impl::ImplParams               ImplParams;	        \
 | 
			
		||||
  typedef typename Impl::Coeff_t                     Coeff_t;           \
 | 
			
		||||
  
 | 
			
		||||
#define INHERIT_IMPL_TYPES(Base) \
 | 
			
		||||
  INHERIT_GIMPL_TYPES(Base)	 \
 | 
			
		||||
@@ -127,14 +131,17 @@ namespace QCD {
 | 
			
		||||
    INHERIT_GIMPL_TYPES(Gimpl);
 | 
			
		||||
      
 | 
			
		||||
    template <typename vtype> using iImplSpinor            = iScalar<iVector<iVector<vtype, Dimension>, Ns> >;
 | 
			
		||||
    template <typename vtype> using iImplPropagator        = iScalar<iMatrix<iMatrix<vtype, Dimension>, Ns> >;
 | 
			
		||||
    template <typename vtype> using iImplHalfSpinor        = iScalar<iVector<iVector<vtype, Dimension>, Nhs> >;
 | 
			
		||||
    template <typename vtype> using iImplDoubledGaugeField = iVector<iScalar<iMatrix<vtype, Dimension> >, Nds>;
 | 
			
		||||
    
 | 
			
		||||
    typedef iImplSpinor<Simd>            SiteSpinor;
 | 
			
		||||
    typedef iImplPropagator<Simd>        SitePropagator;
 | 
			
		||||
    typedef iImplHalfSpinor<Simd>        SiteHalfSpinor;
 | 
			
		||||
    typedef iImplDoubledGaugeField<Simd> SiteDoubledGaugeField;
 | 
			
		||||
    
 | 
			
		||||
    typedef Lattice<SiteSpinor>            FermionField;
 | 
			
		||||
    typedef Lattice<SitePropagator>        PropagatorField;
 | 
			
		||||
    typedef Lattice<SiteDoubledGaugeField> DoubledGaugeField;
 | 
			
		||||
    
 | 
			
		||||
    typedef WilsonCompressor<SiteHalfSpinor, SiteSpinor> Compressor;
 | 
			
		||||
@@ -216,14 +223,17 @@ class DomainWallVec5dImpl :  public PeriodicGaugeImpl< GaugeImplTypes< S,Nrepres
 | 
			
		||||
  INHERIT_GIMPL_TYPES(Gimpl);
 | 
			
		||||
  
 | 
			
		||||
  template <typename vtype> using iImplSpinor            = iScalar<iVector<iVector<vtype, Nrepresentation>, Ns> >;
 | 
			
		||||
  template <typename vtype> using iImplPropagator        = iScalar<iMatrix<iMatrix<vtype, Nrepresentation>, Ns> >;
 | 
			
		||||
  template <typename vtype> using iImplHalfSpinor        = iScalar<iVector<iVector<vtype, Nrepresentation>, Nhs> >;
 | 
			
		||||
  template <typename vtype> using iImplDoubledGaugeField = iVector<iScalar<iMatrix<vtype, Nrepresentation> >, Nds>;
 | 
			
		||||
  template <typename vtype> using iImplGaugeField        = iVector<iScalar<iMatrix<vtype, Nrepresentation> >, Nd>;
 | 
			
		||||
  template <typename vtype> using iImplGaugeLink         = iScalar<iScalar<iMatrix<vtype, Nrepresentation> > >;
 | 
			
		||||
  
 | 
			
		||||
  typedef iImplSpinor<Simd> SiteSpinor;
 | 
			
		||||
  typedef iImplPropagator<Simd> SitePropagator;
 | 
			
		||||
  typedef iImplHalfSpinor<Simd> SiteHalfSpinor;
 | 
			
		||||
  typedef Lattice<SiteSpinor> FermionField;
 | 
			
		||||
  typedef Lattice<SitePropagator> PropagatorField;
 | 
			
		||||
  
 | 
			
		||||
  // Make the doubled gauge field a *scalar*
 | 
			
		||||
  typedef iImplDoubledGaugeField<typename Simd::scalar_type>  SiteDoubledGaugeField;  // This is a scalar
 | 
			
		||||
@@ -315,14 +325,17 @@ class GparityWilsonImpl : public ConjugateGaugeImpl<GaugeImplTypes<S, Nrepresent
 | 
			
		||||
 INHERIT_GIMPL_TYPES(Gimpl);
 | 
			
		||||
      
 | 
			
		||||
 template <typename vtype> using iImplSpinor            = iVector<iVector<iVector<vtype, Nrepresentation>, Ns>, Ngp>;
 | 
			
		||||
 template <typename vtype> using iImplPropagator        = iVector<iMatrix<iMatrix<vtype, Nrepresentation>, Ns>, Ngp >;
 | 
			
		||||
 template <typename vtype> using iImplHalfSpinor        = iVector<iVector<iVector<vtype, Nrepresentation>, Nhs>, Ngp>;
 | 
			
		||||
 template <typename vtype> using iImplDoubledGaugeField = iVector<iVector<iScalar<iMatrix<vtype, Nrepresentation> >, Nds>, Ngp>;
 | 
			
		||||
      
 | 
			
		||||
 typedef iImplSpinor<Simd> SiteSpinor;
 | 
			
		||||
 typedef iImplPropagator<Simd> SitePropagator;
 | 
			
		||||
 typedef iImplHalfSpinor<Simd> SiteHalfSpinor;
 | 
			
		||||
 typedef iImplDoubledGaugeField<Simd> SiteDoubledGaugeField;
 | 
			
		||||
 
 | 
			
		||||
 typedef Lattice<SiteSpinor> FermionField;
 | 
			
		||||
 typedef Lattice<SitePropagator> PropagatorField;
 | 
			
		||||
 typedef Lattice<SiteDoubledGaugeField> DoubledGaugeField;
 | 
			
		||||
 
 | 
			
		||||
 typedef WilsonCompressor<SiteHalfSpinor, SiteSpinor> Compressor;
 | 
			
		||||
 
 | 
			
		||||
@@ -67,9 +67,8 @@ namespace Grid {
 | 
			
		||||
    return os;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  class Serializable {};
 | 
			
		||||
  
 | 
			
		||||
  // static polymorphism implemented using CRTP idiom
 | 
			
		||||
  class Serializable;
 | 
			
		||||
  
 | 
			
		||||
  // Static abstract writer
 | 
			
		||||
  template <typename T>
 | 
			
		||||
@@ -122,6 +121,27 @@ namespace Grid {
 | 
			
		||||
    T *upcast;
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  // serializable base class
 | 
			
		||||
  class Serializable
 | 
			
		||||
  {
 | 
			
		||||
  public:
 | 
			
		||||
    template <typename T>
 | 
			
		||||
    static inline void write(Writer<T> &WR,const std::string &s,
 | 
			
		||||
                             const Serializable &obj)
 | 
			
		||||
    {}
 | 
			
		||||
    
 | 
			
		||||
    template <typename T>
 | 
			
		||||
    static inline void read(Reader<T> &RD,const std::string &s,
 | 
			
		||||
                            Serializable &obj)
 | 
			
		||||
    {}
 | 
			
		||||
    
 | 
			
		||||
    friend inline std::ostream & operator<<(std::ostream &os,
 | 
			
		||||
                                            const Serializable &obj)
 | 
			
		||||
    {
 | 
			
		||||
      return os;
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
  
 | 
			
		||||
  // Generic writer interface
 | 
			
		||||
  template <typename T>
 | 
			
		||||
  inline void push(Writer<T> &w, const std::string &s)
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ void LebesgueOrder::CartesianBlocking(void)
 | 
			
		||||
{
 | 
			
		||||
  _LebesgueReorder.resize(0);
 | 
			
		||||
 | 
			
		||||
  std::cout << GridLogDebug << " CartesianBlocking ";
 | 
			
		||||
  //    std::cout << GridLogDebug << " CartesianBlocking ";
 | 
			
		||||
  //    for(int d=0;d<Block.size();d++) std::cout <<Block[d]<<" ";
 | 
			
		||||
  //    std::cout<<std::endl; 
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user