QUDA v0.4.0
A library for QCD on GPUs
quda/tests/fermion_force_reference.cpp
Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <stdlib.h>
00003 #include <math.h>
00004 #include <string.h>
00005 
00006 #include "quda.h"
00007 #include "test_util.h"
00008 #include "misc.h"
00009 #include "fermion_force_reference.h"
00010 
00011 extern int Z[4];
00012 extern int V;
00013 extern int Vh;
00014 
00015 
00016 #define CADD(a,b,c) { (c).real = (a).real + (b).real;   \
00017     (c).imag = (a).imag + (b).imag; }
00018 #define CMUL(a,b,c) { (c).real = (a).real*(b).real - (a).imag*(b).imag; \
00019     (c).imag = (a).real*(b).imag + (a).imag*(b).real; }
00020 #define CSUM(a,b) { (a).real += (b).real; (a).imag += (b).imag; }
00021 
00022 /* c = a* * b */
00023 #define CMULJ_(a,b,c) { (c).real = (a).real*(b).real + (a).imag*(b).imag; \
00024     (c).imag = (a).real*(b).imag - (a).imag*(b).real; }
00025 
00026 /* c = a * b* */
00027 #define CMUL_J(a,b,c) { (c).real = (a).real*(b).real + (a).imag*(b).imag; \
00028     (c).imag = (a).imag*(b).real - (a).real*(b).imag; }
00029 
00030 #define CONJG(a,b) { (b).real = (a).real; (b).imag = -(a).imag; }
00031 
00032 typedef struct {   
00033   float real;      
00034   float imag; 
00035 } fcomplex;  
00036 
00037 /* specific for double complex */
00038 typedef struct {
00039   double real;
00040   double imag;
00041 } dcomplex;
00042 
00043 typedef struct { fcomplex e[3][3]; } fsu3_matrix;
00044 typedef struct { fcomplex c[3]; } fsu3_vector;
00045 typedef struct { dcomplex e[3][3]; } dsu3_matrix;
00046 typedef struct { dcomplex c[3]; } dsu3_vector;
00047 
00048 typedef struct { 
00049   fcomplex m01,m02,m12; 
00050   float m00im,m11im,m22im; 
00051   float space; 
00052 } fanti_hermitmat;
00053 
00054 typedef struct { 
00055   dcomplex m01,m02,m12; 
00056   double m00im,m11im,m22im; 
00057   double space; 
00058 } danti_hermitmat;
00059 
00060 typedef struct { fsu3_vector h[2]; } fhalf_wilson_vector;
00061 typedef struct { dsu3_vector h[2]; } dhalf_wilson_vector;
00062 
00063 
00064 template<typename su3_matrix>
00065 static void  
00066 su3_adjoint( su3_matrix *a, su3_matrix *b )
00067 {
00068   int i,j;
00069   for(i=0;i<3;i++)for(j=0;j<3;j++){
00070       CONJG( a->e[j][i], b->e[i][j] );
00071     }
00072 }
00073 
00074 
00075 template<typename su3_matrix, typename anti_hermitmat>
00076 static void
00077 make_anti_hermitian( su3_matrix *m3, anti_hermitmat *ah3 ) 
00078 {
00079     
00080   typeof(ah3->m00im) temp =
00081     (m3->e[0][0].imag + m3->e[1][1].imag + m3->e[2][2].imag)*0.33333333333333333;
00082   ah3->m00im = m3->e[0][0].imag - temp;
00083   ah3->m11im = m3->e[1][1].imag - temp;
00084   ah3->m22im = m3->e[2][2].imag - temp;
00085   ah3->m01.real = (m3->e[0][1].real - m3->e[1][0].real)*0.5;
00086   ah3->m02.real = (m3->e[0][2].real - m3->e[2][0].real)*0.5;
00087   ah3->m12.real = (m3->e[1][2].real - m3->e[2][1].real)*0.5;
00088   ah3->m01.imag = (m3->e[0][1].imag + m3->e[1][0].imag)*0.5;
00089   ah3->m02.imag = (m3->e[0][2].imag + m3->e[2][0].imag)*0.5;
00090   ah3->m12.imag = (m3->e[1][2].imag + m3->e[2][1].imag)*0.5;
00091     
00092 }
00093 
00094 template <typename anti_hermitmat, typename su3_matrix>
00095 static void
00096 uncompress_anti_hermitian(anti_hermitmat *mat_antihermit,
00097                           su3_matrix *mat_su3 )
00098 {
00099   typeof(mat_antihermit->m00im) temp1;
00100   mat_su3->e[0][0].imag=mat_antihermit->m00im;
00101   mat_su3->e[0][0].real=0.;
00102   mat_su3->e[1][1].imag=mat_antihermit->m11im;
00103   mat_su3->e[1][1].real=0.;
00104   mat_su3->e[2][2].imag=mat_antihermit->m22im;
00105   mat_su3->e[2][2].real=0.;
00106   mat_su3->e[0][1].imag=mat_antihermit->m01.imag;
00107   temp1=mat_antihermit->m01.real;
00108   mat_su3->e[0][1].real=temp1;
00109   mat_su3->e[1][0].real= -temp1;
00110   mat_su3->e[1][0].imag=mat_antihermit->m01.imag;
00111   mat_su3->e[0][2].imag=mat_antihermit->m02.imag;
00112   temp1=mat_antihermit->m02.real;
00113   mat_su3->e[0][2].real=temp1;
00114   mat_su3->e[2][0].real= -temp1;
00115   mat_su3->e[2][0].imag=mat_antihermit->m02.imag;
00116   mat_su3->e[1][2].imag=mat_antihermit->m12.imag;
00117   temp1=mat_antihermit->m12.real;
00118   mat_su3->e[1][2].real=temp1;
00119   mat_su3->e[2][1].real= -temp1;
00120   mat_su3->e[2][1].imag=mat_antihermit->m12.imag;    
00121 }
00122 
00123 template <typename su3_matrix, typename Float>
00124 static void
00125 scalar_mult_sub_su3_matrix(su3_matrix *a,su3_matrix *b, Float s, su3_matrix *c)
00126 {    
00127   int i,j;
00128   for(i=0;i<3;i++){
00129     for(j=0;j<3;j++){       
00130       c->e[i][j].real = a->e[i][j].real - s*b->e[i][j].real;
00131       c->e[i][j].imag = a->e[i][j].imag - s*b->e[i][j].imag;
00132     }
00133   }
00134 }
00135 
00136 template <typename su3_matrix, typename Float>
00137 static void
00138 scalar_mult_add_su3_matrix(su3_matrix *a,su3_matrix *b, Float s, su3_matrix *c)
00139 {
00140   int i,j;
00141   for(i=0;i<3;i++){
00142     for(j=0;j<3;j++){       
00143       c->e[i][j].real = a->e[i][j].real + s*b->e[i][j].real;
00144       c->e[i][j].imag = a->e[i][j].imag + s*b->e[i][j].imag;
00145     }
00146   }    
00147 }
00148 
00149 
00150 template<typename su3_matrix, typename su3_vector>
00151 static void
00152 mult_su3_mat_vec( su3_matrix *a, su3_vector *b, su3_vector *c  )
00153 {
00154   int i,j;
00155   typeof(a->e[0][0]) x,y;
00156   for(i=0;i<3;i++){
00157     x.real=x.imag=0.0;
00158     for(j=0;j<3;j++){
00159       CMUL( a->e[i][j] , b->c[j] , y );
00160       CSUM( x , y );
00161     }
00162     c->c[i] = x;
00163   }
00164 }
00165 template<typename su3_matrix, typename su3_vector>
00166 static void
00167 mult_adj_su3_mat_vec( su3_matrix *a, su3_vector *b, su3_vector *c )
00168 {
00169   int i,j;
00170   typeof(a->e[0][0]) x,y,z;
00171   for(i=0;i<3;i++){
00172     x.real=x.imag=0.0;
00173     for(j=0;j<3;j++){
00174       CONJG( a->e[j][i], z );
00175       CMUL( z , b->c[j], y );
00176       CSUM( x , y );
00177     }
00178     c->c[i] = x;
00179   }
00180 }
00181 
00182 template<typename su3_vector, typename su3_matrix>
00183 static void
00184 su3_projector( su3_vector *a, su3_vector *b, su3_matrix *c )
00185 {
00186   int i,j;
00187   for(i=0;i<3;i++)for(j=0;j<3;j++){
00188       CMUL_J( a->c[i], b->c[j], c->e[i][j] );
00189     }
00190 }
00191 
00192 template<typename su3_vector, typename Real>
00193 static void 
00194 scalar_mult_add_su3_vector(su3_vector *a, su3_vector *b, Real s,
00195                            su3_vector *c)
00196 {    
00197   int i;
00198   for(i=0;i<3;i++){
00199     c->c[i].real = a->c[i].real + s*b->c[i].real;
00200     c->c[i].imag = a->c[i].imag + s*b->c[i].imag;
00201   }    
00202 }
00203 
00204 
00205 
00206 template < typename su3_matrix>
00207 static void
00208 print_su3_matrix(su3_matrix *a)
00209 {
00210   int i, j;
00211   for(i=0;i < 3; i++){
00212     for(j=0;j < 3;j++){
00213       printf("(%f %f)\t", a->e[i][j].real, a->e[i][j].imag);
00214     }
00215     printf("\n");
00216   }
00217     
00218 }
00219 
00220 
00221 
00222 
00223 template <typename su3_matrix, typename anti_hermitmat, typename Float>
00224 static void
00225 update_mom(anti_hermitmat* momentum, int dir, su3_matrix* sitelink,
00226            su3_matrix* staple, Float eb3)
00227 {
00228   int i;
00229   for(i=0;i <V; i++){
00230     su3_matrix tmat1;
00231     su3_matrix tmat2;
00232     su3_matrix tmat3;
00233     
00234     su3_matrix* lnk = sitelink + 4*i+dir;
00235     su3_matrix* stp = staple + i;
00236     anti_hermitmat* mom = momentum + 4*i+dir;
00237     
00238     mult_su3_na(lnk, stp, &tmat1);
00239     uncompress_anti_hermitian(mom, &tmat2);
00240     
00241     scalar_mult_sub_su3_matrix(&tmat2, &tmat1, eb3, &tmat3);
00242     make_anti_hermitian(&tmat3, mom);
00243     
00244   }
00245     
00246 }
00247 
00248 
00249 template<typename half_wilson_vector, typename su3_matrix>
00250 static void 
00251 u_shift_hw(half_wilson_vector *src, half_wilson_vector *dest, int dir, su3_matrix* sitelink ) 
00252 {
00253   int i ;
00254   int dx[4];
00255     
00256   dx[3]=dx[2]=dx[1]=dx[0]=0;
00257   
00258   if(GOES_FORWARDS(dir)){       
00259     dx[dir]=1;  
00260     for(i=0;i < V; i++){
00261       int nbr_idx = neighborIndexFullLattice(i, dx[3], dx[2], dx[1], dx[0]);
00262       half_wilson_vector* hw = src + nbr_idx;
00263       su3_matrix* link = sitelink + i*4 + dir;
00264       mult_su3_mat_vec(link, &hw->h[0], &dest[i].h[0]);
00265       mult_su3_mat_vec(link, &hw->h[1], &dest[i].h[1]);     
00266     }   
00267   }else{
00268     dx[OPP_DIR(dir)]=-1;
00269     for(i=0;i < V; i++){
00270       int nbr_idx = neighborIndexFullLattice(i, dx[3], dx[2], dx[1], dx[0]);
00271       half_wilson_vector* hw = src + nbr_idx;
00272       su3_matrix* link = sitelink + nbr_idx*4 + OPP_DIR(dir);
00273       mult_adj_su3_mat_vec(link, &hw->h[0], &dest[i].h[0]);
00274       mult_adj_su3_mat_vec(link, &hw->h[1], &dest[i].h[1]);        
00275     }   
00276   }
00277   
00278 }
00279 
00280 
00281 template <class su3_matrix, typename half_wilson_vector,
00282           typename anti_hermitmat, typename Real>
00283 static void 
00284 add_3f_force_to_mom(half_wilson_vector *back, half_wilson_vector *forw, 
00285                     int dir, Real coeff[2], anti_hermitmat* momentum) 
00286 {
00287   Real my_coeff[2] ;
00288   Real tmp_coeff[2] ;
00289   int mydir;
00290   int i;
00291   
00292   if(GOES_BACKWARDS(dir)){
00293     mydir = OPP_DIR(dir);
00294     my_coeff[0] = -coeff[0]; 
00295     my_coeff[1] = -coeff[1];
00296   }else{ 
00297     mydir = dir; 
00298     my_coeff[0] = coeff[0]; 
00299     my_coeff[1] = coeff[1]; 
00300   }
00301   
00302   for(i=0;i < V;i++){
00303     if (i < Vh){
00304       tmp_coeff[0] = my_coeff[0];
00305       tmp_coeff[1] = my_coeff[1];
00306     }else{
00307       tmp_coeff[0] = -my_coeff[0];
00308       tmp_coeff[1] = -my_coeff[1] ;     
00309     }
00310     
00311     su3_matrix tmat;
00312     su3_matrix mom_matrix;
00313     anti_hermitmat* mom = momentum+ 4* i + mydir;
00314     uncompress_anti_hermitian(mom, &mom_matrix);
00315     su3_projector( &back[i].h[0], &forw[i].h[0], &tmat);
00316     scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[0], &mom_matrix );
00317     su3_projector( &back[i].h[1], &forw[i].h[1], &tmat);
00318     scalar_mult_add_su3_matrix(&mom_matrix, &tmat,  tmp_coeff[1], &mom_matrix );        
00319     make_anti_hermitian(&mom_matrix, mom);    
00320   }    
00321 }
00322 
00323 template<class su3_matrix, typename Real, typename half_wilson_vector, typename anti_hermitmat>
00324 static void 
00325 side_link_3f_force(int mu, int nu, Real coeff[2], half_wilson_vector *Path   , 
00326                    half_wilson_vector *Path_nu, half_wilson_vector *Path_mu, 
00327                    half_wilson_vector *Path_numu, anti_hermitmat* mom) 
00328 {
00329   
00330   Real m_coeff[2] ;
00331   
00332   m_coeff[0] = -coeff[0] ;
00333   m_coeff[1] = -coeff[1] ;
00334   
00335   if(GOES_FORWARDS(mu)){
00336     if(GOES_FORWARDS(nu)){
00337       add_3f_force_to_mom<su3_matrix>(Path_numu, Path, mu, coeff, mom) ;
00338     }else{
00339       add_3f_force_to_mom<su3_matrix>(Path,Path_numu,OPP_DIR(mu),m_coeff, mom);
00340     }
00341   }
00342   else{
00343     if(GOES_FORWARDS(nu))
00344       add_3f_force_to_mom<su3_matrix>(Path_nu, Path_mu, mu, m_coeff, mom);
00345     else
00346       add_3f_force_to_mom<su3_matrix>(Path_mu, Path_nu, OPP_DIR(mu), coeff, mom) ;
00347   }
00348 }
00349 
00350 
00351 
00352 #define Pmu          tempvec[0] 
00353 #define Pnumu        tempvec[1]
00354 #define Prhonumu     tempvec[2]
00355 #define P7           tempvec[3]
00356 #define P7rho        tempvec[4]              
00357 #define P7rhonu      tempvec[5]
00358 #define P5           tempvec[6]
00359 #define P3           tempvec[7]
00360 #define P5nu         tempvec[3]
00361 #define P3mu         tempvec[3]
00362 #define Popmu        tempvec[4]
00363 #define Pmumumu      tempvec[4]
00364 
00365 
00366 
00367 template <typename Real, typename half_wilson_vector, typename anti_hermitmat, 
00368           typename su3_matrix>
00369 static void
00370 do_fermion_force_reference(Real eps, Real weight1, Real weight2,
00371                            half_wilson_vector* temp_x, Real* act_path_coeff, 
00372                            su3_matrix* sitelink, anti_hermitmat* mom)    
00373 {
00374   int i;
00375   int mu, nu, rho, sig;
00376   Real coeff[2];
00377   Real OneLink[2], Lepage[2], Naik[2], FiveSt[2], ThreeSt[2], SevenSt[2] ;
00378   Real mNaik[2], mLepage[2], mFiveSt[2], mThreeSt[2], mSevenSt[2];    
00379   half_wilson_vector *tempvec[8] ;
00380   int sites_on_node = V;
00381   int DirectLinks[8] ;
00382  
00383   Real ferm_epsilon;
00384   ferm_epsilon = 2.0*weight1*eps;
00385   OneLink[0] = act_path_coeff[0]*ferm_epsilon ; 
00386   Naik[0]    = act_path_coeff[1]*ferm_epsilon ; mNaik[0]    = -Naik[0];
00387   ThreeSt[0] = act_path_coeff[2]*ferm_epsilon ; mThreeSt[0] = -ThreeSt[0];
00388   FiveSt[0]  = act_path_coeff[3]*ferm_epsilon ; mFiveSt[0]  = -FiveSt[0];
00389   SevenSt[0] = act_path_coeff[4]*ferm_epsilon ; mSevenSt[0] = -SevenSt[0];
00390   Lepage[0]  = act_path_coeff[5]*ferm_epsilon ; mLepage[0]  = -Lepage[0];
00391     
00392   ferm_epsilon = 2.0*weight2*eps;
00393   OneLink[1] = act_path_coeff[0]*ferm_epsilon ; 
00394   Naik[1]    = act_path_coeff[1]*ferm_epsilon ; mNaik[1]    = -Naik[1];
00395   ThreeSt[1] = act_path_coeff[2]*ferm_epsilon ; mThreeSt[1] = -ThreeSt[1];
00396   FiveSt[1]  = act_path_coeff[3]*ferm_epsilon ; mFiveSt[1]  = -FiveSt[1];
00397   SevenSt[1] = act_path_coeff[4]*ferm_epsilon ; mSevenSt[1] = -SevenSt[1];
00398   Lepage[1]  = act_path_coeff[5]*ferm_epsilon ; mLepage[1]  = -Lepage[1];
00399     
00400   for(mu=0;mu<8;mu++){
00401     DirectLinks[mu] = 0 ;
00402   }
00403     
00404   for(mu=0;mu<8;mu++){
00405     tempvec[mu] = (half_wilson_vector *)malloc( sites_on_node*sizeof(half_wilson_vector) );  
00406   }
00407     
00408   for(sig=0; sig < 8; sig++){
00409     for(mu = 0; mu < 8; mu++){
00410       if ( (mu == sig) || (mu == OPP_DIR(sig))){
00411         continue;
00412       }
00413 
00414       // 3 link path 
00415       u_shift_hw(temp_x, Pmu, OPP_DIR(mu), sitelink);
00416       u_shift_hw(Pmu, P3, sig, sitelink);
00417       if (GOES_FORWARDS(sig)){
00418         add_3f_force_to_mom<su3_matrix>(P3, Pmu, sig, mThreeSt, mom);
00419       }     
00420       for(nu=0; nu < 8; nu++){
00421         if (nu == sig || nu == OPP_DIR(sig)
00422             || nu == mu || nu == OPP_DIR(mu)){
00423           continue;
00424         }
00425                 
00426         // 5 link path
00427         u_shift_hw(Pmu, Pnumu, OPP_DIR(nu), sitelink);
00428         u_shift_hw(Pnumu, P5, sig, sitelink);
00429         if (GOES_FORWARDS(sig)){
00430           add_3f_force_to_mom<su3_matrix>(P5, Pnumu, sig, FiveSt, mom);
00431         }
00432 
00433 
00434         for(rho =0; rho < 8; rho++){
00435           if (rho == sig || rho == OPP_DIR(sig)
00436               || rho == mu || rho == OPP_DIR(mu)
00437               || rho == nu || rho == OPP_DIR(nu)){
00438             continue;
00439           }
00440                     
00441           //7 link path
00442           u_shift_hw(Pnumu, Prhonumu, OPP_DIR(rho), sitelink);
00443           u_shift_hw(Prhonumu, P7,sig, sitelink);
00444           if(GOES_FORWARDS(sig)){
00445             add_3f_force_to_mom<su3_matrix>(P7, Prhonumu, sig, mSevenSt, mom) ; 
00446           }
00447           u_shift_hw(P7, P7rho, rho, sitelink);
00448           side_link_3f_force<su3_matrix>(rho,sig,SevenSt, Pnumu, P7, Prhonumu, P7rho, mom);                 
00449           if(FiveSt[0] != 0)coeff[0] = SevenSt[0]/FiveSt[0] ; else coeff[0] = 0;
00450           if(FiveSt[1] != 0)coeff[1] = SevenSt[1]/FiveSt[1] ; else coeff[1] = 0;                    
00451           for(i=0;i < V; i++){
00452             scalar_mult_add_su3_vector(&(P5[i].h[0]),&(P7rho[i].h[0]), coeff[0],
00453                                        &(P5[i].h[0]));
00454             scalar_mult_add_su3_vector(&(P5[i].h[1]),&(P7rho[i].h[1]), coeff[1],
00455                                        &(P5[i].h[1]));
00456           }                 
00457 
00458         }//rho  
00459 
00460         u_shift_hw(P5,P5nu, nu, sitelink);
00461         side_link_3f_force<su3_matrix>(nu,sig,mFiveSt,Pmu,P5, Pnumu,P5nu, mom);
00462         if(ThreeSt[0] != 0)coeff[0] = FiveSt[0]/ThreeSt[0] ; else coeff[0] = 0;
00463         if(ThreeSt[1] != 0)coeff[1] = FiveSt[1]/ThreeSt[1] ; else coeff[1] = 0;
00464         for(i=0; i < V; i++){
00465           scalar_mult_add_su3_vector(&(P3[i].h[0]),&(P5nu[i].h[0]),coeff[0],&(P3[i].h[0]));
00466           scalar_mult_add_su3_vector(&(P3[i].h[1]),&(P5nu[i].h[1]),coeff[1],&(P3[i].h[1]));
00467         }
00468 
00469       }//nu
00470 
00471       //Lepage term
00472       u_shift_hw(Pmu, Pnumu, OPP_DIR(mu), sitelink);
00473       u_shift_hw(Pnumu, P5, sig, sitelink);
00474       if(GOES_FORWARDS(sig)){
00475         add_3f_force_to_mom<su3_matrix>(P5, Pnumu, sig, Lepage, mom);
00476       }
00477             
00478       u_shift_hw(P5,P5nu, mu, sitelink);
00479       side_link_3f_force<su3_matrix>(mu, sig, mLepage, Pmu, P5, Pnumu, P5nu, mom);
00480       if(ThreeSt[0] != 0) coeff[0] = Lepage[0]/ThreeSt[0] ; else coeff[0] = 0;
00481       if(ThreeSt[1] != 0) coeff[1] = Lepage[1]/ThreeSt[1] ; else coeff[1] = 0;
00482       for(i=0;i < V;i++){
00483         scalar_mult_add_su3_vector(&(P3[i].h[0]),&(P5nu[i].h[0]),coeff[0],&(P3[i].h[0]));
00484         scalar_mult_add_su3_vector(&(P3[i].h[1]),&(P5nu[i].h[1]),coeff[1],&(P3[i].h[1]));
00485       }
00486             
00487       if(GOES_FORWARDS(mu)) {
00488         u_shift_hw(P3,P3mu, mu, sitelink);
00489       }
00490       side_link_3f_force<su3_matrix>(mu, sig, ThreeSt, temp_x, P3, Pmu, P3mu, mom);   
00491             
00492       //One link term and Naik term
00493       if( (!DirectLinks[mu]) ){
00494         DirectLinks[mu]=1 ;
00495         if(GOES_BACKWARDS(mu)){
00496           //one link term
00497           add_3f_force_to_mom<su3_matrix>(Pmu, temp_x, OPP_DIR(mu), OneLink, mom);
00498           u_shift_hw(temp_x, Popmu, mu, sitelink);
00499           add_3f_force_to_mom<su3_matrix>(Pnumu, Popmu, OPP_DIR(mu), mNaik, mom);
00500           u_shift_hw(Pnumu, Pmumumu, OPP_DIR(mu), sitelink);
00501           add_3f_force_to_mom<su3_matrix>(Pmumumu, temp_x, OPP_DIR(mu), Naik, mom);
00502         }else{
00503           u_shift_hw(temp_x, Popmu, mu, sitelink);
00504           add_3f_force_to_mom<su3_matrix>(Popmu, Pnumu, mu, Naik, mom);
00505         }               
00506       }//if
00507     }//mu
00508   }//sig
00509 
00510   for(mu=0;mu<8;mu++){
00511     free(tempvec[mu]);
00512   }
00513     
00514 }
00515 
00516 #undef Pmu
00517 #undef Pnumu
00518 #undef Prhonumu
00519 #undef P7
00520 #undef P7rho
00521 #undef P7rhonu
00522 #undef P5
00523 #undef P3
00524 #undef P5nu
00525 #undef P3mu
00526 #undef Popmu
00527 #undef Pmumumu
00528 
00529 
00530 
00531 void
00532 fermion_force_reference(float eps, float weight1, float weight2,
00533                         void* act_path_coeff, void* temp_x, void* sitelink, void* mom)    
00534 {
00535   do_fermion_force_reference((float)eps, (float)weight1, (float)weight2, 
00536                              (fhalf_wilson_vector*) temp_x, (float*)act_path_coeff,
00537                              (fsu3_matrix*)sitelink, (fanti_hermitmat*) mom);   
00538 }
00539 
00540 
00541 
00542 void
00543 fermion_force_reference(double eps, double weight1, double weight2,
00544                         void* act_path_coeff, void* temp_x, void* sitelink, void* mom)    
00545 {
00546   do_fermion_force_reference((double)eps, (double)weight1, (double)weight2, 
00547                              (dhalf_wilson_vector*) temp_x, (double*)act_path_coeff,
00548                              (dsu3_matrix*)sitelink, (danti_hermitmat*) mom);   
00549 }
00550 
00551 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines