mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 05:54:32 +00:00 
			
		
		
		
	OMP dslash working
This commit is contained in:
		@@ -85,7 +85,17 @@ void WilsonMatrix::DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGaugeF
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void WilsonMatrix::multiply(const LatticeFermion &in, LatticeFermion &out)
 | 
			
		||||
void WilsonMatrix::M(const LatticeFermion &in, LatticeFermion &out)
 | 
			
		||||
{
 | 
			
		||||
  Dhop(in,out);
 | 
			
		||||
  return;
 | 
			
		||||
}
 | 
			
		||||
void WilsonMatrix::Mdag(const LatticeFermion &in, LatticeFermion &out)
 | 
			
		||||
{
 | 
			
		||||
  Dhop(in,out);
 | 
			
		||||
  return;
 | 
			
		||||
}
 | 
			
		||||
void WilsonMatrix::MdagM(const LatticeFermion &in, LatticeFermion &out)
 | 
			
		||||
{
 | 
			
		||||
  Dhop(in,out);
 | 
			
		||||
  return;
 | 
			
		||||
@@ -96,18 +106,18 @@ void WilsonMatrix::Dhop(const LatticeFermion &in, LatticeFermion &out)
 | 
			
		||||
  WilsonCompressor compressor;
 | 
			
		||||
  Stencil.HaloExchange<vSpinColourVector,vHalfSpinColourVector,WilsonCompressor>(in,comm_buf,compressor);
 | 
			
		||||
 | 
			
		||||
  vHalfSpinColourVector  tmp;    
 | 
			
		||||
  vHalfSpinColourVector  chi;    
 | 
			
		||||
  vSpinColourVector result;
 | 
			
		||||
  vHalfSpinColourVector Uchi;
 | 
			
		||||
  int offset,local,perm, ptype;
 | 
			
		||||
 | 
			
		||||
PARALLEL_FOR_LOOP
 | 
			
		||||
  for(int sss=0;sss<grid->oSites();sss++){
 | 
			
		||||
 | 
			
		||||
    vHalfSpinColourVector  tmp;    
 | 
			
		||||
    vHalfSpinColourVector  chi;    
 | 
			
		||||
    vSpinColourVector result;
 | 
			
		||||
    vHalfSpinColourVector Uchi;
 | 
			
		||||
    int offset,local,perm, ptype;
 | 
			
		||||
 | 
			
		||||
    //    int ss = Stencil._LebesgueReorder[sss];
 | 
			
		||||
    int ss = sss;
 | 
			
		||||
    int ssu= ss;
 | 
			
		||||
    //    int ss = Stencil._LebesgueReorder[sss];
 | 
			
		||||
 | 
			
		||||
    // Xp
 | 
			
		||||
    offset = Stencil._offsets [Xp][ss];
 | 
			
		||||
 
 | 
			
		||||
@@ -3,16 +3,12 @@
 | 
			
		||||
 | 
			
		||||
#include <Grid.h>
 | 
			
		||||
 | 
			
		||||
#include <algorithms/LinearOperator.h>
 | 
			
		||||
 | 
			
		||||
namespace Grid {
 | 
			
		||||
 | 
			
		||||
  namespace QCD {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    template<class vtype> class LinearOperatorBase {
 | 
			
		||||
    public:
 | 
			
		||||
      void multiply(const Lattice<vtype> &in, Lattice<vtype> &out){ assert(0);}
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    class WilsonMatrix : public LinearOperatorBase<LatticeFermion>
 | 
			
		||||
    {
 | 
			
		||||
      //NB r=1;
 | 
			
		||||
@@ -40,7 +36,9 @@ namespace Grid {
 | 
			
		||||
      void DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGaugeField &Umu);
 | 
			
		||||
 | 
			
		||||
      // override multiply
 | 
			
		||||
      void multiply(const LatticeFermion &in, LatticeFermion &out);
 | 
			
		||||
      virtual void M    (const LatticeFermion &in, LatticeFermion &out);
 | 
			
		||||
      virtual void Mdag (const LatticeFermion &in, LatticeFermion &out);
 | 
			
		||||
      virtual void MdagM(const LatticeFermion &in, LatticeFermion &out);
 | 
			
		||||
 | 
			
		||||
      // non-hermitian hopping term; half cb or both
 | 
			
		||||
      void Dhop(const LatticeFermion &in, LatticeFermion &out);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user