QUDA v0.4.0
A library for QCD on GPUs
quda/include/hisq_links_quda.h
Go to the documentation of this file.
00001 #ifndef _HISQ_LINKS_QUDA_H
00002 #define _HISQ_LINKS_QUDA_H
00003 
00004 #include <gauge_field.h>
00005 
00006 
00007 // ***************************************************
00008 //  Declarations for unitarization functions used 
00009 //  in the construction of the hisq-fattened links
00010 // 
00011 //  There are many algorithms for unitarizing 
00012 //  fat7-smeared link variables. 
00013 //  In practice, we use the method employed by 
00014 //  MILC and QOPQDP, namely a combination of 
00015 //  "analytic", or Cayley-Hamilton, unitarization, 
00016 //  and SVD.  
00017 //  Analytic unitarization is first attempted. 
00018 //  The eigenvalues of the matrix Q = V^{dagger}V 
00019 //  (V being the fat7 link) are computed, 
00020 //  if the determinant of Q is less than a user-defined 
00021 //  value (svd_abs_error), or the relative error on the 
00022 //  determinant, estimated by comparing the product 
00023 //  of the eigenvalues of Q to the determinant obtained 
00024 //  from the standard formula, is greater than a 
00025 //  user-specified tolerance (svd_rel_error), then 
00026 //  SVD is used to perform the unitarization.
00027 // ***************************************************  
00028 
00029 
00030 namespace hisq {
00031 
00032 void setUnitarizeLinksPadding(int input_padding, 
00033                              int output_padding);
00034 
00035 void setUnitarizeLinksConstants(double unitarize_eps, double max_error, 
00036                                 bool allow_svd, bool svd_only,
00037                                 double svd_rel_error, double svd_abs_error,
00038                                 bool check_unitarization=true);
00039 
00040 
00041 void unitarizeLinksCuda(const QudaGaugeParam& param,
00042                         cudaGaugeField& infield,
00043                         cudaGaugeField* outfield, 
00044                         int* num_failures);
00045 
00046 void unitarizeLinksCPU(const QudaGaugeParam& param,
00047                        cpuGaugeField& infield,
00048                        cpuGaugeField* outfield);
00049 
00050 bool isUnitary(const QudaGaugeParam& param, cpuGaugeField& field, double max_error);
00051 
00052 } // namespace hisq
00053 
00054 
00055 #endif // _HISQ_LINKS_H
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines