QUDA
v0.5.0
A library for QCD on GPUs
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
quda
include
quda.h
Go to the documentation of this file.
1
#ifndef _QUDA_H
2
#define _QUDA_H
3
12
#include <
enum_quda.h
>
13
#include <stdio.h>
/* for FILE */
14
15
#define QUDA_VERSION_MAJOR 0
16
#define QUDA_VERSION_MINOR 5
17
#define QUDA_VERSION_SUBMINOR 0
18
23
#define QUDA_VERSION ((QUDA_VERSION_MAJOR<<16) | (QUDA_VERSION_MINOR<<8) | QUDA_VERSION_SUBMINOR)
24
25
31
#define QUDA_MAX_DIM 5
32
38
#define QUDA_MAX_MULTI_SHIFT 32
39
40
41
#ifdef __cplusplus
42
extern
"C"
{
43
#endif
44
49
typedef
struct
QudaGaugeParam_s
{
50
51
int
X
[4];
52
53
double
anisotropy
;
54
double
tadpole_coeff
;
56
QudaLinkType
type
;
57
QudaGaugeFieldOrder
gauge_order
;
58
59
QudaTboundary
t_boundary
;
60
61
QudaPrecision
cpu_prec
;
62
63
QudaPrecision
cuda_prec
;
64
QudaReconstructType
reconstruct
;
65
66
QudaPrecision
cuda_prec_sloppy
;
67
QudaReconstructType
reconstruct_sloppy
;
68
69
QudaPrecision
cuda_prec_precondition
;
70
QudaReconstructType
reconstruct_precondition
;
71
72
QudaGaugeFixed
gauge_fix
;
73
74
int
ga_pad
;
75
77
int
site_ga_pad
;
78
79
int
staple_pad
;
80
int
llfat_ga_pad
;
81
int
mom_ga_pad
;
82
double
gaugeGiB
;
83
84
int
preserve_gauge
;
86
}
QudaGaugeParam
;
87
88
92
typedef
struct
QudaInvertParam_s
{
93
94
QudaFieldLocation
input_location
;
95
QudaFieldLocation
output_location
;
97
QudaDslashType
dslash_type
;
98
QudaInverterType
inv_type
;
99
100
double
mass
;
101
double
kappa
;
103
double
m5
;
104
int
Ls
;
106
double
mu
;
107
double
epsilon
;
109
QudaTwistFlavorType
twist_flavor
;
111
double
tol
;
112
double
tol_hq
;
113
double
true_res
;
114
double
true_res_hq
;
115
int
maxiter
;
116
double
reliable_delta
;
118
int
num_offset
;
121
double
offset
[
QUDA_MAX_MULTI_SHIFT
];
122
124
double
tol_offset
[
QUDA_MAX_MULTI_SHIFT
];
125
127
double
tol_hq_offset
[
QUDA_MAX_MULTI_SHIFT
];
128
130
double
true_res_offset
[
QUDA_MAX_MULTI_SHIFT
];
131
133
double
true_res_hq_offset
[
QUDA_MAX_MULTI_SHIFT
];
134
135
QudaSolutionType
solution_type
;
136
QudaSolveType
solve_type
;
137
QudaMatPCType
matpc_type
;
138
QudaDagType
dagger
;
139
QudaMassNormalization
mass_normalization
;
140
141
QudaPreserveSource
preserve_source
;
142
143
QudaPrecision
cpu_prec
;
144
QudaPrecision
cuda_prec
;
145
QudaPrecision
cuda_prec_sloppy
;
146
QudaPrecision
cuda_prec_precondition
;
147
148
QudaDiracFieldOrder
dirac_order
;
149
151
QudaGammaBasis
gamma_basis
;
152
153
QudaPrecision
clover_cpu_prec
;
154
QudaPrecision
clover_cuda_prec
;
155
QudaPrecision
clover_cuda_prec_sloppy
;
156
QudaPrecision
clover_cuda_prec_precondition
;
157
158
QudaCloverFieldOrder
clover_order
;
159
QudaUseInitGuess
use_init_guess
;
160
161
QudaVerbosity
verbosity
;
162
163
int
sp_pad
;
164
int
cl_pad
;
165
166
int
iter
;
167
double
spinorGiB
;
168
double
cloverGiB
;
169
double
gflops
;
170
double
secs
;
171
173
QudaTune
tune
;
174
176
int
gcrNkrylov
;
177
178
/*
179
* The following parameters are related to the domain-decomposed
180
* preconditioner, if enabled.
181
*/
182
187
QudaInverterType
inv_type_precondition
;
188
190
QudaVerbosity
verbosity_precondition
;
191
193
double
tol_precondition
;
194
196
int
maxiter_precondition
;
197
199
double
omega
;
200
202
int
precondition_cycle
;
203
205
QudaSchwarzType
schwarz_type
;
206
215
QudaResidualType
residual_type
;
216
217
}
QudaInvertParam
;
218
219
220
/*
221
* Interface functions, found in interface_quda.cpp
222
*/
223
249
void
setVerbosityQuda
(
QudaVerbosity
verbosity,
const
char
prefix[],
250
FILE *outfile);
251
262
typedef
int (*
QudaCommsMap
)(
const
int
*coords,
void
*fdata);
263
290
void
initCommsGridQuda
(
int
nDim,
const
int
*dims,
QudaCommsMap
func,
void
*fdata);
291
300
void
initQuda
(
int
device
);
301
305
void
endQuda
(
void
);
306
314
QudaGaugeParam
newQudaGaugeParam
(
void
);
315
323
QudaInvertParam
newQudaInvertParam
(
void
);
324
329
void
printQudaGaugeParam
(
QudaGaugeParam
*
param
);
330
335
void
printQudaInvertParam
(
QudaInvertParam
*
param
);
336
342
void
loadGaugeQuda
(
void
*h_gauge,
QudaGaugeParam
*
param
);
343
347
void
freeGaugeQuda
(
void
);
348
354
void
saveGaugeQuda
(
void
*h_gauge,
QudaGaugeParam
*
param
);
355
363
void
loadCloverQuda
(
void
*h_clover,
void
*h_clovinv,
364
QudaInvertParam
*
inv_param
);
365
369
void
freeCloverQuda
(
void
);
370
380
void
invertQuda
(
void
*h_x,
void
*h_b,
QudaInvertParam
*
param
);
381
389
void
invertMultiShiftQuda
(
void
**_hp_x,
void
*_hp_b,
QudaInvertParam
*
param
);
390
399
void
dslashQuda
(
void
*h_out,
void
*h_in,
QudaInvertParam
*
inv_param
,
400
QudaParity
parity
);
401
411
void
cloverQuda
(
void
*h_out,
void
*h_in,
QudaInvertParam
*
inv_param
,
412
QudaParity
*
parity
,
int
inverse);
413
421
void
MatQuda
(
void
*h_out,
void
*h_in,
QudaInvertParam
*
inv_param
);
422
430
void
MatDagMatQuda
(
void
*h_out,
void
*h_in,
QudaInvertParam
*
inv_param
);
431
432
433
/*
434
* The following routines are temporary additions used by the HISQ
435
* link-fattening code.
436
*/
437
438
void
set_dim
(
int
*);
439
void
pack_ghost
(
void
**cpuLink,
void
**cpuGhost,
int
nFace,
440
QudaPrecision
precision);
441
void
setFatLinkPadding
(
QudaComputeFatMethod
method,
QudaGaugeParam
*
param
);
442
int
computeFatLinkQuda
(
void
*
fatlink
,
void
** sitelink,
443
double
* act_path_coeff,
QudaGaugeParam
*
param
,
444
QudaComputeFatMethod
method);
445
449
int
computeGaugeForceQuda
(
void
* mom,
void
* sitelink,
int
*** input_path_buf,
int
* path_length,
450
void
* loop_coeff,
int
num_paths,
int
max_length,
double
eb3,
451
QudaGaugeParam
* qudaGaugeParam,
double
* timeinfo);
452
453
#ifdef __cplusplus
454
}
455
#endif
456
457
#include <
quda_fortran.h
>
458
/* #include <quda_new_interface.h> */
459
460
#endif
/* _QUDA_H */
461
Generated on Wed Mar 20 2013 12:52:14 for QUDA by
1.8.2