/************************************************************************************* Grid physics library, www.github.com/paboyle/Grid Source file: ./lib/qcd/spin/TwoSpinor.h Copyright (C) 2015 Author: Peter Boyle Author: Peter Boyle This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 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 */ #ifndef GRID_QCD_TWOSPIN_H #define GRID_QCD_TWOSPIN_H NAMESPACE_BEGIN(Grid); ////////////////////////////////////////////////////////////////////////////////////////////////////// // 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. // ////////////////////////////////////////////////////////////////////////////////////////////////////// /* 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> accelerator_inline void spProjXp (iVector &hspin,const iVector &fspin) { hspin(0)=fspin(0)+timesI(fspin(3)); hspin(1)=fspin(1)+timesI(fspin(2)); } template > = 0> accelerator_inline void spProjXm (iVector &hspin,const iVector &fspin) { hspin(0)=fspin(0)-timesI(fspin(3)); hspin(1)=fspin(1)-timesI(fspin(2)); } // 0 0 0 -1 [0] -+ [3] // 0 0 1 0 [1] +- [2] // 0 1 0 0 // -1 0 0 0 template > = 0> accelerator_inline void spProjYp (iVector &hspin,const iVector &fspin) { hspin(0)=fspin(0)-fspin(3); hspin(1)=fspin(1)+fspin(2); } template > = 0> accelerator_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> accelerator_inline void spProjZp (iVector &hspin,const iVector &fspin) { hspin(0)=fspin(0)+timesI(fspin(2)); hspin(1)=fspin(1)-timesI(fspin(3)); } template > = 0> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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 accelerator_inline void fspProj5p (iVector &rfspin,const iVector &fspin) template > = 0> accelerator_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 accelerator_inline void fspProj5m (iVector &rfspin,const iVector &fspin) template > = 0> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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) template > = 0> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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> accelerator_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 ////////////////////////////////////////////////////////////////////////////////////////////// ////////// // Xp ////////// template > = 0> accelerator_inline void spProjXp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjXp (iScalar &hspin,const iScalar &fspin) { spProjXp(hspin._internal,fspin._internal); } template accelerator_inline void spProjXp (iMatrix &hspin,const iMatrix &fspin) { for(int i=0;i accelerator_inline void spReconXp (iScalar &hspin,const iScalar &fspin) { spReconXp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconXp (iVector &hspin,const iVector &fspin) { for(int i=0;i accelerator_inline void spReconXp (iMatrix &hspin,const iMatrix &fspin) { for(int i=0;i accelerator_inline void accumReconXp (iScalar &hspin,const iScalar &fspin) { accumReconXp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconXp (iVector &hspin,const iVector &fspin) { for(int i=0;i accelerator_inline void accumReconXp (iMatrix &hspin,const iMatrix &fspin) { for(int i=0;i accelerator_inline void spProjXm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjXm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjXm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjXm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconXm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconXm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconXm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconXm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconXm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconXm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconXm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconXm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjYp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjYp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjYp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjYp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconYp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconYp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconYp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconYp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconYp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconYp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconYp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconYp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjYm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjYm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjYm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjYm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconYm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconYm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconYm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,const iVector >::type *temp; for(int i=0;i accelerator_inline void spReconYm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconYm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconYm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconYm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconYm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjZp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjZp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjZp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjZp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconZp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconZp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconZp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconZp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconZp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconZp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconZp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconZp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjZm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjZm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjZm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjZm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconZm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconZm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconZm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconZm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconZm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconZm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconZm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconZm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjTp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjTp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjTp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjTp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconTp (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconTp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconTp (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconTp (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconTp (iScalar &hspin, iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconTp(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconTp (iVector &hspin, const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconTp (iMatrix &hspin, const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProjTm (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProjTm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProjTm (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProjTm (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spReconTm (iScalar &hspin, const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spReconTm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spReconTm (iVector &hspin, const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spReconTm (iMatrix &hspin, const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumReconTm (iScalar &hspin, const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumReconTm(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumReconTm (iVector &hspin, const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumReconTm (iMatrix &hspin, const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProj5p (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProj5p(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProj5p (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spRecon5p (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spRecon5p(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spRecon5p (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spRecon5p (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumRecon5p (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumRecon5p(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumRecon5p (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumRecon5p (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void fspProj5p (iScalar &hspin,const iScalar &fspin) template accelerator_inline void spProj5p (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProj5p(hspin._internal,fspin._internal); } // template accelerator_inline void fspProj5p (iVector &hspin,iVector &fspin) template > = 0> accelerator_inline void spProj5p (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void fspProj5p (iMatrix &hspin,iMatrix &fspin) template accelerator_inline void spProj5p (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void spProj5m (iScalar &hspin,const iScalar &fspin) { spProj5m(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spProj5m (iVector &hspin,const iVector &fspin) { for(int i=0;i accelerator_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) { for(int i=0;i accelerator_inline void spRecon5m (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spRecon5m(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void spRecon5m (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void spRecon5m (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void accumRecon5m (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; accumRecon5m(hspin._internal,fspin._internal); } template > = 0> accelerator_inline void accumRecon5m (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void accumRecon5m (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i accelerator_inline void fspProj5m (iScalar &hspin,const iScalar &fspin) template accelerator_inline void spProj5m (iScalar &hspin,const iScalar &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iScalar >::type *temp; spProj5m(hspin._internal,fspin._internal); } // template accelerator_inline void fspProj5m (iVector &hspin,iVector &fspin) template > = 0> accelerator_inline void spProj5m (iVector &hspin,const iVector &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iVector >::type *temp; for(int i=0;i accelerator_inline void fspProj5m (iMatrix &hspin,iMatrix &fspin) template accelerator_inline void spProj5m (iMatrix &hspin,const iMatrix &fspin) { //typename std::enable_if,SpinorIndex>::notvalue,iMatrix >::type *temp; for(int i=0;i