15 #define MAX(a,b) ((a)>(b)?(a):(b)) 38 extern void usage(
char** );
51 #define MAX(a,b) ((a)>(b)?(a):(b)) 57 printfQuda(
"S_dimension T_dimension Nspin Ncolor\n");
144 int x_face_size = gParam.
x[1]*gParam.
x[2]*gParam.
x[3]/2;
145 int y_face_size = gParam.
x[0]*gParam.
x[2]*gParam.
x[3]/2;
146 int z_face_size = gParam.
x[0]*gParam.
x[1]*gParam.
x[3]/2;
147 int t_face_size = gParam.
x[0]*gParam.
x[1]*gParam.
x[2]/2;
148 int pad =
MAX(x_face_size, y_face_size);
149 pad =
MAX(pad, z_face_size);
150 pad =
MAX(pad, t_face_size);
151 gParam.
pad = gParam.
nFace * pad * 2;
158 Yhat_d->
copy(*Yhat_h);
166 Xinv_d->
copy(*Xinv_h);
193 cudaEvent_t start,
end;
194 cudaEventCreate(&start);
195 cudaEventCreate(&end);
196 cudaEventRecord(start, 0);
203 for (
int i=0; i <
niter; ++i) dirac->
M(*xD, *yD);
212 cudaEventRecord(end, 0);
213 cudaEventSynchronize(end);
215 cudaEventElapsedTime(&runTime, start, end);
216 cudaEventDestroy(start);
217 cudaEventDestroy(end);
219 double secs = runTime / 1000;
230 int main(
int argc,
char** argv)
236 for (
int i = 1; i < argc; i++){
240 printfQuda(
"ERROR: Invalid option:%s\n", argv[i]);
255 for (
int c=24; c<=32; c+=8) {
262 dirac =
new DiracCoarse(param, Y_h, X_h, Xinv_h, Yhat_h, Y_d, X_d, Xinv_d, Yhat_d);
271 double gflops = (dirac->
Flops()*1e-9)/(secs);
int dimPartitioned(int dim)
QudaGhostExchange ghostExchange
void setPrecision(QudaPrecision precision, QudaPrecision ghost_precision=QUDA_INVALID_PRECISION, bool force_native=false)
enum QudaPrecision_s QudaPrecision
int process_command_line_option(int argc, char **argv, int *idx)
const ColorSpinorField & Even() const
const ColorSpinorField & Odd() const
QudaPrecision smoother_halo_prec
const char * get_prec_str(QudaPrecision prec)
void Clover(ColorSpinorField &out, const ColorSpinorField &in, const QudaParity parity) const
Apply the coarse clover operator.
unsigned long long Flops() const
QudaSiteSubset siteSubset
QudaPrecision prec_sloppy
virtual void Dslash(ColorSpinorField &out, const ColorSpinorField &in, const QudaParity parity) const
Apply DslashXpay out = (D * in)
void initQuda(int device)
QudaFieldOrder fieldOrder
QudaGammaBasis gammaBasis
QudaGaugeFieldOrder order
QudaPrecision halo_precision
double benchmark(int test, const int niter)
void setPrecision(QudaPrecision precision, bool force_native=false)
Helper function for setting the precision and corresponding field order for QUDA internal fields...
QudaDslashType dslash_type
QudaPrecision Precision() const
enum QudaDslashType_s QudaDslashType
QudaReconstructType reconstruct
QudaFieldGeometry geometry
QudaInverterType inv_type
virtual void M(ColorSpinorField &out, const ColorSpinorField &in) const
Apply the full operator.
void initComms(int argc, char **argv, int *const commDims)
void copy(const GaugeField &src)
int gridsize_from_cmdline[]
void setVerbosity(QudaVerbosity verbosity)
void initFields(QudaPrecision prec)
int main(int argc, char **argv)
enum QudaInverterType_s QudaInverterType