QUDA  v0.7.0
A library for QCD on GPUs
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
hisq_links_quda.h
Go to the documentation of this file.
1 #ifndef _HISQ_LINKS_QUDA_H
2 #define _HISQ_LINKS_QUDA_H
3 
4 #include <gauge_field.h>
5 
6 
7 // ***************************************************
8 // Declarations for unitarization functions used
9 // in the construction of the hisq-fattened links
10 //
11 // There are many algorithms for unitarizing
12 // fat7-smeared link variables.
13 // In practice, we use the method employed by
14 // MILC and QOPQDP, namely a combination of
15 // "analytic", or Cayley-Hamilton, unitarization,
16 // and SVD.
17 // Analytic unitarization is first attempted.
18 // The eigenvalues of the matrix Q = V^{dagger}V
19 // (V being the fat7 link) are computed,
20 // if the determinant of Q is less than a user-defined
21 // value (svd_abs_error), or the relative error on the
22 // determinant, estimated by comparing the product
23 // of the eigenvalues of Q to the determinant obtained
24 // from the standard formula, is greater than a
25 // user-specified tolerance (svd_rel_error), then
26 // SVD is used to perform the unitarization.
27 // ***************************************************
28 
29 
30 namespace quda {
31 
32 void setUnitarizeLinksPadding(int input_padding,
33  int output_padding);
34 
35 void setUnitarizeLinksConstants(double unitarize_eps, double max_error,
36  bool allow_svd, bool svd_only,
37  double svd_rel_error, double svd_abs_error,
38  bool check_unitarization=true);
39 
40 
42  cudaGaugeField& infield,
43  cudaGaugeField* outfield,
44  int* num_failures);
45 
47  cpuGaugeField& infield,
48  cpuGaugeField* outfield);
49 
50 bool isUnitary(const QudaGaugeParam& param, cpuGaugeField& field, double max_error);
51 
52 } // namespace quda
53 
54 
55 #endif // _HISQ_LINKS_H
void unitarizeLinksCPU(const QudaGaugeParam &param, cpuGaugeField &infield, cpuGaugeField *outfield)
void setUnitarizeLinksConstants(double unitarize_eps, double max_error, bool allow_svd, bool svd_only, double svd_rel_error, double svd_abs_error, bool check_unitarization=true)
void setUnitarizeLinksPadding(int input_padding, int output_padding)
QudaGaugeParam param
Definition: pack_test.cpp:17
bool isUnitary(const QudaGaugeParam &param, cpuGaugeField &field, double max_error)
void unitarizeLinksCuda(const QudaGaugeParam &param, cudaGaugeField &infield, cudaGaugeField *outfield, int *num_failures)