QUDA  v1.1.0
A library for QCD on GPUs
host_utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <quda.h>
4 #include <random_quda.h>
5 #include <vector>
6 #include <color_spinor_field.h>
7 
8 #define gauge_site_size 18 // real numbers per link
9 #define spinor_site_size 24 // real numbers per wilson spinor
10 #define stag_spinor_site_size 6 // real numbers per staggered 'spinor'
11 #define clover_site_size 72 // real numbers per block-diagonal clover matrix
12 #define mom_site_size 10 // real numbers per momentum
13 #define hw_site_size 12 // real numbers per half wilson
14 
15 extern int Z[4];
16 extern int V;
17 extern int Vh;
18 extern int Vs_x, Vs_y, Vs_z, Vs_t;
19 extern int Vsh_x, Vsh_y, Vsh_z, Vsh_t;
20 extern int faceVolume[4];
21 extern int E1, E1h, E2, E3, E4;
22 extern int E[4];
23 extern int V_ex, Vh_ex;
24 
25 extern double kappa5;
26 extern int Ls;
27 extern int V5;
28 extern int V5h;
29 
30 extern size_t host_gauge_data_type_size;
31 extern size_t host_spinor_data_type_size;
32 extern size_t host_clover_data_type_size;
33 
34 // QUDA precisions
35 extern QudaPrecision &cpu_prec;
36 extern QudaPrecision &cuda_prec;
42 
43 // Set some basic parameters via command line or use defaults
44 // Implemented in set_params.cpp
47 
48 // Staggered gauge field utils
49 //------------------------------------------------------
50 void constructStaggeredHostGhostGaugeField(quda::GaugeField *cpuFat, quda::GaugeField *cpuLong, void *milc_fatlink,
51  void *milc_longlink, QudaGaugeParam &gauge_param);
52 void constructStaggeredHostDeviceGaugeField(void **qdp_inlink, void **qdp_longlink_cpu, void **qdp_longlink_gpu,
53  void **qdp_fatlink_cpu, void **qdp_fatlink_gpu, QudaGaugeParam &gauge_param,
54  int argc, char **argv, bool &gauge_loaded);
55 void constructStaggeredHostGaugeField(void **qdp_inlink, void **qdp_longlink, void **qdp_fatlink,
56  QudaGaugeParam &gauge_param, int argc, char **argv);
57 void constructFatLongGaugeField(void **fatlink, void **longlink, int type, QudaPrecision precision, QudaGaugeParam *,
59 void loadFatLongGaugeQuda(void *milc_fatlink, void *milc_longlink, QudaGaugeParam &gauge_param);
60 void computeLongLinkCPU(void **longlink, void **sitelink, QudaPrecision prec, void *act_path_coeff);
61 void computeHISQLinksCPU(void **fatlink, void **longlink, void **fatlink_eps, void **longlink_eps, void **sitelink,
62  void *qudaGaugeParamPtr, double **act_path_coeffs, double eps_naik);
63 template <typename Float>
67 template <typename Float> void applyStaggeredScaling(Float **res, QudaGaugeParam *param, int type);
68 //------------------------------------------------------
69 
70 // Spinor utils
71 //------------------------------------------------------
74 //------------------------------------------------------
75 
76 // MILC Data reordering routines
77 //------------------------------------------------------
78 void reorderQDPtoMILC(void *milc_out, void **qdp_in, int V, int siteSize, QudaPrecision out_precision,
79  QudaPrecision in_precision);
80 void reorderMILCtoQDP(void **qdp_out, void *milc_in, int V, int siteSize, QudaPrecision out_precision,
81  QudaPrecision in_precision);
82 //------------------------------------------------------
83 
84 // Set some basic parameters via command line or use defaults
85 void setQudaPrecisions();
86 void setQudaMgSolveTypes();
88 
89 // Wilson type gauge and clover fields
90 //------------------------------------------------------
91 void constructQudaGaugeField(void **gauge, int type, QudaPrecision precision, QudaGaugeParam *param);
92 void constructHostGaugeField(void **gauge, QudaGaugeParam &gauge_param, int argc, char **argv);
93 void constructHostCloverField(void *clover, void *clover_inv, QudaInvertParam &inv_param);
94 void constructQudaCloverField(void *clover, double norm, double diag, QudaPrecision precision);
95 template <typename Float> void constructCloverField(Float *res, double norm, double diag);
96 template <typename Float> void constructUnitGaugeField(Float **res, QudaGaugeParam *param);
97 template <typename Float>
99 template <typename Float> void applyGaugeFieldScaling(Float **gauge, int Vh, QudaGaugeParam *param);
100 //------------------------------------------------------
101 
102 // Spinor utils
103 //------------------------------------------------------
105  const QudaGaugeParam *gauge_param);
106 void constructRandomSpinorSource(void *v, int nSpin, int nColor, QudaPrecision precision, QudaSolutionType sol_type,
107  const int *const x, quda::RNG &rng);
108 //------------------------------------------------------
109 
110 // Helper functions
111 //------------------------------------------------------
113 {
116 };
117 //------------------------------------------------------
118 
119 void performanceStats(std::vector<double> &time, std::vector<double> &gflops, std::vector<int> &iter);
120 
121 void initComms(int argc, char **argv, std::array<int, 4> &commDims);
122 void initComms(int argc, char **argv, int *const commDims);
123 void finalizeComms();
124 void initRand();
125 
126 int lex_rank_from_coords_t(const int *coords, void *fdata);
127 int lex_rank_from_coords_x(const int *coords, void *fdata);
128 
129 void get_size_from_env(int *const dims, const char env[]);
130 void setDims(int *X);
131 void dw_setDims(int *X, const int L5);
132 int dimPartitioned(int dim);
133 
134 bool last_node_in_t();
135 
136 int index_4d_cb_from_coordinate_4d(const int coordinate[4], const int dim[4]);
137 void coordinate_from_shrinked_index(int coordinate[4], int shrinked_index, const int shrinked_dim[4],
138  const int shift[4], int parity);
139 
140 int neighborIndex(int i, int oddBit, int dx4, int dx3, int dx2, int dx1);
141 int neighborIndexFullLattice(int i, int dx4, int dx3, int dx2, int dx1);
142 
143 int neighborIndex(int dim[], int index, int oddBit, int dx[]);
144 int neighborIndexFullLattice(int dim[], int index, int dx[]);
145 
146 int neighborIndex_mg(int i, int oddBit, int dx4, int dx3, int dx2, int dx1);
147 int neighborIndexFullLattice_mg(int i, int dx4, int dx3, int dx2, int dx1);
148 
149 void printSpinorElement(void *spinor, int X, QudaPrecision precision);
150 void printGaugeElement(void *gauge, int X, QudaPrecision precision);
151 template <typename Float> void printVector(Float *v);
152 
153 int fullLatticeIndex(int i, int oddBit);
154 int fullLatticeIndex(int dim[], int index, int oddBit);
155 int getOddBit(int X);
156 
157 void createSiteLinkCPU(void **link, QudaPrecision precision, int phase);
158 void su3_construct(void *mat, QudaReconstructType reconstruct, QudaPrecision precision);
159 void su3_reconstruct(void *mat, int dir, int ga_idx, QudaReconstructType reconstruct, QudaPrecision precision,
161 
162 void compare_spinor(void *spinor_cpu, void *spinor_gpu, int len, QudaPrecision precision);
163 void strong_check(void *spinor, void *spinorGPU, int len, QudaPrecision precision);
164 int compare_floats(void *a, void *b, int len, double epsilon, QudaPrecision precision);
165 
166 void check_gauge(void **, void **, double epsilon, QudaPrecision precision);
167 
168 int strong_check_link(void **linkA, const char *msgA, void **linkB, const char *msgB, int len, QudaPrecision prec);
169 int strong_check_mom(void *momA, void *momB, int len, QudaPrecision prec);
170 
175 double mom_action(void *mom, QudaPrecision prec, int len);
176 
177 void createMomCPU(void *mom, QudaPrecision precision);
178 void createHwCPU(void *hw, QudaPrecision precision);
179 
180 // used by link fattening code
181 int x4_from_full_index(int i);
182 
183 // additions for dw (quickly hacked on)
184 int fullLatticeIndex_4d(int i, int oddBit);
185 int fullLatticeIndex_5d(int i, int oddBit);
186 int fullLatticeIndex_5d_4dpc(int i, int oddBit);
187 int process_command_line_option(int argc, char **argv, int *idx);
188 int process_options(int argc, char **argv);
189 
190 #ifdef __cplusplus
191 extern "C" {
192 #endif
193 
194 // Implemented in face_gauge.cpp
195 void exchange_cpu_sitelink(int *X, void **sitelink, void **ghost_sitelink, void **ghost_sitelink_diag,
196  QudaPrecision gPrecision, QudaGaugeParam *param, int optflag);
197 void exchange_cpu_sitelink_ex(int *X, int *R, void **sitelink, QudaGaugeFieldOrder cpu_order, QudaPrecision gPrecision,
198  int optflag, int geometry);
199 void exchange_cpu_staple(int *X, void *staple, void **ghost_staple, QudaPrecision gPrecision);
201 void exchange_llfat_cleanup(void);
202 
203 // Implemented in host_blas.cpp
204 double norm_2(void *vector, int len, QudaPrecision precision);
205 void mxpy(void *x, void *y, int len, QudaPrecision precision);
206 void ax(double a, void *x, int len, QudaPrecision precision);
207 void axpy(double a, void *x, void *y, int len, QudaPrecision precision);
208 void xpay(void *x, double a, void *y, int len, QudaPrecision precision);
209 void cxpay(void *x, double _Complex a, void *y, int len, QudaPrecision precision);
210 void cpu_axy(QudaPrecision prec, double a, void *x, void *y, int size);
211 void cpu_xpy(QudaPrecision prec, void *x, void *y, int size);
212 
213 #ifdef __cplusplus
214 }
215 #endif
216 
217 // Use for profiling
218 void stopwatchStart();
219 double stopwatchReadSeconds();
220 void performanceStats(double *time, double *gflops);
221 
223 {
224  switch (i) {
225  case 0: return QUDA_QUARTER_PRECISION;
226  case 1: return QUDA_HALF_PRECISION;
227  case 2: return QUDA_SINGLE_PRECISION;
228  case 3: return QUDA_DOUBLE_PRECISION;
229  }
230  return QUDA_INVALID_PRECISION;
231 }
232 
234 {
235  switch (recon) {
236  case QUDA_RECONSTRUCT_NO: return 4;
237  case QUDA_RECONSTRUCT_13:
238  case QUDA_RECONSTRUCT_12: return 2;
239  case QUDA_RECONSTRUCT_9:
240  case QUDA_RECONSTRUCT_8: return 1;
241  default: return 0;
242  }
243 }
244 
246 {
247  switch (prec) {
248  case QUDA_QUARTER_PRECISION: return 1e-1;
249  case QUDA_HALF_PRECISION: return 1e-3;
250  case QUDA_SINGLE_PRECISION: return 1e-4;
251  case QUDA_DOUBLE_PRECISION: return 1e-11;
252  case QUDA_INVALID_PRECISION: return 1.0;
253  }
254  return 1.0;
255 }
256 
257 // MG param types
258 void setMultigridParam(QudaMultigridParam &mg_param);
260 
261 // Eig param types
262 void setDeflationParam(QudaEigParam &df_param);
263 void setMultigridEigParam(QudaEigParam &eig_param, int level);
264 void setEigParam(QudaEigParam &eig_param);
265 
266 // Invert param types
273 
274 // Gauge param types
Class declaration to initialize and hold CURAND RNG states.
Definition: random_quda.h:23
std::array< int, 4 > dim
double epsilon
QudaSolutionType solution_type
double eps_naik
QudaDslashType dslash_type
QudaPrecision prec
void mat(void *out, void **link, void *in, int dagger_bit, int mu, QudaPrecision sPrecision, QudaPrecision gPrecision)
QudaParity parity
Definition: covdev_test.cpp:40
const int nColor
Definition: covdev_test.cpp:44
cpuColorSpinorField * spinor
Definition: covdev_test.cpp:31
QudaGaugeParam gauge_param
Definition: covdev_test.cpp:26
QudaInvertParam inv_param
Definition: covdev_test.cpp:27
enum QudaPrecision_s QudaPrecision
@ QUDA_WILSON_DSLASH
Definition: enum_quda.h:90
enum QudaGaugeFieldOrder_s QudaGaugeFieldOrder
@ QUDA_RECONSTRUCT_NO
Definition: enum_quda.h:70
@ QUDA_RECONSTRUCT_12
Definition: enum_quda.h:71
@ QUDA_RECONSTRUCT_13
Definition: enum_quda.h:74
@ QUDA_RECONSTRUCT_8
Definition: enum_quda.h:72
@ QUDA_RECONSTRUCT_9
Definition: enum_quda.h:73
enum QudaDslashType_s QudaDslashType
enum QudaSolutionType_s QudaSolutionType
enum QudaReconstructType_s QudaReconstructType
@ QUDA_MATPC_DAG_SOLUTION
Definition: enum_quda.h:160
@ QUDA_MATPC_SOLUTION
Definition: enum_quda.h:159
@ QUDA_MATPCDAG_MATPC_SOLUTION
Definition: enum_quda.h:161
@ QUDA_DOUBLE_PRECISION
Definition: enum_quda.h:65
@ QUDA_SINGLE_PRECISION
Definition: enum_quda.h:64
@ QUDA_INVALID_PRECISION
Definition: enum_quda.h:66
@ QUDA_QUARTER_PRECISION
Definition: enum_quda.h:62
@ QUDA_HALF_PRECISION
Definition: enum_quda.h:63
QudaPrecision local_prec
Definition: host_utils.cpp:56
double norm_2(void *vector, int len, QudaPrecision precision)
Definition: host_blas.cpp:48
void setQudaStaggeredEigTestParams()
int Vs_y
Definition: host_utils.h:18
void setStaggeredInvertParam(QudaInvertParam &inv_param)
Definition: set_params.cpp:868
int compare_floats(void *a, void *b, int len, double epsilon, QudaPrecision precision)
Definition: host_utils.cpp:889
void constructHostCloverField(void *clover, void *clover_inv, QudaInvertParam &inv_param)
Definition: host_utils.cpp:186
int Vh
Definition: host_utils.cpp:38
size_t host_gauge_data_type_size
Definition: host_utils.cpp:65
int dimPartitioned(int dim)
Definition: host_utils.cpp:376
int V5h
Definition: host_utils.cpp:50
QudaPrecision & cuda_prec
Definition: host_utils.cpp:58
void applyStaggeredScaling(Float **res, QudaGaugeParam *param, int type)
void initComms(int argc, char **argv, std::array< int, 4 > &commDims)
Definition: host_utils.cpp:255
size_t host_spinor_data_type_size
Definition: host_utils.cpp:66
QudaPrecision & cuda_prec_sloppy
Definition: host_utils.cpp:59
void setQudaMgSolveTypes()
Definition: host_utils.cpp:81
void constructStaggeredHostGhostGaugeField(quda::GaugeField *cpuFat, quda::GaugeField *cpuLong, void *milc_fatlink, void *milc_longlink, QudaGaugeParam &gauge_param)
void ax(double a, void *x, int len, QudaPrecision precision)
Definition: host_blas.cpp:22
void applyGaugeFieldScaling(Float **gauge, int Vh, QudaGaugeParam *param)
Definition: host_utils.cpp:968
int Vsh_y
Definition: host_utils.h:19
void createMomCPU(void *mom, QudaPrecision precision)
int Vsh_x
Definition: host_utils.cpp:40
void printGaugeElement(void *gauge, int X, QudaPrecision precision)
Definition: host_utils.cpp:575
int E1h
Definition: host_utils.h:21
void constructUnitGaugeField(Float **res, QudaGaugeParam *param)
void constructRandomGaugeField(Float **res, QudaGaugeParam *param, QudaDslashType dslash_type=QUDA_WILSON_DSLASH)
void setWilsonGaugeParam(QudaGaugeParam &gauge_param)
Definition: set_params.cpp:37
int strong_check_link(void **linkA, const char *msgA, void **linkB, const char *msgB, int len, QudaPrecision prec)
void constructWilsonTestSpinorParam(quda::ColorSpinorParam *csParam, const QudaInvertParam *inv_param, const QudaGaugeParam *gauge_param)
Definition: host_utils.cpp:207
int neighborIndexFullLattice(int i, int dx4, int dx3, int dx2, int dx1)
Definition: host_utils.cpp:490
void constructStaggeredHostDeviceGaugeField(void **qdp_inlink, void **qdp_longlink_cpu, void **qdp_longlink_gpu, void **qdp_fatlink_cpu, void **qdp_fatlink_gpu, QudaGaugeParam &gauge_param, int argc, char **argv, bool &gauge_loaded)
void finalizeComms()
Definition: host_utils.cpp:292
int x4_from_full_index(int i)
Definition: host_utils.cpp:953
void constructStaggeredTestSpinorParam(quda::ColorSpinorParam *csParam, const QudaInvertParam *inv_param, const QudaGaugeParam *gauge_param)
void performanceStats(std::vector< double > &time, std::vector< double > &gflops, std::vector< int > &iter)
QudaPrecision & cuda_prec_eigensolver
Definition: host_utils.cpp:62
int V5
Definition: host_utils.cpp:49
void setQudaDefaultMgTestParams()
Definition: host_utils.cpp:89
int process_command_line_option(int argc, char **argv, int *idx)
int fullLatticeIndex_5d(int i, int oddBit)
Definition: host_utils.cpp:940
void setMultigridInvertParam(QudaInvertParam &inv_param)
Definition: set_params.cpp:600
void reorderQDPtoMILC(void *milc_out, void **qdp_in, int V, int siteSize, QudaPrecision out_precision, QudaPrecision in_precision)
void setEigParam(QudaEigParam &eig_param)
Definition: set_params.cpp:263
void mxpy(void *x, void *y, int len, QudaPrecision precision)
Definition: host_blas.cpp:33
int Z[4]
Definition: host_utils.cpp:36
int fullLatticeIndex_4d(int i, int oddBit)
Definition: host_utils.cpp:902
size_t host_clover_data_type_size
Definition: host_utils.cpp:67
QudaPrecision & cuda_prec_precondition
Definition: host_utils.cpp:61
int strong_check_mom(void *momA, void *momB, int len, QudaPrecision prec)
int fullLatticeIndex(int i, int oddBit)
Definition: host_utils.cpp:605
void constructFatLongGaugeField(void **fatlink, void **longlink, int type, QudaPrecision precision, QudaGaugeParam *, QudaDslashType dslash_type)
int neighborIndexFullLattice_mg(int i, int dx4, int dx3, int dx2, int dx1)
Definition: host_utils.cpp:528
int Vs_x
Definition: host_utils.cpp:39
int getReconstructNibble(QudaReconstructType recon)
Definition: host_utils.h:233
void constructQudaCloverField(void *clover, double norm, double diag, QudaPrecision precision)
Definition: host_utils.cpp:199
void createSiteLinkCPU(void **link, QudaPrecision precision, int phase)
void setInvertParam(QudaInvertParam &inv_param)
Definition: set_params.cpp:113
int Vs_t
Definition: host_utils.h:18
void computeLongLinkCPU(void **longlink, void **sitelink, QudaPrecision prec, void *act_path_coeff)
void cxpay(void *x, double _Complex a, void *y, int len, QudaPrecision precision)
Definition: host_blas.cpp:64
QudaPrecision & cuda_prec_refinement_sloppy
Definition: host_utils.cpp:60
int process_options(int argc, char **argv)
void setQudaStaggeredInvTestParams()
void exchange_cpu_sitelink_ex(int *X, int *R, void **sitelink, QudaGaugeFieldOrder cpu_order, QudaPrecision gPrecision, int optflag, int geometry)
Definition: face_gauge.cpp:644
int Vs_z
Definition: host_utils.h:18
void dw_setDims(int *X, const int L5)
Definition: host_utils.cpp:353
int E1
Definition: host_utils.cpp:44
void setStaggeredGaugeParam(QudaGaugeParam &gauge_param)
Definition: set_params.cpp:69
QudaPrecision & cpu_prec
Definition: host_utils.cpp:57
int lex_rank_from_coords_x(const int *coords, void *fdata)
Definition: host_utils.cpp:669
void printSpinorElement(void *spinor, int X, QudaPrecision precision)
Definition: host_utils.cpp:566
void su3_construct(void *mat, QudaReconstructType reconstruct, QudaPrecision precision)
Definition: host_utils.cpp:758
bool isPCSolution(QudaSolutionType solution_type)
Definition: host_utils.h:112
int Vsh_z
Definition: host_utils.h:19
void constructRandomSpinorSource(void *v, int nSpin, int nColor, QudaPrecision precision, QudaSolutionType sol_type, const int *const x, quda::RNG &rng)
Definition: host_utils.cpp:235
void computeHISQLinksCPU(void **fatlink, void **longlink, void **fatlink_eps, void **longlink_eps, void **sitelink, void *qudaGaugeParamPtr, double **act_path_coeffs, double eps_naik)
void xpay(void *x, double a, void *y, int len, QudaPrecision precision)
Definition: host_blas.cpp:59
int Vsh_t
Definition: host_utils.h:19
void setQudaPrecisions()
Definition: host_utils.cpp:69
int E2
Definition: host_utils.h:21
void applyGaugeFieldScaling_long(Float **gauge, int Vh, QudaGaugeParam *param, QudaDslashType dslash_type)
void setStaggeredMGInvertParam(QudaInvertParam &inv_param)
Definition: set_params.cpp:792
void setContractInvertParam(QudaInvertParam &inv_param)
Definition: set_params.cpp:768
void cpu_axy(QudaPrecision prec, double a, void *x, void *y, int size)
Definition: host_blas.cpp:74
void constructHostGaugeField(void **gauge, QudaGaugeParam &gauge_param, int argc, char **argv)
Definition: host_utils.cpp:166
int V
Definition: host_utils.cpp:37
int Ls
Definition: host_utils.cpp:48
void setMultigridEigParam(QudaEigParam &eig_param, int level)
Definition: set_params.cpp:712
void coordinate_from_shrinked_index(int coordinate[4], int shrinked_index, const int shrinked_dim[4], const int shift[4], int parity)
Definition: host_utils.cpp:393
int E4
Definition: host_utils.h:21
int E3
Definition: host_utils.h:21
int E[4]
Definition: host_utils.cpp:45
void constructCloverField(Float *res, double norm, double diag)
double stopwatchReadSeconds()
double mom_action(void *mom, QudaPrecision prec, int len)
Host reference implementation of the momentum action contribution.
void cpu_xpy(QudaPrecision prec, void *x, void *y, int size)
Definition: host_blas.cpp:87
int Vh_ex
Definition: host_utils.h:23
void createHwCPU(void *hw, QudaPrecision precision)
int V_ex
Definition: host_utils.cpp:46
void axpy(double a, void *x, void *y, int len, QudaPrecision precision)
Definition: host_blas.cpp:11
int faceVolume[4]
Definition: host_utils.cpp:41
void setDeflatedInvertParam(QudaInvertParam &inv_param)
void printVector(Float *v)
Definition: host_utils.cpp:676
int neighborIndex(int i, int oddBit, int dx4, int dx3, int dx2, int dx1)
Definition: host_utils.cpp:423
void compare_spinor(void *spinor_cpu, void *spinor_gpu, int len, QudaPrecision precision)
int lex_rank_from_coords_t(const int *coords, void *fdata)
Definition: host_utils.cpp:662
void setMultigridParam(QudaMultigridParam &mg_param)
Definition: set_params.cpp:326
void exchange_llfat_cleanup(void)
void check_gauge(void **, void **, double epsilon, QudaPrecision precision)
int getOddBit(int X)
Definition: host_utils.cpp:682
double kappa5
Definition: host_utils.cpp:51
bool last_node_in_t()
Definition: host_utils.cpp:378
void stopwatchStart()
void exchange_llfat_init(QudaPrecision prec)
Definition: face_gauge.cpp:373
void constructQudaGaugeField(void **gauge, int type, QudaPrecision precision, QudaGaugeParam *param)
Definition: host_utils.cpp:146
QudaPrecision & cuda_prec_ritz
Definition: host_utils.cpp:63
void constructStaggeredHostGaugeField(void **qdp_inlink, void **qdp_longlink, void **qdp_fatlink, QudaGaugeParam &gauge_param, int argc, char **argv)
int neighborIndex_mg(int i, int oddBit, int dx4, int dx3, int dx2, int dx1)
Definition: host_utils.cpp:457
double getTolerance(QudaPrecision prec)
Definition: host_utils.h:245
void exchange_cpu_sitelink(int *X, void **sitelink, void **ghost_sitelink, void **ghost_sitelink_diag, QudaPrecision gPrecision, QudaGaugeParam *param, int optflag)
Definition: face_gauge.cpp:512
void su3_reconstruct(void *mat, int dir, int ga_idx, QudaReconstructType reconstruct, QudaPrecision precision, QudaGaugeParam *param)
Definition: host_utils.cpp:861
void loadFatLongGaugeQuda(void *milc_fatlink, void *milc_longlink, QudaGaugeParam &gauge_param)
int index_4d_cb_from_coordinate_4d(const int coordinate[4], const int dim[4])
Definition: host_utils.cpp:388
void setDeflationParam(QudaEigParam &df_param)
void exchange_cpu_staple(int *X, void *staple, void **ghost_staple, QudaPrecision gPrecision)
Definition: face_gauge.cpp:976
void get_size_from_env(int *const dims, const char env[])
Definition: host_utils.cpp:645
void setGaugeParam(QudaGaugeParam &gauge_param)
Definition: su3_test.cpp:64
QudaPrecision getPrecision(int i)
Definition: host_utils.h:222
int fullLatticeIndex_5d_4dpc(int i, int oddBit)
Definition: host_utils.cpp:947
void reorderMILCtoQDP(void **qdp_out, void *milc_in, int V, int siteSize, QudaPrecision out_precision, QudaPrecision in_precision)
void setStaggeredMultigridParam(QudaMultigridParam &mg_param)
Definition: set_params.cpp:951
void setDims(int *X)
Definition: host_utils.cpp:315
void strong_check(void *spinor, void *spinorGPU, int len, QudaPrecision precision)
void initRand()
Definition: host_utils.cpp:302
__host__ __device__ ValueType norm(const complex< ValueType > &z)
Returns the magnitude of z squared.
FloatingPoint< float > Float
ColorSpinorParam csParam
Definition: pack_test.cpp:25
QudaGaugeParam param
Definition: pack_test.cpp:18
Main header file for the QUDA library.
bool gauge_loaded