1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 17:25:37 +01:00

big commit fixing nocompiles in defective C++11 compilers (gcc, icpc). stared getting to

near the bleeding edge I guess
This commit is contained in:
Peter Boyle 2015-06-30 15:03:11 +01:00
parent 7cfe432ee2
commit 74e397b29c
10 changed files with 204 additions and 198 deletions

View File

@ -24,9 +24,9 @@ namespace QCD {
// QCD iMatrix types // QCD iMatrix types
// Index conventions: Lorentz x Spin x Colour // Index conventions: Lorentz x Spin x Colour
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
static const int ColourIndex = 1; static const int ColourIndex = 2;
static const int SpinIndex = 2; static const int SpinIndex = 1;
static const int LorentzIndex= 3; static const int LorentzIndex= 0;
// ChrisK very keen to add extra space for Gparity doubling. // ChrisK very keen to add extra space for Gparity doubling.

View File

@ -35,7 +35,7 @@ void WilsonFermion::DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGauge
conformable(Umu._grid,GaugeGrid()); conformable(Umu._grid,GaugeGrid());
LatticeColourMatrix U(GaugeGrid()); LatticeColourMatrix U(GaugeGrid());
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
U = peekIndex<LorentzIndex>(Umu,mu); U = PeekIndex<LorentzIndex>(Umu,mu);
pokeIndex<LorentzIndex>(Uds,U,mu); pokeIndex<LorentzIndex>(Uds,U,mu);
U = adj(Cshift(U,mu,-1)); U = adj(Cshift(U,mu,-1));
pokeIndex<LorentzIndex>(Uds,U,mu+4); pokeIndex<LorentzIndex>(Uds,U,mu+4);
@ -109,7 +109,7 @@ void WilsonFermion::DhopDir(const LatticeFermion &in, LatticeFermion &out,int di
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int sss=0;sss<in._grid->oSites();sss++){ for(int sss=0;sss<in._grid->oSites();sss++){
DiracOpt::DhopDir(Stencil,Umu,comm_buf,sss,sss,in,out,dirdisp); DiracOptDhopDir(Stencil,Umu,comm_buf,sss,sss,in,out,dirdisp);
} }
}; };
@ -125,24 +125,24 @@ void WilsonFermion::DhopInternal(CartesianStencil & st,LatticeDoubledGaugeField
if( HandOptDslash ) { if( HandOptDslash ) {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int sss=0;sss<in._grid->oSites();sss++){ for(int sss=0;sss<in._grid->oSites();sss++){
DiracOptHand::DhopSiteDag(st,U,comm_buf,sss,sss,in,out); DiracOptHandDhopSiteDag(st,U,comm_buf,sss,sss,in,out);
} }
} else { } else {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int sss=0;sss<in._grid->oSites();sss++){ for(int sss=0;sss<in._grid->oSites();sss++){
DiracOpt::DhopSiteDag(st,U,comm_buf,sss,sss,in,out); DiracOptDhopSiteDag(st,U,comm_buf,sss,sss,in,out);
} }
} }
} else { } else {
if( HandOptDslash ) { if( HandOptDslash ) {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int sss=0;sss<in._grid->oSites();sss++){ for(int sss=0;sss<in._grid->oSites();sss++){
DiracOptHand::DhopSite(st,U,comm_buf,sss,sss,in,out); DiracOptHandDhopSite(st,U,comm_buf,sss,sss,in,out);
} }
} else { } else {
PARALLEL_FOR_LOOP PARALLEL_FOR_LOOP
for(int sss=0;sss<in._grid->oSites();sss++){ for(int sss=0;sss<in._grid->oSites();sss++){
DiracOpt::DhopSite(st,U,comm_buf,sss,sss,in,out); DiracOptDhopSite(st,U,comm_buf,sss,sss,in,out);
} }
} }
} }

View File

@ -77,7 +77,7 @@ void WilsonFermion5D::DoubleStore(LatticeDoubledGaugeField &Uds,const LatticeGau
conformable(Umu._grid,GaugeGrid()); conformable(Umu._grid,GaugeGrid());
LatticeColourMatrix U(GaugeGrid()); LatticeColourMatrix U(GaugeGrid());
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
U = peekIndex<LorentzIndex>(Umu,mu); U = PeekIndex<LorentzIndex>(Umu,mu);
pokeIndex<LorentzIndex>(Uds,U,mu); pokeIndex<LorentzIndex>(Uds,U,mu);
U = adj(Cshift(U,mu,-1)); U = adj(Cshift(U,mu,-1));
pokeIndex<LorentzIndex>(Uds,U,mu+4); pokeIndex<LorentzIndex>(Uds,U,mu+4);
@ -105,7 +105,7 @@ void WilsonFermion5D::DhopDir(const LatticeFermion &in, LatticeFermion &out,int
for(int s=0;s<Ls;s++){ for(int s=0;s<Ls;s++){
int sU=ss; int sU=ss;
int sF = s+Ls*sU; int sF = s+Ls*sU;
DiracOpt::DhopDir(Stencil,Umu,comm_buf,sF,sU,in,out,dirdisp); DiracOptDhopDir(Stencil,Umu,comm_buf,sF,sU,in,out,dirdisp);
} }
} }
}; };
@ -127,49 +127,47 @@ void WilsonFermion5D::DhopInternal(CartesianStencil & st, LebesgueOrder &lo,
// - 8 linear access unit stride streams per thread for Fermion for hw prefetchable. // - 8 linear access unit stride streams per thread for Fermion for hw prefetchable.
if ( dag == DaggerYes ) { if ( dag == DaggerYes ) {
if( HandOptDslash ) { if( HandOptDslash ) {
#pragma parallel for PARALLEL_FOR_LOOP
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){
{ for(int s=0;s<Ls;s++){
for(int s=0;s<Ls;s++){ int sU=ss;
int sU=ss; int sF = s+Ls*sU;
int sF = s+Ls*sU; DiracOptHandDhopSiteDag(st,U,comm_buf,sF,sU,in,out);
DiracOptHand::DhopSiteDag(st,U,comm_buf,sF,sU,in,out);
} }
}
} }
} else { } else {
#pragma parallel for PARALLEL_FOR_LOOP
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){
{ {
int sd; int sd;
for(sd=0;sd<Ls;sd++){ for(sd=0;sd<Ls;sd++){
int sU=ss; int sU=ss;
int sF = sd+Ls*sU; int sF = sd+Ls*sU;
DiracOpt::DhopSiteDag(st,U,comm_buf,sF,sU,in,out); DiracOptDhopSiteDag(st,U,comm_buf,sF,sU,in,out);
} }
} }
} }
} }
} else { } else {
if( HandOptDslash ) { if( HandOptDslash ) {
#pragma parallel for PARALLEL_FOR_LOOP
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){
for(int s=0;s<Ls;s++){ for(int s=0;s<Ls;s++){
// int sU=lo.Reorder(ss); // int sU=lo.Reorder(ss);
int sU=ss; int sU=ss;
int sF = s+Ls*sU; int sF = s+Ls*sU;
DiracOptHand::DhopSite(st,U,comm_buf,sF,sU,in,out); DiracOptHandDhopSite(st,U,comm_buf,sF,sU,in,out);
} }
} }
} else { } else {
#pragma parallel for PARALLEL_FOR_LOOP
for(int ss=0;ss<U._grid->oSites();ss++){ for(int ss=0;ss<U._grid->oSites();ss++){
for(int s=0;s<Ls;s++){ for(int s=0;s<Ls;s++){
// int sU=lo.Reorder(ss); // int sU=lo.Reorder(ss);
int sU=ss; int sU=ss;
int sF = s+Ls*sU; int sF = s+Ls*sU;
DiracOpt::DhopSite(st,U,comm_buf,sF,sU,in,out); DiracOptDhopSite(st,U,comm_buf,sF,sU,in,out);
} }
} }
} }

View File

@ -39,16 +39,16 @@ namespace Grid {
GridBase *FermionRedBlackGrid(void) { return _FiveDimRedBlackGrid;} GridBase *FermionRedBlackGrid(void) { return _FiveDimRedBlackGrid;}
// full checkerboard operations; leave unimplemented as abstract for now // full checkerboard operations; leave unimplemented as abstract for now
//virtual RealD M (const LatticeFermion &in, LatticeFermion &out)=0; virtual RealD M (const LatticeFermion &in, LatticeFermion &out){assert(0); return 0.0;};
//virtual RealD Mdag (const LatticeFermion &in, LatticeFermion &out)=0; virtual RealD Mdag (const LatticeFermion &in, LatticeFermion &out){assert(0); return 0.0;};
// half checkerboard operations; leave unimplemented as abstract for now // half checkerboard operations; leave unimplemented as abstract for now
// virtual void Meooe (const LatticeFermion &in, LatticeFermion &out)=0; virtual void Meooe (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// virtual void MeooeDag (const LatticeFermion &in, LatticeFermion &out)=0; virtual void MeooeDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// virtual void Mooee (const LatticeFermion &in, LatticeFermion &out)=0; virtual void Mooee (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// virtual void MooeeDag (const LatticeFermion &in, LatticeFermion &out)=0; virtual void MooeeDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// virtual void MooeeInv (const LatticeFermion &in, LatticeFermion &out)=0; virtual void MooeeInv (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out)=0; virtual void MooeeInvDag (const LatticeFermion &in, LatticeFermion &out){assert(0);};
// Implement hopping term non-hermitian hopping term; half cb or both // Implement hopping term non-hermitian hopping term; half cb or both
// Implement s-diagonal DW // Implement s-diagonal DW

View File

@ -3,7 +3,7 @@
namespace Grid { namespace Grid {
namespace QCD { namespace QCD {
void DiracOpt::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out) int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
{ {
@ -149,7 +149,7 @@ void DiracOpt::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
vstream(out._odata[ss],result*(-0.5)); vstream(out._odata[ss],result*(-0.5));
} }
void DiracOpt::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out) int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
{ {
@ -295,7 +295,7 @@ void DiracOpt::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
vstream(out._odata[ss],result*(-0.5)); vstream(out._odata[ss],result*(-0.5));
} }
void DiracOpt::DhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptDhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp) int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp)
{ {

View File

@ -10,35 +10,40 @@ namespace Grid {
//////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Generic version works for any Nc and with extra flavour indices // Generic version works for any Nc and with extra flavour indices
class DiracOpt { // namespace DiracOpt {
public:
// These ones will need to be package intelligently. WilsonType base class // These ones will need to be package intelligently. WilsonType base class
// for use by DWF etc.. // for use by DWF etc..
static void DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
void DiracOptDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
void DiracOptDhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out); int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp);
static void DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
static void DhopDir(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out,int dirdisp);
}; // };
// Hand unrolled for Nc=3, one flavour // Hand unrolled for Nc=3, one flavour
class DiracOptHand { // namespace DiracOptHand {
public:
// These ones will need to be package intelligently. WilsonType base class // These ones will need to be package intelligently. WilsonType base class
// for use by DWF etc.. // for use by DWF etc..
static void DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
static void DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
}; void DiracOptHandDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
// };
void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out);
} }
} }

View File

@ -280,7 +280,7 @@
namespace Grid { namespace Grid {
namespace QCD { namespace QCD {
void DiracOptHand::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptHandDhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int sF,int sU,const LatticeFermion &in, LatticeFermion &out) int sF,int sU,const LatticeFermion &in, LatticeFermion &out)
{ {
@ -530,7 +530,7 @@ void DiracOptHand::DhopSite(CartesianStencil &st,LatticeDoubledGaugeField &U,
} }
} }
void DiracOptHand::DhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U, void DiracOptHandDhopSiteDag(CartesianStencil &st,LatticeDoubledGaugeField &U,
std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf, std::vector<vHalfSpinColourVector,alignedAllocator<vHalfSpinColourVector> > &buf,
int ss,int sU,const LatticeFermion &in, LatticeFermion &out) int ss,int sU,const LatticeFermion &in, LatticeFermion &out)
{ {

View File

@ -4,6 +4,8 @@ namespace Grid{
namespace QCD { namespace QCD {
const int SpinorIndex = 2;
class Gamma { class Gamma {
public: public:
@ -331,7 +333,7 @@ namespace QCD {
//left multiply //left multiply
template<class vtype> inline auto operator * ( const Gamma &G,const iScalar<vtype> &arg) -> template<class vtype> inline auto operator * ( const Gamma &G,const iScalar<vtype> &arg) ->
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type
{ {
iScalar<vtype> ret; iScalar<vtype> ret;
@ -339,14 +341,14 @@ namespace QCD {
return ret; return ret;
} }
template<class vtype,int N> inline auto operator * ( const Gamma &G,const iVector<vtype,N> &arg) -> template<class vtype,int N> inline auto operator * ( const Gamma &G,const iVector<vtype,N> &arg) ->
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type
{ {
iVector<vtype,N> ret; iVector<vtype,N> ret;
ret._internal=G*arg._internal; ret._internal=G*arg._internal;
return ret; return ret;
} }
template<class vtype,int N> inline auto operator * ( const Gamma &G,const iMatrix<vtype,N> &arg) -> template<class vtype,int N> inline auto operator * ( const Gamma &G,const iMatrix<vtype,N> &arg) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type
{ {
iMatrix<vtype,N> ret; iMatrix<vtype,N> ret;
ret._internal=G*arg._internal; ret._internal=G*arg._internal;
@ -356,7 +358,7 @@ namespace QCD {
//right multiply //right multiply
template<class vtype> inline auto operator * (const iScalar<vtype> &arg, const Gamma &G) -> template<class vtype> inline auto operator * (const iScalar<vtype> &arg, const Gamma &G) ->
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type
{ {
iScalar<vtype> ret; iScalar<vtype> ret;
@ -364,14 +366,14 @@ namespace QCD {
return ret; return ret;
} }
template<class vtype,int N> inline auto operator * (const iVector<vtype,N> &arg, const Gamma &G) -> template<class vtype,int N> inline auto operator * (const iVector<vtype,N> &arg, const Gamma &G) ->
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type
{ {
iVector<vtype,N> ret; iVector<vtype,N> ret;
ret._internal=arg._internal*G; ret._internal=arg._internal*G;
return ret; return ret;
} }
template<class vtype,int N> inline auto operator * (const iMatrix<vtype,N> &arg, const Gamma &G) -> template<class vtype,int N> inline auto operator * (const iMatrix<vtype,N> &arg, const Gamma &G) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type
{ {
iMatrix<vtype,N> ret; iMatrix<vtype,N> ret;
ret._internal=arg._internal*G; ret._internal=arg._internal*G;
@ -382,7 +384,7 @@ namespace QCD {
// When we hit the spin index this matches and we stop // When we hit the spin index this matches and we stop
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
template<class vtype> inline auto operator * ( const Gamma &G,const iMatrix<vtype,Ns> &arg) -> template<class vtype> inline auto operator * ( const Gamma &G,const iMatrix<vtype,Ns> &arg) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,Ns>,SpinIndex>::value,iMatrix<vtype,Ns> >::type typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,Ns>,SpinorIndex>::value,iMatrix<vtype,Ns> >::type
{ {
iMatrix<vtype,Ns> ret; iMatrix<vtype,Ns> ret;
switch (G._g) { switch (G._g) {
@ -430,7 +432,7 @@ namespace QCD {
} }
// Could have used type trait for Matrix/vector and then an enable if to share code // Could have used type trait for Matrix/vector and then an enable if to share code
template<class vtype> inline auto operator * ( const Gamma &G,const iVector<vtype,Ns> &arg) -> template<class vtype> inline auto operator * ( const Gamma &G,const iVector<vtype,Ns> &arg) ->
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type
{ {
iVector<vtype,Ns> ret; iVector<vtype,Ns> ret;
switch (G._g) { switch (G._g) {
@ -478,7 +480,7 @@ namespace QCD {
} }
template<class vtype> inline auto operator * (const iMatrix<vtype,Ns> &arg, const Gamma &G) -> template<class vtype> inline auto operator * (const iMatrix<vtype,Ns> &arg, const Gamma &G) ->
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,Ns>,SpinIndex>::value,iMatrix<vtype,Ns> >::type typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,Ns>,SpinorIndex>::value,iMatrix<vtype,Ns> >::type
{ {
iMatrix<vtype,Ns> ret; iMatrix<vtype,Ns> ret;
switch (G._g) { switch (G._g) {

View File

@ -42,17 +42,18 @@ namespace QCD {
* -i 0 0 0 * -i 0 0 0
*/ */
template<class vtype> strong_inline void template<class vtype> strong_inline void
spProjXp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) spProjXp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
// To fail is not to err (Cryptic clue: suggest to Google SFINAE ;) ) // To fail is not to err (Cryptic clue: suggest to Google SFINAE ;) )
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)+timesI(fspin(3)); hspin(0)=fspin(0)+timesI(fspin(3));
hspin(1)=fspin(1)+timesI(fspin(2)); hspin(1)=fspin(1)+timesI(fspin(2));
} }
template<class vtype> strong_inline void spProjXm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjXm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)-timesI(fspin(3)); hspin(0)=fspin(0)-timesI(fspin(3));
hspin(1)=fspin(1)-timesI(fspin(2)); hspin(1)=fspin(1)-timesI(fspin(2));
} }
@ -63,13 +64,13 @@ namespace QCD {
// -1 0 0 0 // -1 0 0 0
template<class vtype> strong_inline void spProjYp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjYp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)-fspin(3); hspin(0)=fspin(0)-fspin(3);
hspin(1)=fspin(1)+fspin(2); hspin(1)=fspin(1)+fspin(2);
} }
template<class vtype> strong_inline void spProjYm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjYm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)+fspin(3); hspin(0)=fspin(0)+fspin(3);
hspin(1)=fspin(1)-fspin(2); hspin(1)=fspin(1)-fspin(2);
} }
@ -81,13 +82,13 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spProjZp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjZp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)+timesI(fspin(2)); hspin(0)=fspin(0)+timesI(fspin(2));
hspin(1)=fspin(1)-timesI(fspin(3)); hspin(1)=fspin(1)-timesI(fspin(3));
} }
template<class vtype> strong_inline void spProjZm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjZm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)-timesI(fspin(2)); hspin(0)=fspin(0)-timesI(fspin(2));
hspin(1)=fspin(1)+timesI(fspin(3)); hspin(1)=fspin(1)+timesI(fspin(3));
} }
@ -99,13 +100,13 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spProjTp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjTp (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)+fspin(2); hspin(0)=fspin(0)+fspin(2);
hspin(1)=fspin(1)+fspin(3); hspin(1)=fspin(1)+fspin(3);
} }
template<class vtype> strong_inline void spProjTm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProjTm (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0)-fspin(2); hspin(0)=fspin(0)-fspin(2);
hspin(1)=fspin(1)-fspin(3); hspin(1)=fspin(1)-fspin(3);
} }
@ -118,13 +119,13 @@ namespace QCD {
template<class vtype> strong_inline void spProj5p (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProj5p (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(0); hspin(0)=fspin(0);
hspin(1)=fspin(1); hspin(1)=fspin(1);
} }
template<class vtype> strong_inline void spProj5m (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProj5m (iVector<vtype,Nhs> &hspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
hspin(0)=fspin(2); hspin(0)=fspin(2);
hspin(1)=fspin(3); hspin(1)=fspin(3);
} }
@ -132,7 +133,7 @@ namespace QCD {
// template<class vtype> strong_inline void fspProj5p (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin) // template<class vtype> strong_inline void fspProj5p (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin)
template<class vtype> strong_inline void spProj5p (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProj5p (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
rfspin(0)=fspin(0); rfspin(0)=fspin(0);
rfspin(1)=fspin(1); rfspin(1)=fspin(1);
rfspin(2)=zero; rfspin(2)=zero;
@ -141,7 +142,7 @@ namespace QCD {
// template<class vtype> strong_inline void fspProj5m (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin) // template<class vtype> strong_inline void fspProj5m (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin)
template<class vtype> strong_inline void spProj5m (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin) template<class vtype> strong_inline void spProj5m (iVector<vtype,Ns> &rfspin,const iVector<vtype,Ns> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
rfspin(0)=zero; rfspin(0)=zero;
rfspin(1)=zero; rfspin(1)=zero;
rfspin(2)=fspin(2); rfspin(2)=fspin(2);
@ -159,7 +160,7 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spReconXp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconXp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=timesMinusI(hspin(1)); fspin(2)=timesMinusI(hspin(1));
@ -167,7 +168,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void spReconXm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconXm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=timesI(hspin(1)); fspin(2)=timesI(hspin(1));
@ -175,7 +176,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconXp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconXp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)-=timesI(hspin(1)); fspin(2)-=timesI(hspin(1));
@ -183,7 +184,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconXm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconXm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)+=timesI(hspin(1)); fspin(2)+=timesI(hspin(1));
@ -197,7 +198,7 @@ namespace QCD {
template<class vtype> strong_inline void spReconYp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconYp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)= hspin(1); fspin(2)= hspin(1);
@ -205,7 +206,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void spReconYm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconYm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=-hspin(1); fspin(2)=-hspin(1);
@ -213,7 +214,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconYp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconYp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)+=hspin(1); fspin(2)+=hspin(1);
@ -221,7 +222,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconYm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconYm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)-=hspin(1); fspin(2)-=hspin(1);
@ -236,7 +237,7 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spReconZp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconZp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=timesMinusI(hspin(0)); fspin(2)=timesMinusI(hspin(0));
@ -244,7 +245,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void spReconZm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconZm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)= timesI(hspin(0)); fspin(2)= timesI(hspin(0));
@ -252,7 +253,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconZp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconZp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)-=timesI(hspin(0)); fspin(2)-=timesI(hspin(0));
@ -260,7 +261,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconZm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconZm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)+=timesI(hspin(0)); fspin(2)+=timesI(hspin(0));
@ -274,7 +275,7 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spReconTp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconTp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=hspin(0); fspin(2)=hspin(0);
@ -282,7 +283,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void spReconTm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spReconTm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0); fspin(0)=hspin(0);
fspin(1)=hspin(1); fspin(1)=hspin(1);
fspin(2)=-hspin(0); fspin(2)=-hspin(0);
@ -290,7 +291,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconTp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconTp (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)+=hspin(0); fspin(2)+=hspin(0);
@ -298,7 +299,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumReconTm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumReconTm (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0); fspin(0)+=hspin(0);
fspin(1)+=hspin(1); fspin(1)+=hspin(1);
fspin(2)-=hspin(0); fspin(2)-=hspin(0);
@ -312,7 +313,7 @@ namespace QCD {
*/ */
template<class vtype> strong_inline void spRecon5p (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spRecon5p (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=hspin(0)+hspin(0); // add is lower latency than mul fspin(0)=hspin(0)+hspin(0); // add is lower latency than mul
fspin(1)=hspin(1)+hspin(1); // probably no measurable diffence though fspin(1)=hspin(1)+hspin(1); // probably no measurable diffence though
fspin(2)=zero; fspin(2)=zero;
@ -320,7 +321,7 @@ namespace QCD {
} }
template<class vtype> strong_inline void spRecon5m (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void spRecon5m (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)=zero; fspin(0)=zero;
fspin(1)=zero; fspin(1)=zero;
fspin(2)=hspin(0)+hspin(0); fspin(2)=hspin(0)+hspin(0);
@ -328,13 +329,13 @@ namespace QCD {
} }
template<class vtype> strong_inline void accumRecon5p (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumRecon5p (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(0)+=hspin(0)+hspin(0); fspin(0)+=hspin(0)+hspin(0);
fspin(1)+=hspin(1)+hspin(1); fspin(1)+=hspin(1)+hspin(1);
} }
template<class vtype> strong_inline void accumRecon5m (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin) template<class vtype> strong_inline void accumRecon5m (iVector<vtype,Ns> &fspin,const iVector<vtype,Nhs> &hspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinIndex>::value,iVector<vtype,Ns> >::type *SFINAE; typename std::enable_if<matchGridTensorIndex<iVector<vtype,Ns>,SpinorIndex>::value,iVector<vtype,Ns> >::type *SFINAE;
fspin(2)+=hspin(0)+hspin(0); fspin(2)+=hspin(0)+hspin(0);
fspin(3)+=hspin(1)+hspin(1); fspin(3)+=hspin(1)+hspin(1);
} }
@ -348,19 +349,19 @@ namespace QCD {
////////// //////////
template<class rtype,class vtype> strong_inline void spProjXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjXp(hspin._internal,fspin._internal); spProjXp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjXp(hspin._internal[i],fspin._internal[i]); spProjXp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjXp(hspin._internal[i][j],fspin._internal[i][j]); spProjXp(hspin._internal[i][j],fspin._internal[i][j]);
@ -370,19 +371,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconXp(hspin._internal,fspin._internal); spReconXp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconXp(hspin._internal[i],fspin._internal[i]); spReconXp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconXp(hspin._internal[i][j],fspin._internal[i][j]); spReconXp(hspin._internal[i][j],fspin._internal[i][j]);
@ -391,19 +392,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconXp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconXp(hspin._internal,fspin._internal); accumReconXp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconXp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconXp(hspin._internal[i],fspin._internal[i]); accumReconXp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconXp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconXp(hspin._internal[i][j],fspin._internal[i][j]); accumReconXp(hspin._internal[i][j],fspin._internal[i][j]);
@ -417,19 +418,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjXm(hspin._internal,fspin._internal); spProjXm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjXm(hspin._internal[i],fspin._internal[i]); spProjXm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjXm(hspin._internal[i][j],fspin._internal[i][j]); spProjXm(hspin._internal[i][j],fspin._internal[i][j]);
@ -439,19 +440,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconXm(hspin._internal,fspin._internal); spReconXm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconXm(hspin._internal[i],fspin._internal[i]); spReconXm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconXm(hspin._internal[i][j],fspin._internal[i][j]); spReconXm(hspin._internal[i][j],fspin._internal[i][j]);
@ -460,19 +461,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconXm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconXm(hspin._internal,fspin._internal); accumReconXm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconXm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconXm(hspin._internal[i],fspin._internal[i]); accumReconXm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconXm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconXm(hspin._internal[i][j],fspin._internal[i][j]); accumReconXm(hspin._internal[i][j],fspin._internal[i][j]);
@ -486,19 +487,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjYp(hspin._internal,fspin._internal); spProjYp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjYp(hspin._internal[i],fspin._internal[i]); spProjYp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjYp(hspin._internal[i][j],fspin._internal[i][j]); spProjYp(hspin._internal[i][j],fspin._internal[i][j]);
@ -508,19 +509,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconYp(hspin._internal,fspin._internal); spReconYp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconYp(hspin._internal[i],fspin._internal[i]); spReconYp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconYp(hspin._internal[i][j],fspin._internal[i][j]); spReconYp(hspin._internal[i][j],fspin._internal[i][j]);
@ -529,19 +530,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconYp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconYp(hspin._internal,fspin._internal); accumReconYp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconYp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconYp(hspin._internal[i],fspin._internal[i]); accumReconYp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconYp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconYp(hspin._internal[i][j],fspin._internal[i][j]); accumReconYp(hspin._internal[i][j],fspin._internal[i][j]);
@ -554,19 +555,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjYm(hspin._internal,fspin._internal); spProjYm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjYm(hspin._internal[i],fspin._internal[i]); spProjYm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjYm(hspin._internal[i][j],fspin._internal[i][j]); spProjYm(hspin._internal[i][j],fspin._internal[i][j]);
@ -576,19 +577,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconYm(hspin._internal,fspin._internal); spReconYm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconYm(hspin._internal[i],fspin._internal[i]); spReconYm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconYm(hspin._internal[i][j],fspin._internal[i][j]); spReconYm(hspin._internal[i][j],fspin._internal[i][j]);
@ -597,19 +598,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconYm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconYm(hspin._internal,fspin._internal); accumReconYm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconYm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconYm(hspin._internal[i],fspin._internal[i]); accumReconYm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconYm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconYm(hspin._internal[i][j],fspin._internal[i][j]); accumReconYm(hspin._internal[i][j],fspin._internal[i][j]);
@ -622,19 +623,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjZp(hspin._internal,fspin._internal); spProjZp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjZp(hspin._internal[i],fspin._internal[i]); spProjZp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjZp(hspin._internal[i][j],fspin._internal[i][j]); spProjZp(hspin._internal[i][j],fspin._internal[i][j]);
@ -644,19 +645,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconZp(hspin._internal,fspin._internal); spReconZp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconZp(hspin._internal[i],fspin._internal[i]); spReconZp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconZp(hspin._internal[i][j],fspin._internal[i][j]); spReconZp(hspin._internal[i][j],fspin._internal[i][j]);
@ -665,19 +666,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconZp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconZp(hspin._internal,fspin._internal); accumReconZp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconZp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconZp(hspin._internal[i],fspin._internal[i]); accumReconZp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconZp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconZp(hspin._internal[i][j],fspin._internal[i][j]); accumReconZp(hspin._internal[i][j],fspin._internal[i][j]);
@ -690,19 +691,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjZm(hspin._internal,fspin._internal); spProjZm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjZm(hspin._internal[i],fspin._internal[i]); spProjZm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjZm(hspin._internal[i][j],fspin._internal[i][j]); spProjZm(hspin._internal[i][j],fspin._internal[i][j]);
@ -712,19 +713,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconZm(hspin._internal,fspin._internal); spReconZm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconZm(hspin._internal[i],fspin._internal[i]); spReconZm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconZm(hspin._internal[i][j],fspin._internal[i][j]); spReconZm(hspin._internal[i][j],fspin._internal[i][j]);
@ -733,19 +734,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconZm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconZm(hspin._internal,fspin._internal); accumReconZm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconZm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconZm(hspin._internal[i],fspin._internal[i]); accumReconZm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconZm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconZm(hspin._internal[i][j],fspin._internal[i][j]); accumReconZm(hspin._internal[i][j],fspin._internal[i][j]);
@ -758,19 +759,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjTp(hspin._internal,fspin._internal); spProjTp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjTp(hspin._internal[i],fspin._internal[i]); spProjTp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjTp(hspin._internal[i][j],fspin._internal[i][j]); spProjTp(hspin._internal[i][j],fspin._internal[i][j]);
@ -780,19 +781,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconTp(hspin._internal,fspin._internal); spReconTp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconTp(hspin._internal[i],fspin._internal[i]); spReconTp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconTp(hspin._internal[i][j],fspin._internal[i][j]); spReconTp(hspin._internal[i][j],fspin._internal[i][j]);
@ -801,19 +802,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconTp (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconTp(hspin._internal,fspin._internal); accumReconTp(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconTp (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconTp(hspin._internal[i],fspin._internal[i]); accumReconTp(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconTp (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconTp(hspin._internal[i][j],fspin._internal[i][j]); accumReconTp(hspin._internal[i][j],fspin._internal[i][j]);
@ -826,19 +827,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProjTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProjTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProjTm(hspin._internal,fspin._internal); spProjTm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProjTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProjTm(hspin._internal[i],fspin._internal[i]); spProjTm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProjTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProjTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProjTm(hspin._internal[i][j],fspin._internal[i][j]); spProjTm(hspin._internal[i][j],fspin._internal[i][j]);
@ -848,19 +849,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spReconTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spReconTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spReconTm(hspin._internal,fspin._internal); spReconTm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spReconTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spReconTm(hspin._internal[i],fspin._internal[i]); spReconTm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spReconTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spReconTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spReconTm(hspin._internal[i][j],fspin._internal[i][j]); spReconTm(hspin._internal[i][j],fspin._internal[i][j]);
@ -869,19 +870,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumReconTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumReconTm (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumReconTm(hspin._internal,fspin._internal); accumReconTm(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumReconTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconTm (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumReconTm(hspin._internal[i],fspin._internal[i]); accumReconTm(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumReconTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumReconTm (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumReconTm(hspin._internal[i][j],fspin._internal[i][j]); accumReconTm(hspin._internal[i][j],fspin._internal[i][j]);
@ -894,19 +895,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProj5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProj5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProj5p(hspin._internal,fspin._internal); spProj5p(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProj5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProj5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProj5p(hspin._internal[i],fspin._internal[i]); spProj5p(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProj5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProj5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProj5p(hspin._internal[i][j],fspin._internal[i][j]); spProj5p(hspin._internal[i][j],fspin._internal[i][j]);
@ -915,19 +916,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spRecon5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spRecon5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spRecon5p(hspin._internal,fspin._internal); spRecon5p(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spRecon5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spRecon5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spRecon5p(hspin._internal[i],fspin._internal[i]); spRecon5p(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spRecon5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spRecon5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spRecon5p(hspin._internal[i][j],fspin._internal[i][j]); spRecon5p(hspin._internal[i][j],fspin._internal[i][j]);
@ -936,19 +937,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumRecon5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumRecon5p (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumRecon5p(hspin._internal,fspin._internal); accumRecon5p(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumRecon5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumRecon5p (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumRecon5p(hspin._internal[i],fspin._internal[i]); accumRecon5p(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumRecon5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumRecon5p (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumRecon5p(hspin._internal[i][j],fspin._internal[i][j]); accumRecon5p(hspin._internal[i][j],fspin._internal[i][j]);
@ -959,13 +960,13 @@ namespace QCD {
// template<class vtype> strong_inline void fspProj5p (iScalar<vtype> &hspin,const iScalar<vtype> &fspin) // template<class vtype> strong_inline void fspProj5p (iScalar<vtype> &hspin,const iScalar<vtype> &fspin)
template<class vtype> strong_inline void spProj5p (iScalar<vtype> &hspin,const iScalar<vtype> &fspin) template<class vtype> strong_inline void spProj5p (iScalar<vtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProj5p(hspin._internal,fspin._internal); spProj5p(hspin._internal,fspin._internal);
} }
// template<class vtype,int N> strong_inline void fspProj5p (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin) // template<class vtype,int N> strong_inline void fspProj5p (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin)
template<class vtype,int N> strong_inline void spProj5p (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin) template<class vtype,int N> strong_inline void spProj5p (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProj5p(hspin._internal[i],fspin._internal[i]); spProj5p(hspin._internal[i],fspin._internal[i]);
} }
@ -973,7 +974,7 @@ namespace QCD {
// template<class vtype,int N> strong_inline void fspProj5p (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin) // template<class vtype,int N> strong_inline void fspProj5p (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin)
template<class vtype,int N> strong_inline void spProj5p (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class vtype,int N> strong_inline void spProj5p (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProj5p(hspin._internal[i][j],fspin._internal[i][j]); spProj5p(hspin._internal[i][j],fspin._internal[i][j]);
@ -986,19 +987,19 @@ namespace QCD {
//////// ////////
template<class rtype,class vtype> strong_inline void spProj5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spProj5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProj5m(hspin._internal,fspin._internal); spProj5m(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spProj5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProj5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProj5m(hspin._internal[i],fspin._internal[i]); spProj5m(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spProj5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spProj5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProj5m(hspin._internal[i][j],fspin._internal[i][j]); spProj5m(hspin._internal[i][j],fspin._internal[i][j]);
@ -1007,19 +1008,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void spRecon5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void spRecon5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spRecon5m(hspin._internal,fspin._internal); spRecon5m(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void spRecon5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spRecon5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spRecon5m(hspin._internal[i],fspin._internal[i]); spRecon5m(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void spRecon5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void spRecon5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spRecon5m(hspin._internal[i][j],fspin._internal[i][j]); spRecon5m(hspin._internal[i][j],fspin._internal[i][j]);
@ -1028,19 +1029,19 @@ namespace QCD {
template<class rtype,class vtype> strong_inline void accumRecon5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin) template<class rtype,class vtype> strong_inline void accumRecon5m (iScalar<rtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
accumRecon5m(hspin._internal,fspin._internal); accumRecon5m(hspin._internal,fspin._internal);
} }
template<class rtype,class vtype,int N> strong_inline void accumRecon5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumRecon5m (iVector<rtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
accumRecon5m(hspin._internal[i],fspin._internal[i]); accumRecon5m(hspin._internal[i],fspin._internal[i]);
} }
} }
template<class rtype,class vtype,int N> strong_inline void accumRecon5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class rtype,class vtype,int N> strong_inline void accumRecon5m (iMatrix<rtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
accumRecon5m(hspin._internal[i][j],fspin._internal[i][j]); accumRecon5m(hspin._internal[i][j],fspin._internal[i][j]);
@ -1052,13 +1053,13 @@ namespace QCD {
// template<class vtype> strong_inline void fspProj5m (iScalar<vtype> &hspin,const iScalar<vtype> &fspin) // template<class vtype> strong_inline void fspProj5m (iScalar<vtype> &hspin,const iScalar<vtype> &fspin)
template<class vtype> strong_inline void spProj5m (iScalar<vtype> &hspin,const iScalar<vtype> &fspin) template<class vtype> strong_inline void spProj5m (iScalar<vtype> &hspin,const iScalar<vtype> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinIndex>::notvalue,iScalar<vtype> >::type *temp; typename std::enable_if<matchGridTensorIndex<iScalar<vtype>,SpinorIndex>::notvalue,iScalar<vtype> >::type *temp;
spProj5m(hspin._internal,fspin._internal); spProj5m(hspin._internal,fspin._internal);
} }
// template<class vtype,int N> strong_inline void fspProj5m (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin) // template<class vtype,int N> strong_inline void fspProj5m (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin)
template<class vtype,int N> strong_inline void spProj5m (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin) template<class vtype,int N> strong_inline void spProj5m (iVector<vtype,N> &hspin,iVector<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinIndex>::notvalue,iVector<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iVector<vtype,N>,SpinorIndex>::notvalue,iVector<vtype,N> >::type *temp;
for(int i=0;i<N;i++) { for(int i=0;i<N;i++) {
spProj5m(hspin._internal[i],fspin._internal[i]); spProj5m(hspin._internal[i],fspin._internal[i]);
} }
@ -1066,7 +1067,7 @@ namespace QCD {
// template<class vtype,int N> strong_inline void fspProj5m (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin) // template<class vtype,int N> strong_inline void fspProj5m (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin)
template<class vtype,int N> strong_inline void spProj5m (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin) template<class vtype,int N> strong_inline void spProj5m (iMatrix<vtype,N> &hspin,iMatrix<vtype,N> &fspin)
{ {
typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinIndex>::notvalue,iMatrix<vtype,N> >::type *temp; typename std::enable_if<matchGridTensorIndex<iMatrix<vtype,N>,SpinorIndex>::notvalue,iMatrix<vtype,N> >::type *temp;
for(int i=0;i<N;i++){ for(int i=0;i<N;i++){
for(int j=0;j<N;j++){ for(int j=0;j<N;j++){
spProj5m(hspin._internal[i][j],fspin._internal[i][j]); spProj5m(hspin._internal[i][j],fspin._internal[i][j]);

View File

@ -45,7 +45,7 @@ public:
std::vector<GaugeMat> U(4,Umu._grid); std::vector<GaugeMat> U(4,Umu._grid);
for(int mu=0;mu<Nd;mu++){ for(int mu=0;mu<Nd;mu++){
U[mu] = peekIndex<LorentzIndex>(Umu,mu); U[mu] = PeekIndex<LorentzIndex>(Umu,mu);
} }
LatticeComplex Plaq(Umu._grid); LatticeComplex Plaq(Umu._grid);
@ -78,7 +78,7 @@ public:
std::vector<GaugeMat> U(4,grid); std::vector<GaugeMat> U(4,grid);
for(int d=0;d<Nd;d++){ for(int d=0;d<Nd;d++){
U[d] = peekIndex<LorentzIndex>(Umu,d); U[d] = PeekIndex<LorentzIndex>(Umu,d);
} }
staple = zero; staple = zero;