#ifndef GRID_QCD_H #define GRID_QCD_H namespace Grid{ namespace QCD { static const int Nc=3; static const int Ns=4; static const int CbRed =0; static const int CbBlack=1; // QCD iMatrix types template using iSinglet = iScalar > ; template using iSpinMatrix = iMatrix, Ns>; template using iSpinColourMatrix = iMatrix, Ns>; template using iColourMatrix = iScalar> ; template using iSpinVector = iVector, Ns>; template using iColourVector = iScalar >; template using iSpinColourVector = iVector, Ns>; typedef iSinglet TComplex; // This is painful. Tensor singlet complex type. typedef iSinglet vTComplex; typedef iSinglet TReal; // This is painful. Tensor singlet complex type. typedef iSinglet vTInteger; typedef iSpinMatrix SpinMatrix; typedef iColourMatrix ColourMatrix; typedef iSpinColourMatrix SpinColourMatrix; typedef iSpinVector SpinVector; typedef iColourVector ColourVector; typedef iSpinColourVector SpinColourVector; typedef iSpinMatrix vSpinMatrix; typedef iColourMatrix vColourMatrix; typedef iSpinColourMatrix vSpinColourMatrix; typedef iSpinVector vSpinVector; typedef iColourVector vColourVector; typedef iSpinColourVector vSpinColourVector; typedef Lattice LatticeComplex; typedef Lattice LatticeInteger; // Predicates for "where" typedef Lattice LatticeColourMatrix; typedef Lattice LatticeSpinMatrix; typedef Lattice LatticePropagator; typedef LatticePropagator LatticeSpinColourMatrix; typedef Lattice LatticeFermion; typedef Lattice LatticeSpinColourVector; typedef Lattice LatticeSpinVector; typedef Lattice LatticeColourVector; // FIXME for debug; deprecate this inline void LatticeCoordinate(LatticeInteger &l,int mu){ GridBase *grid = l._grid; int Nsimd = grid->iSites(); std::vector gcoor; std::vector mergebuf(Nsimd); std::vector mergeptr(Nsimd); for(int o=0;ooSites();o++){ for(int i=0;iiSites();i++){ // RankIndexToGlobalCoor(grid->ThisRank(),o,i,gcoor); grid->RankIndexToGlobalCoor(0,o,i,gcoor); mergebuf[i]=gcoor[mu]; mergeptr[i]=&mergebuf[i]; } merge(l._odata[o],mergeptr); } }; #include #if 0 #endif } //namespace QCD } // Grid #endif