From 4491d87766110f73825aee1ea6d313602f6a9fe5 Mon Sep 17 00:00:00 2001 From: paboyle Date: Sun, 14 Jan 2018 22:04:21 +0000 Subject: [PATCH] Namespace --- lib/qcd/spin/TwoSpinor.h | 1739 +++++++++++++++++++------------------- 1 file changed, 870 insertions(+), 869 deletions(-) diff --git a/lib/qcd/spin/TwoSpinor.h b/lib/qcd/spin/TwoSpinor.h index 76cdbcf8..3d2143e0 100644 --- a/lib/qcd/spin/TwoSpinor.h +++ b/lib/qcd/spin/TwoSpinor.h @@ -1,4 +1,4 @@ - /************************************************************************************* +/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid @@ -24,1067 +24,1068 @@ Author: Peter Boyle 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. See the full license in the file "LICENSE" in the top level distribution directory - *************************************************************************************/ - /* END LEGAL */ +*************************************************************************************/ +/* END LEGAL */ #ifndef GRID_QCD_TWOSPIN_H #define GRID_QCD_TWOSPIN_H -namespace Grid{ -namespace QCD { - ////////////////////////////////////////////////////////////////////////////////////////////////////// - // Normalisation alert; the g5 project is 1/2(1+-G5) - // the xyzt projects are (1+-Gxyzt) - // - // * xyzt project - // - // This is because this is how the Wilson operator is normally written as - // (m+4r) - \frac{1}{2} D_{hop} - // and / or - // 1 - \frac{1}{2 m+8r} D_{hop} = 1 - kappa D_{hop} - // - // Note that the free, critical hopping parameter kappa is then 1/8 th for r=1. - // - // However, the xyzt 2spin "projectors" are not really projectors because they do not - // square to 1, however the ChiralProjector is a true projector. - // - // For this reason there is NO provision in Grid of a four spinor result from the - // xyzt projectors. They are intended to be used only in combination with "reconstruct" in the - // wilson dirac operator and closely related actions. - // - // I also do NOT provide lattice wide operators of these, since the dirac operator is best implemented - // via Stencils and single site variants will be needed only for the cache friendly high perf dirac operator. - // - // * chiral project - // - // Both four spinor and two spinor result variants are provided. - // - // The four spinor project will be recursively provided to Lattice wide routines, and likely used in - // the domain wall and mobius implementations. - // - ////////////////////////////////////////////////////////////////////////////////////////////////////// +NAMESPACE_BEGIN(Grid); - /* Gx - * 0 0 0 i [0]+-i[3] - * 0 0 i 0 [1]+-i[2] - * 0 -i 0 0 - * -i 0 0 0 - */ - // To fail is not to err (Cryptic clue: suggest to Google SFINAE ;) ) - template > = 0> strong_inline void spProjXp (iVector &hspin,const iVector &fspin) - { - hspin(0)=fspin(0)+timesI(fspin(3)); - hspin(1)=fspin(1)+timesI(fspin(2)); - } - template > = 0> strong_inline void spProjXm (iVector &hspin,const iVector &fspin) - { - hspin(0)=fspin(0)-timesI(fspin(3)); - hspin(1)=fspin(1)-timesI(fspin(2)); - } +////////////////////////////////////////////////////////////////////////////////////////////////////// +// Normalisation alert; the g5 project is 1/2(1+-G5) +// the xyzt projects are (1+-Gxyzt) +// +// * xyzt project +// +// This is because this is how the Wilson operator is normally written as +// (m+4r) - \frac{1}{2} D_{hop} +// and / or +// 1 - \frac{1}{2 m+8r} D_{hop} = 1 - kappa D_{hop} +// +// Note that the free, critical hopping parameter kappa is then 1/8 th for r=1. +// +// However, the xyzt 2spin "projectors" are not really projectors because they do not +// square to 1, however the ChiralProjector is a true projector. +// +// For this reason there is NO provision in Grid of a four spinor result from the +// xyzt projectors. They are intended to be used only in combination with "reconstruct" in the +// wilson dirac operator and closely related actions. +// +// I also do NOT provide lattice wide operators of these, since the dirac operator is best implemented +// via Stencils and single site variants will be needed only for the cache friendly high perf dirac operator. +// +// * chiral project +// +// Both four spinor and two spinor result variants are provided. +// +// The four spinor project will be recursively provided to Lattice wide routines, and likely used in +// the domain wall and mobius implementations. +// +////////////////////////////////////////////////////////////////////////////////////////////////////// - // 0 0 0 -1 [0] -+ [3] - // 0 0 1 0 [1] +- [2] - // 0 1 0 0 - // -1 0 0 0 - template > = 0> strong_inline void spProjYp (iVector &hspin,const iVector &fspin) - { - hspin(0)=fspin(0)-fspin(3); - hspin(1)=fspin(1)+fspin(2); - } - template > = 0> strong_inline void spProjYm (iVector &hspin,const iVector &fspin) - { - hspin(0)=fspin(0)+fspin(3); - hspin(1)=fspin(1)-fspin(2); - } - /*Gz - * 0 0 i 0 [0]+-i[2] - * 0 0 0 -i [1]-+i[3] - * -i 0 0 0 - * 0 i 0 0 - */ - template > = 0> strong_inline void spProjZp (iVector &hspin,const iVector &fspin) - { - hspin(0)=fspin(0)+timesI(fspin(2)); - hspin(1)=fspin(1)-timesI(fspin(3)); - } - template > = 0> strong_inline void spProjZm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - hspin(0)=fspin(0)-timesI(fspin(2)); - hspin(1)=fspin(1)+timesI(fspin(3)); - } - /*Gt - * 0 0 1 0 [0]+-[2] - * 0 0 0 1 [1]+-[3] - * 1 0 0 0 - * 0 1 0 0 - */ - template > = 0> strong_inline void spProjTp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - hspin(0)=fspin(0)+fspin(2); - hspin(1)=fspin(1)+fspin(3); - } - template > = 0> strong_inline void spProjTm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - hspin(0)=fspin(0)-fspin(2); - hspin(1)=fspin(1)-fspin(3); - } - /*G5 - * 1 0 0 0 - * 0 1 0 0 - * 0 0 -1 0 - * 0 0 0 -1 - */ +/* Gx + * 0 0 0 i [0]+-i[3] + * 0 0 i 0 [1]+-i[2] + * 0 -i 0 0 + * -i 0 0 0 + */ - template > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - hspin(0)=fspin(0); - hspin(1)=fspin(1); - } +// To fail is not to err (Cryptic clue: suggest to Google SFINAE ;) ) +template > = 0> strong_inline void spProjXp (iVector &hspin,const iVector &fspin) +{ + hspin(0)=fspin(0)+timesI(fspin(3)); + hspin(1)=fspin(1)+timesI(fspin(2)); +} +template > = 0> strong_inline void spProjXm (iVector &hspin,const iVector &fspin) +{ + hspin(0)=fspin(0)-timesI(fspin(3)); + hspin(1)=fspin(1)-timesI(fspin(2)); +} - template > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - hspin(0)=fspin(2); - hspin(1)=fspin(3); - } +// 0 0 0 -1 [0] -+ [3] +// 0 0 1 0 [1] +- [2] +// 0 1 0 0 +// -1 0 0 0 +template > = 0> strong_inline void spProjYp (iVector &hspin,const iVector &fspin) +{ + hspin(0)=fspin(0)-fspin(3); + hspin(1)=fspin(1)+fspin(2); +} +template > = 0> strong_inline void spProjYm (iVector &hspin,const iVector &fspin) +{ + hspin(0)=fspin(0)+fspin(3); + hspin(1)=fspin(1)-fspin(2); +} +/*Gz + * 0 0 i 0 [0]+-i[2] + * 0 0 0 -i [1]-+i[3] + * -i 0 0 0 + * 0 i 0 0 + */ +template > = 0> strong_inline void spProjZp (iVector &hspin,const iVector &fspin) +{ + hspin(0)=fspin(0)+timesI(fspin(2)); + hspin(1)=fspin(1)-timesI(fspin(3)); +} +template > = 0> strong_inline void spProjZm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + hspin(0)=fspin(0)-timesI(fspin(2)); + hspin(1)=fspin(1)+timesI(fspin(3)); +} +/*Gt + * 0 0 1 0 [0]+-[2] + * 0 0 0 1 [1]+-[3] + * 1 0 0 0 + * 0 1 0 0 + */ +template > = 0> strong_inline void spProjTp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + hspin(0)=fspin(0)+fspin(2); + hspin(1)=fspin(1)+fspin(3); +} +template > = 0> strong_inline void spProjTm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + hspin(0)=fspin(0)-fspin(2); + hspin(1)=fspin(1)-fspin(3); +} +/*G5 + * 1 0 0 0 + * 0 1 0 0 + * 0 0 -1 0 + * 0 0 0 -1 + */ + +template > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + hspin(0)=fspin(0); + hspin(1)=fspin(1); +} + +template > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + hspin(0)=fspin(2); + hspin(1)=fspin(3); +} - // template strong_inline void fspProj5p (iVector &rfspin,const iVector &fspin) - template > = 0> strong_inline void spProj5p (iVector &rfspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - rfspin(0)=fspin(0); - rfspin(1)=fspin(1); - rfspin(2)=zero; - rfspin(3)=zero; - } - // template strong_inline void fspProj5m (iVector &rfspin,const iVector &fspin) - template > = 0> strong_inline void spProj5m (iVector &rfspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - rfspin(0)=zero; - rfspin(1)=zero; - rfspin(2)=fspin(2); - rfspin(3)=fspin(3); - } +// template strong_inline void fspProj5p (iVector &rfspin,const iVector &fspin) +template > = 0> strong_inline void spProj5p (iVector &rfspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + rfspin(0)=fspin(0); + rfspin(1)=fspin(1); + rfspin(2)=zero; + rfspin(3)=zero; +} +// template strong_inline void fspProj5m (iVector &rfspin,const iVector &fspin) +template > = 0> strong_inline void spProj5m (iVector &rfspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + rfspin(0)=zero; + rfspin(1)=zero; + rfspin(2)=fspin(2); + rfspin(3)=fspin(3); +} - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - // Reconstruction routines to move back again to four spin - //////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /* Gx - * 0 0 0 i [0]+-i[3] - * 0 0 i 0 [1]+-i[2] - * 0 -i 0 0 -i[1]+-[2] == -i ([0]+-i[3]) = -i (1) - * -i 0 0 0 -i[0]+-[3] == -i ([1]+-i[2]) = -i (0) - */ - template > = 0> strong_inline void spReconXp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=timesMinusI(hspin(1)); - fspin(3)=timesMinusI(hspin(0)); - } - template > = 0> strong_inline void spReconXm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=timesI(hspin(1)); - fspin(3)=timesI(hspin(0)); - } - template > = 0> strong_inline void accumReconXp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)-=timesI(hspin(1)); - fspin(3)-=timesI(hspin(0)); - } - template > = 0> strong_inline void accumReconXm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)+=timesI(hspin(1)); - fspin(3)+=timesI(hspin(0)); - } +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Reconstruction routines to move back again to four spin +//////////////////////////////////////////////////////////////////////////////////////////////////////////////// +/* Gx + * 0 0 0 i [0]+-i[3] + * 0 0 i 0 [1]+-i[2] + * 0 -i 0 0 -i[1]+-[2] == -i ([0]+-i[3]) = -i (1) + * -i 0 0 0 -i[0]+-[3] == -i ([1]+-i[2]) = -i (0) + */ +template > = 0> strong_inline void spReconXp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=timesMinusI(hspin(1)); + fspin(3)=timesMinusI(hspin(0)); +} +template > = 0> strong_inline void spReconXm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=timesI(hspin(1)); + fspin(3)=timesI(hspin(0)); +} +template > = 0> strong_inline void accumReconXp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)-=timesI(hspin(1)); + fspin(3)-=timesI(hspin(0)); +} +template > = 0> strong_inline void accumReconXm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)+=timesI(hspin(1)); + fspin(3)+=timesI(hspin(0)); +} - // 0 0 0 -1 [0] -+ [3] - // 0 0 1 0 [1] +- [2] - // 0 1 0 0 == 1(1) - // -1 0 0 0 ==-1(0) +// 0 0 0 -1 [0] -+ [3] +// 0 0 1 0 [1] +- [2] +// 0 1 0 0 == 1(1) +// -1 0 0 0 ==-1(0) - template > = 0> strong_inline void spReconYp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)= hspin(1); - fspin(3)=-hspin(0);//Unary minus? - } - template > = 0> strong_inline void spReconYm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=-hspin(1); - fspin(3)= hspin(0); - } - template > = 0> strong_inline void accumReconYp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)+=hspin(1); - fspin(3)-=hspin(0); - } - template > = 0> strong_inline void accumReconYm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)-=hspin(1); - fspin(3)+=hspin(0); - } +template > = 0> strong_inline void spReconYp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)= hspin(1); + fspin(3)=-hspin(0);//Unary minus? +} +template > = 0> strong_inline void spReconYm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=-hspin(1); + fspin(3)= hspin(0); +} +template > = 0> strong_inline void accumReconYp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)+=hspin(1); + fspin(3)-=hspin(0); +} +template > = 0> strong_inline void accumReconYm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)-=hspin(1); + fspin(3)+=hspin(0); +} - /*Gz - * 0 0 i 0 [0]+-i[2] - * 0 0 0 -i [1]-+i[3] - * -i 0 0 0 => -i (0) - * 0 i 0 0 => i (1) - */ - template > = 0> strong_inline void spReconZp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=timesMinusI(hspin(0)); - fspin(3)=timesI(hspin(1)); - } - template > = 0> strong_inline void spReconZm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)= timesI(hspin(0)); - fspin(3)=timesMinusI(hspin(1)); - } - template > = 0> strong_inline void accumReconZp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)-=timesI(hspin(0)); - fspin(3)+=timesI(hspin(1)); - } - template > = 0> strong_inline void accumReconZm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)+=timesI(hspin(0)); - fspin(3)-=timesI(hspin(1)); - } - /*Gt - * 0 0 1 0 [0]+-[2] - * 0 0 0 1 [1]+-[3] - * 1 0 0 0 => (0) - * 0 1 0 0 => (1) - */ - template > = 0> strong_inline void spReconTp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=hspin(0); - fspin(3)=hspin(1); - } - template > = 0> strong_inline void spReconTm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0); - fspin(1)=hspin(1); - fspin(2)=-hspin(0); - fspin(3)=-hspin(1); - } - template > = 0> strong_inline void accumReconTp (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)+=hspin(0); - fspin(3)+=hspin(1); - } - template > = 0> strong_inline void accumReconTm (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0); - fspin(1)+=hspin(1); - fspin(2)-=hspin(0); - fspin(3)-=hspin(1); - } - /*G5 - * 1 0 0 0 - * 0 1 0 0 - * 0 0 -1 0 - * 0 0 0 -1 - */ - template > = 0> strong_inline void spRecon5p (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=hspin(0)+hspin(0); // add is lower latency than mul - fspin(1)=hspin(1)+hspin(1); // probably no measurable diffence though - fspin(2)=zero; - fspin(3)=zero; - } - template > = 0> strong_inline void spRecon5m (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)=zero; - fspin(1)=zero; - fspin(2)=hspin(0)+hspin(0); - fspin(3)=hspin(1)+hspin(1); - } - template > = 0> strong_inline void accumRecon5p (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(0)+=hspin(0)+hspin(0); - fspin(1)+=hspin(1)+hspin(1); - } - template > = 0> strong_inline void accumRecon5m (iVector &fspin,const iVector &hspin) - { - //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; - fspin(2)+=hspin(0)+hspin(0); - fspin(3)+=hspin(1)+hspin(1); - } +/*Gz + * 0 0 i 0 [0]+-i[2] + * 0 0 0 -i [1]-+i[3] + * -i 0 0 0 => -i (0) + * 0 i 0 0 => i (1) + */ +template > = 0> strong_inline void spReconZp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=timesMinusI(hspin(0)); + fspin(3)=timesI(hspin(1)); +} +template > = 0> strong_inline void spReconZm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)= timesI(hspin(0)); + fspin(3)=timesMinusI(hspin(1)); +} +template > = 0> strong_inline void accumReconZp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)-=timesI(hspin(0)); + fspin(3)+=timesI(hspin(1)); +} +template > = 0> strong_inline void accumReconZm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)+=timesI(hspin(0)); + fspin(3)-=timesI(hspin(1)); +} +/*Gt + * 0 0 1 0 [0]+-[2] + * 0 0 0 1 [1]+-[3] + * 1 0 0 0 => (0) + * 0 1 0 0 => (1) + */ +template > = 0> strong_inline void spReconTp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=hspin(0); + fspin(3)=hspin(1); +} +template > = 0> strong_inline void spReconTm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0); + fspin(1)=hspin(1); + fspin(2)=-hspin(0); + fspin(3)=-hspin(1); +} +template > = 0> strong_inline void accumReconTp (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)+=hspin(0); + fspin(3)+=hspin(1); +} +template > = 0> strong_inline void accumReconTm (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0); + fspin(1)+=hspin(1); + fspin(2)-=hspin(0); + fspin(3)-=hspin(1); +} +/*G5 + * 1 0 0 0 + * 0 1 0 0 + * 0 0 -1 0 + * 0 0 0 -1 + */ +template > = 0> strong_inline void spRecon5p (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=hspin(0)+hspin(0); // add is lower latency than mul + fspin(1)=hspin(1)+hspin(1); // probably no measurable diffence though + fspin(2)=zero; + fspin(3)=zero; +} +template > = 0> strong_inline void spRecon5m (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)=zero; + fspin(1)=zero; + fspin(2)=hspin(0)+hspin(0); + fspin(3)=hspin(1)+hspin(1); +} +template > = 0> strong_inline void accumRecon5p (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(0)+=hspin(0)+hspin(0); + fspin(1)+=hspin(1)+hspin(1); +} +template > = 0> strong_inline void accumRecon5m (iVector &fspin,const iVector &hspin) +{ + //typename std::enable_if,SpinorIndex>::value,iVector >::type *SFINAE; + fspin(2)+=hspin(0)+hspin(0); + fspin(3)+=hspin(1)+hspin(1); +} - ////////////////////////////////////////////////////////////////////////////////////////////// - // Recursively apply these until we hit the spin index - ////////////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////////////// +// Recursively apply these until we hit the spin index +////////////////////////////////////////////////////////////////////////////////////////////// - ////////// - // Xp - ////////// - template > = 0> strong_inline void spProjXp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i > = 0> strong_inline void spProjXp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i strong_inline void spProjXp (iScalar &hspin,const iScalar &fspin) - { - spProjXp(hspin._internal,fspin._internal); - } - template strong_inline void spProjXp (iMatrix &hspin,const iMatrix &fspin) - { - for(int i=0;i strong_inline void spProjXp (iScalar &hspin,const iScalar &fspin) +{ + spProjXp(hspin._internal,fspin._internal); +} +template strong_inline void spProjXp (iMatrix &hspin,const iMatrix &fspin) +{ + for(int i=0;i strong_inline void spReconXp (iScalar &hspin,const iScalar &fspin) - { - spReconXp(hspin._internal,fspin._internal); +template strong_inline void spReconXp (iScalar &hspin,const iScalar &fspin) +{ + spReconXp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconXp (iVector &hspin,const iVector &fspin) +{ + for(int i=0;i > = 0> strong_inline void spReconXp (iVector &hspin,const iVector &fspin) - { - for(int i=0;i strong_inline void spReconXp (iMatrix &hspin,const iMatrix &fspin) - { - for(int i=0;i strong_inline void spReconXp (iMatrix &hspin,const iMatrix &fspin) +{ + for(int i=0;i strong_inline void accumReconXp (iScalar &hspin,const iScalar &fspin) - { - accumReconXp(hspin._internal,fspin._internal); +template strong_inline void accumReconXp (iScalar &hspin,const iScalar &fspin) +{ + accumReconXp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconXp (iVector &hspin,const iVector &fspin) +{ + for(int i=0;i > = 0> strong_inline void accumReconXp (iVector &hspin,const iVector &fspin) - { - for(int i=0;i strong_inline void accumReconXp (iMatrix &hspin,const iMatrix &fspin) - { - for(int i=0;i strong_inline void accumReconXp (iMatrix &hspin,const iMatrix &fspin) +{ + for(int i=0;i strong_inline void spProjXm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjXm(hspin._internal,fspin._internal); +//////// +// Xm +//////// +template strong_inline void spProjXm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjXm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjXm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjXm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjXm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjXm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconXm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconXm(hspin._internal,fspin._internal); +template strong_inline void spReconXm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconXm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconXm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconXm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconXm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconXm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconXm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconXm(hspin._internal,fspin._internal); +template strong_inline void accumReconXm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconXm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconXm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconXm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconXm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconXm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjYp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjYp(hspin._internal,fspin._internal); +//////// +// Yp +//////// +template strong_inline void spProjYp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjYp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjYp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjYp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjYp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjYp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconYp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconYp(hspin._internal,fspin._internal); +template strong_inline void spReconYp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconYp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconYp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconYp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconYp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconYp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconYp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconYp(hspin._internal,fspin._internal); +template strong_inline void accumReconYp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconYp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconYp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconYp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconYp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconYp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjYm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjYm(hspin._internal,fspin._internal); +//////// +// Ym +//////// +template strong_inline void spProjYm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjYm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjYm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjYm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjYm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjYm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconYm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconYm(hspin._internal,fspin._internal); +template strong_inline void spReconYm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconYm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconYm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,const iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconYm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,const iVector >::type *temp; - for(int i=0;i strong_inline void spReconYm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconYm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconYm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconYm(hspin._internal,fspin._internal); +template strong_inline void accumReconYm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconYm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconYm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconYm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconYm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconYm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjZp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjZp(hspin._internal,fspin._internal); +//////// +// Zp +//////// +template strong_inline void spProjZp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjZp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjZp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjZp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjZp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjZp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconZp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconZp(hspin._internal,fspin._internal); +template strong_inline void spReconZp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconZp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconZp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconZp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconZp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconZp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconZp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconZp(hspin._internal,fspin._internal); +template strong_inline void accumReconZp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconZp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconZp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconZp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconZp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconZp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjZm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjZm(hspin._internal,fspin._internal); +//////// +// Zm +//////// +template strong_inline void spProjZm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjZm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjZm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjZm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjZm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjZm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconZm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconZm(hspin._internal,fspin._internal); +template strong_inline void spReconZm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconZm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconZm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconZm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconZm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconZm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconZm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconZm(hspin._internal,fspin._internal); +template strong_inline void accumReconZm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconZm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconZm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconZm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconZm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconZm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjTp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjTp(hspin._internal,fspin._internal); +//////// +// Tp +//////// +template strong_inline void spProjTp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjTp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjTp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjTp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjTp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjTp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconTp (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconTp(hspin._internal,fspin._internal); +template strong_inline void spReconTp (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconTp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconTp (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconTp (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconTp (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconTp (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconTp (iScalar &hspin, iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconTp(hspin._internal,fspin._internal); +template strong_inline void accumReconTp (iScalar &hspin, iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconTp(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconTp (iVector &hspin, const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconTp (iVector &hspin, const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconTp (iMatrix &hspin, const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconTp (iMatrix &hspin, const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProjTm (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProjTm(hspin._internal,fspin._internal); +//////// +// Tm +//////// +template strong_inline void spProjTm (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProjTm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProjTm (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProjTm (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProjTm (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProjTm (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spReconTm (iScalar &hspin, const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spReconTm(hspin._internal,fspin._internal); +template strong_inline void spReconTm (iScalar &hspin, const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spReconTm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spReconTm (iVector &hspin, const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spReconTm (iVector &hspin, const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spReconTm (iMatrix &hspin, const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spReconTm (iMatrix &hspin, const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumReconTm (iScalar &hspin, const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumReconTm(hspin._internal,fspin._internal); +template strong_inline void accumReconTm (iScalar &hspin, const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumReconTm(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumReconTm (iVector &hspin, const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumReconTm (iVector &hspin, const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumReconTm (iMatrix &hspin, const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumReconTm (iMatrix &hspin, const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProj5p (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProj5p(hspin._internal,fspin._internal); +//////// +// 5p +//////// +template strong_inline void spProj5p (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProj5p(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spRecon5p (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spRecon5p(hspin._internal,fspin._internal); +template strong_inline void spRecon5p (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spRecon5p(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spRecon5p (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spRecon5p (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spRecon5p (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spRecon5p (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumRecon5p (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumRecon5p(hspin._internal,fspin._internal); +template strong_inline void accumRecon5p (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumRecon5p(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumRecon5p (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumRecon5p (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumRecon5p (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumRecon5p (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void fspProj5p (iScalar &hspin,const iScalar &fspin) - template strong_inline void spProj5p (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProj5p(hspin._internal,fspin._internal); +// four spinor projectors for chiral proj +// template strong_inline void fspProj5p (iScalar &hspin,const iScalar &fspin) +template strong_inline void spProj5p (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProj5p(hspin._internal,fspin._internal); +} +// template strong_inline void fspProj5p (iVector &hspin,iVector &fspin) +template > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i strong_inline void fspProj5p (iVector &hspin,iVector &fspin) - template > = 0> strong_inline void spProj5p (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void fspProj5p (iMatrix &hspin,iMatrix &fspin) - template strong_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void fspProj5p (iMatrix &hspin,iMatrix &fspin) +template strong_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void spProj5m (iScalar &hspin,const iScalar &fspin) - { - spProj5m(hspin._internal,fspin._internal); +template strong_inline void spProj5m (iScalar &hspin,const iScalar &fspin) +{ + spProj5m(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) +{ + for(int i=0;i > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) - { - for(int i=0;i strong_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) - { - for(int i=0;i strong_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) +{ + for(int i=0;i strong_inline void spRecon5m (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spRecon5m(hspin._internal,fspin._internal); +template strong_inline void spRecon5m (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spRecon5m(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void spRecon5m (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void spRecon5m (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void spRecon5m (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void spRecon5m (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void accumRecon5m (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - accumRecon5m(hspin._internal,fspin._internal); +template strong_inline void accumRecon5m (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + accumRecon5m(hspin._internal,fspin._internal); +} +template > = 0> strong_inline void accumRecon5m (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i > = 0> strong_inline void accumRecon5m (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void accumRecon5m (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void accumRecon5m (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i strong_inline void fspProj5m (iScalar &hspin,const iScalar &fspin) - template strong_inline void spProj5m (iScalar &hspin,const iScalar &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; - spProj5m(hspin._internal,fspin._internal); +// four spinor projectors for chiral proj +// template strong_inline void fspProj5m (iScalar &hspin,const iScalar &fspin) +template strong_inline void spProj5m (iScalar &hspin,const iScalar &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; + spProj5m(hspin._internal,fspin._internal); +} +// template strong_inline void fspProj5m (iVector &hspin,iVector &fspin) +template > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; + for(int i=0;i strong_inline void fspProj5m (iVector &hspin,iVector &fspin) - template > = 0> strong_inline void spProj5m (iVector &hspin,const iVector &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; - for(int i=0;i strong_inline void fspProj5m (iMatrix &hspin,iMatrix &fspin) - template strong_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) - { - //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; - for(int i=0;i strong_inline void fspProj5m (iMatrix &hspin,iMatrix &fspin) +template strong_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) +{ + //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; + for(int i=0;i