6 #ifndef __syssolver_mdagm_quda_clover_w_h__
7 #define __syssolver_mdagm_quda_clover_w_h__
45 namespace MdagMSysSolverQUDACloverEnv
58 class MdagMSysSolverQUDAClover :
public MdagMSystemSolver<LatticeFermion>
61 typedef LatticeFermion
T;
62 typedef LatticeColorMatrix
U;
63 typedef multi1d<LatticeColorMatrix>
Q;
65 typedef LatticeFermionF
TF;
66 typedef LatticeColorMatrixF
UF;
67 typedef multi1d<LatticeColorMatrixF>
QF;
69 typedef LatticeFermionF
TD;
70 typedef LatticeColorMatrixF
UD;
71 typedef multi1d<LatticeColorMatrixF>
QD;
73 typedef WordType<T>::Type_t REALT;
79 MdagMSysSolverQUDAClover(Handle< LinearOperator<T> > A_,
80 Handle< FermState<T,Q,Q> > state_,
81 const SysSolverQUDACloverParams& invParam_) :
84 QDPIO::cout <<
"MdagMSysSolverQUDAClover:" << std::endl;
89 int s =
sizeof( WordType<T>::Type_t );
91 cpu_prec = QUDA_SINGLE_PRECISION;
94 cpu_prec = QUDA_DOUBLE_PRECISION;
99 switch( invParam.cudaPrecision ) {
101 gpu_prec = QUDA_HALF_PRECISION;
104 gpu_prec = QUDA_SINGLE_PRECISION;
107 gpu_prec = QUDA_DOUBLE_PRECISION;
116 switch( invParam.cudaSloppyPrecision ) {
118 gpu_half_prec = QUDA_HALF_PRECISION;
121 gpu_half_prec = QUDA_SINGLE_PRECISION;
124 gpu_half_prec = QUDA_DOUBLE_PRECISION;
127 gpu_half_prec = gpu_prec;
132 q_gauge_param = newQudaGaugeParam();
133 quda_inv_param = newQudaInvertParam();
136 const multi1d<int>& latdims = Layout::subgridLattSize();
138 q_gauge_param.X[0] = latdims[0];
139 q_gauge_param.X[1] = latdims[1];
140 q_gauge_param.X[2] = latdims[2];
141 q_gauge_param.X[3] = latdims[3];
146 q_gauge_param.type = QUDA_WILSON_LINKS;
148 #ifndef BUILD_QUDA_DEVIFACE_GAUGE
149 q_gauge_param.gauge_order = QUDA_QDP_GAUGE_ORDER;
152 q_gauge_param.location = QUDA_CUDA_FIELD_LOCATION;
153 q_gauge_param.gauge_order = QUDA_QDPJIT_GAUGE_ORDER;
160 if( invParam.AntiPeriodicT ) {
161 q_gauge_param.t_boundary = QUDA_ANTI_PERIODIC_T;
164 q_gauge_param.t_boundary = QUDA_PERIODIC_T;
168 q_gauge_param.cpu_prec = cpu_prec;
169 q_gauge_param.cuda_prec = gpu_prec;
172 switch( invParam.cudaReconstruct ) {
174 q_gauge_param.reconstruct = QUDA_RECONSTRUCT_NO;
177 q_gauge_param.reconstruct = QUDA_RECONSTRUCT_8;
180 q_gauge_param.reconstruct = QUDA_RECONSTRUCT_12;
183 q_gauge_param.reconstruct = QUDA_RECONSTRUCT_12;
187 q_gauge_param.cuda_prec_sloppy = gpu_half_prec;
192 q_gauge_param.cuda_prec_precondition = gpu_half_prec;
194 switch( invParam.cudaSloppyReconstruct ) {
196 q_gauge_param.reconstruct_sloppy = QUDA_RECONSTRUCT_NO;
199 q_gauge_param.reconstruct_sloppy = QUDA_RECONSTRUCT_8;
202 q_gauge_param.reconstruct_sloppy = QUDA_RECONSTRUCT_12;
205 q_gauge_param.reconstruct_sloppy = QUDA_RECONSTRUCT_12;
210 q_gauge_param.reconstruct_precondition=q_gauge_param.reconstruct_sloppy;
219 links_single[
mu] = (state_->getLinks())[
mu];
223 if( invParam.axialGaugeP ) {
224 QDPIO::cout <<
"Fixing Temporal Gauge" << std::endl;
227 links_single[
mu] = GFixMat*(state_->getLinks())[
mu]*adj(shift(GFixMat,
FORWARD,
mu));
229 q_gauge_param.gauge_fix = QUDA_GAUGE_FIXED_YES;
233 q_gauge_param.gauge_fix = QUDA_GAUGE_FIXED_NO;
237 const AnisoParam_t& aniso = invParam.CloverParams.anisoParam;
239 Real gamma_f = aniso.xi_0 / aniso.nu;
240 q_gauge_param.anisotropy = toDouble(gamma_f);
243 q_gauge_param.anisotropy = 1.0;
248 Handle<FermState<T,Q,Q> > fstate(
new PeriodicFermState<T,Q,Q>(links_single));
253 links_single[
mu] *= cf[
mu];
259 quda_inv_param.dslash_type = QUDA_CLOVER_WILSON_DSLASH;
262 switch( invParam.solverType ) {
264 quda_inv_param.inv_type = QUDA_CG_INVERTER;
265 solver_string =
"CG";
268 quda_inv_param.inv_type = QUDA_BICGSTAB_INVERTER;
269 solver_string =
"BICGSTAB";
272 quda_inv_param.inv_type = QUDA_GCR_INVERTER;
273 solver_string =
"GCR";
276 quda_inv_param.inv_type = QUDA_CG_INVERTER;
277 solver_string =
"CG";
283 quda_inv_param.compute_true_res = 0;
293 quda_inv_param.kappa = 0.5;
298 quda_inv_param.clover_coeff = 1.0;
299 quda_inv_param.tol = toDouble(invParam.RsdTarget);
300 quda_inv_param.maxiter = invParam.MaxIter;
301 quda_inv_param.reliable_delta = toDouble(invParam.Delta);
302 quda_inv_param.pipeline = invParam.Pipeline;
305 quda_inv_param.solution_type = QUDA_MATPCDAG_MATPC_SOLUTION;
308 switch( invParam.solverType ) {
310 quda_inv_param.solve_type = QUDA_NORMOP_PC_SOLVE;
313 quda_inv_param.solve_type = QUDA_DIRECT_PC_SOLVE;
317 quda_inv_param.solve_type = QUDA_DIRECT_PC_SOLVE;
320 quda_inv_param.solve_type = QUDA_DIRECT_PC_SOLVE;
323 quda_inv_param.solve_type = QUDA_DIRECT_PC_SOLVE;
327 quda_inv_param.solve_type = QUDA_NORMOP_PC_SOLVE;
333 if( invParam.asymmetricP ) {
334 QDPIO::cout <<
"Working with Asymmetric LinOp" << std::endl;
335 quda_inv_param.matpc_type = QUDA_MATPC_ODD_ODD_ASYMMETRIC;
338 QDPIO::cout <<
"Working with Symmetric LinOp" << std::endl;
339 quda_inv_param.matpc_type = QUDA_MATPC_ODD_ODD;
342 quda_inv_param.dagger = QUDA_DAG_NO;
343 quda_inv_param.mass_normalization = QUDA_KAPPA_NORMALIZATION;
345 quda_inv_param.cpu_prec = cpu_prec;
346 quda_inv_param.cuda_prec = gpu_prec;
347 quda_inv_param.cuda_prec_sloppy = gpu_half_prec;
351 quda_inv_param.cuda_prec_precondition = gpu_half_prec;
353 quda_inv_param.preserve_source = QUDA_PRESERVE_SOURCE_NO;
354 quda_inv_param.gamma_basis = QUDA_DEGRAND_ROSSI_GAMMA_BASIS;
356 #ifndef BUILD_QUDA_DEVIFACE_SPINOR
357 quda_inv_param.dirac_order = QUDA_DIRAC_ORDER;
358 quda_inv_param.input_location = QUDA_CPU_FIELD_LOCATION;
359 quda_inv_param.output_location = QUDA_CPU_FIELD_LOCATION;
362 quda_inv_param.dirac_order = QUDA_QDPJIT_DIRAC_ORDER;
363 quda_inv_param.input_location = QUDA_CUDA_FIELD_LOCATION;
364 quda_inv_param.output_location = QUDA_CUDA_FIELD_LOCATION;
368 quda_inv_param.clover_cpu_prec = cpu_prec;
369 quda_inv_param.clover_cuda_prec = gpu_prec;
370 quda_inv_param.clover_cuda_prec_sloppy = gpu_half_prec;
374 quda_inv_param.clover_cuda_prec_precondition = gpu_half_prec;
376 #ifndef BUILD_QUDA_DEVIFACE_CLOVER
377 quda_inv_param.clover_order = QUDA_PACKED_CLOVER_ORDER;
380 quda_inv_param.clover_location = QUDA_CUDA_FIELD_LOCATION;
381 quda_inv_param.clover_order = QUDA_QDPJIT_CLOVER_ORDER;
386 if( invParam.tuneDslashP ) {
387 QDPIO::cout <<
"Enabling Dslash Autotuning" << std::endl;
389 quda_inv_param.tune = QUDA_TUNE_YES;
392 QDPIO::cout <<
"Disabling Dslash Autotuning" << std::endl;
394 quda_inv_param.tune = QUDA_TUNE_NO;
399 multi1d<int> face_size(4);
400 face_size[0] = latdims[1]*latdims[2]*latdims[3]/2;
401 face_size[1] = latdims[0]*latdims[2]*latdims[3]/2;
402 face_size[2] = latdims[0]*latdims[1]*latdims[3]/2;
403 face_size[3] = latdims[0]*latdims[1]*latdims[2]/2;
405 int max_face = face_size[0];
406 for(
int i=1;
i <=3;
i++) {
407 if ( face_size[
i] > max_face ) {
408 max_face = face_size[
i];
413 q_gauge_param.ga_pad = max_face;
414 quda_inv_param.sp_pad = 0;
415 quda_inv_param.cl_pad = 0;
417 if( invParam.innerParamsP ) {
418 QDPIO::cout <<
"Setting inner solver params" << std::endl;
420 GCRInnerSolverParams ip = *(invParam.innerParams);
422 switch( ip.precPrecondition ) {
424 quda_inv_param.cuda_prec_precondition = QUDA_HALF_PRECISION;
425 quda_inv_param.clover_cuda_prec_precondition = QUDA_HALF_PRECISION;
426 q_gauge_param.cuda_prec_precondition = QUDA_HALF_PRECISION;
430 quda_inv_param.cuda_prec_precondition = QUDA_SINGLE_PRECISION;
431 quda_inv_param.clover_cuda_prec_precondition = QUDA_SINGLE_PRECISION;
432 q_gauge_param.cuda_prec_precondition = QUDA_SINGLE_PRECISION;
436 quda_inv_param.cuda_prec_precondition = QUDA_DOUBLE_PRECISION;
437 quda_inv_param.clover_cuda_prec_precondition = QUDA_DOUBLE_PRECISION;
438 q_gauge_param.cuda_prec_precondition = QUDA_DOUBLE_PRECISION;
441 quda_inv_param.cuda_prec_precondition = QUDA_HALF_PRECISION;
442 quda_inv_param.clover_cuda_prec_precondition = QUDA_HALF_PRECISION;
443 q_gauge_param.cuda_prec_precondition = QUDA_HALF_PRECISION;
447 switch( ip.reconstructPrecondition ) {
449 q_gauge_param.reconstruct_precondition = QUDA_RECONSTRUCT_NO;
452 q_gauge_param.reconstruct_precondition = QUDA_RECONSTRUCT_8;
455 q_gauge_param.reconstruct_precondition = QUDA_RECONSTRUCT_12;
458 q_gauge_param.reconstruct_precondition = QUDA_RECONSTRUCT_12;
462 quda_inv_param.tol_precondition = toDouble(ip.tolPrecondition);
463 quda_inv_param.maxiter_precondition = ip.maxIterPrecondition;
464 quda_inv_param.gcrNkrylov = ip.gcrNkrylov;
465 switch( ip.schwarzType ) {
467 quda_inv_param.schwarz_type = QUDA_ADDITIVE_SCHWARZ;
470 quda_inv_param.schwarz_type = QUDA_MULTIPLICATIVE_SCHWARZ;
473 quda_inv_param.schwarz_type = QUDA_ADDITIVE_SCHWARZ;
476 quda_inv_param.precondition_cycle = ip.preconditionCycle;
478 if( ip.verboseInner ) {
479 quda_inv_param.verbosity_precondition = QUDA_VERBOSE;
482 quda_inv_param.verbosity_precondition = QUDA_SILENT;
485 switch( ip.invTypePrecondition ) {
487 quda_inv_param.inv_type_precondition = QUDA_CG_INVERTER;
490 quda_inv_param.inv_type_precondition = QUDA_BICGSTAB_INVERTER;
493 quda_inv_param.inv_type_precondition= QUDA_CA_GCR_INVERTER;
496 quda_inv_param.inv_type_precondition= QUDA_MR_INVERTER;
500 quda_inv_param.inv_type_precondition = QUDA_MR_INVERTER;
505 QDPIO::cout <<
"Setting Precondition stuff to defaults for not using" << std::endl;
506 quda_inv_param.inv_type_precondition= QUDA_INVALID_INVERTER;
507 quda_inv_param.tol_precondition = 1.0e-1;
508 quda_inv_param.maxiter_precondition = 1000;
509 quda_inv_param.verbosity_precondition = QUDA_SILENT;
510 quda_inv_param.gcrNkrylov = 1;
514 if( invParam.verboseP ) {
515 quda_inv_param.verbosity = QUDA_VERBOSE;
518 quda_inv_param.verbosity = QUDA_SUMMARIZE;
524 #ifndef BUILD_QUDA_DEVIFACE_GAUGE
526 gauge[
mu] = (
void *)&(links_single[
mu].elem(all.start()).elem().elem(0,0).real());
529 GetMemoryPtrGauge(gauge,links_single);
535 loadGaugeQuda((
void *)gauge, &q_gauge_param);
538 QDPIO::cout <<
"Creating CloverTerm" << std::endl;
539 clov->create(fstate, invParam_.CloverParams);
541 invclov->create(fstate, invParam_.CloverParams);
543 QDPIO::cout <<
"Inverting CloverTerm" << std::endl;
547 #ifndef BUILD_QUDA_DEVIFACE_CLOVER
548 multi1d<QUDAPackedClovSite<REALT> > packed_clov;
550 packed_clov.resize(all.siteTable().size());
552 clov->packForQUDA(packed_clov, 0);
553 clov->packForQUDA(packed_clov, 1);
556 multi1d<QUDAPackedClovSite<REALT> > packed_invclov(all.siteTable().size());
557 invclov->packForQUDA(packed_invclov, 0);
558 invclov->packForQUDA(packed_invclov, 1);
560 loadCloverQuda(&(packed_clov[0]), &(packed_invclov[0]),&quda_inv_param);
565 GetMemoryPtrClover(clov->getOffId(),clov->getDiaId(),invclov->getOffId(),invclov->getDiaId());
568 loadCloverQuda( (
void*)(clover) , (
void*)(cloverInv) ,&quda_inv_param);
575 ~MdagMSysSolverQUDAClover()
577 QDPIO::cout <<
"Destructing" << std::endl;
583 const Subset& subset()
const {
return A->subset();}
593 SystemSolverResults_t res;
594 Null4DChronoPredictor not_predicting;
595 (*this)(
psi,
chi, not_predicting);
604 SystemSolverResults_t res;
605 SystemSolverResults_t res1;
606 SystemSolverResults_t res2;
610 QudaUseInitGuess old_guess_policy = quda_inv_param.use_init_guess;
611 quda_inv_param.use_init_guess = QUDA_USE_INIT_GUESS_YES;
618 Handle< LinearOperator<T> >
MdagM(
new MdagMLinOp<T>(
A) );
620 StopWatch Y_solve_timer; Y_solve_timer.reset();
621 StopWatch X_solve_timer; X_solve_timer.reset();
625 QDPIO::cout <<
"Two Step Solve using QUDA predictor: (X_index,Y_index) = ( " << predictor.
getXIndex() <<
" , " << predictor.
getYIndex() <<
" ) \n";
626 quda_inv_param.chrono_max_dim = predictor.
getMaxChrono();
627 quda_inv_param.chrono_index = predictor.
getYIndex();
628 quda_inv_param.chrono_make_resident =
true;
629 quda_inv_param.chrono_use_resident =
true;
630 quda_inv_param.chrono_replace_last =
false;
633 Y[
A->subset() ] =
psi;
637 Y_solve_timer.start();
639 quda_inv_param.solution_type = QUDA_MATPC_SOLUTION;
640 quda_inv_param.dagger = QUDA_DAG_YES;
641 res1 = qudaInvert(*clov,
645 Y_solve_timer.stop();
649 quda_inv_param.chrono_index = predictor.
getXIndex();
650 quda_inv_param.chrono_make_resident =
true;
651 quda_inv_param.chrono_use_resident =
true;
652 quda_inv_param.chrono_replace_last =
false;
658 X_solve_timer.start();
659 quda_inv_param.dagger = QUDA_DAG_NO;
660 res2 = qudaInvert(*clov,
664 X_solve_timer.stop();
666 double time = swatch.getTimeInSeconds();
676 r[
A->subset()] -=
tmp;
677 res.resid = sqrt(norm2(
r,
A->subset()));
680 Double rel_resid = res.resid/sqrt(norm2(
chi,
A->subset()));
681 res.n_count = res1.n_count + res2.n_count;
683 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: " << res.n_count <<
" iterations. Rsd = " << res.resid <<
" Relative Rsd = " << rel_resid << std::endl
686 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Time: "
687 <<
"Y_solve: " << Y_solve_timer.getTimeInSeconds() <<
" (s) "
688 <<
"X_solve: " << X_solve_timer.getTimeInSeconds() <<
" (s) "
689 <<
"Total time: " << time <<
"(s)" << std::endl;
691 quda_inv_param.use_init_guess = old_guess_policy;
692 quda_inv_param.chrono_make_resident =
false;
693 quda_inv_param.chrono_use_resident =
false;
694 quda_inv_param.chrono_replace_last =
false;
697 if ( toBool( rel_resid > invParam.RsdToleranceFactor*invParam.RsdTarget) ) {
698 QDPIO::cout <<
"QUDA_" << solver_string <<
"_CLOVER_SOLVER: SOLVE Failed to converge" << std::endl;
712 SystemSolverResults_t res;
713 SystemSolverResults_t res1;
714 SystemSolverResults_t res2;
718 QudaUseInitGuess old_guess_policy = quda_inv_param.use_init_guess;
719 quda_inv_param.use_init_guess = QUDA_USE_INIT_GUESS_YES;
728 Handle< LinearOperator<T> >
MdagM(
new MdagMLinOp<T>(
A) );
730 StopWatch X_prediction_timer; X_prediction_timer.reset();
731 StopWatch Y_prediction_timer; Y_prediction_timer.reset();
732 StopWatch Y_solve_timer; Y_solve_timer.reset();
733 StopWatch X_solve_timer; X_solve_timer.reset();
734 StopWatch Y_predictor_add_timer; Y_predictor_add_timer.reset();
735 StopWatch X_predictor_add_timer; X_predictor_add_timer.reset();
737 QDPIO::cout <<
"Two Step Solve" << std::endl;
740 Y[
A->subset() ] =
psi;
743 Y_prediction_timer.start();
745 Y_prediction_timer.stop();
747 Y_solve_timer.start();
749 quda_inv_param.solution_type = QUDA_MATPC_SOLUTION;
750 quda_inv_param.dagger = QUDA_DAG_YES;
751 res1 = qudaInvert(*clov,
755 Y_solve_timer.stop();
757 Y_predictor_add_timer.start();
759 Y_predictor_add_timer.stop();
764 X_prediction_timer.start();
766 X_prediction_timer.stop();
767 X_solve_timer.start();
768 quda_inv_param.dagger = QUDA_DAG_NO;
769 res2 = qudaInvert(*clov,
773 X_solve_timer.stop();
774 X_predictor_add_timer.start();
776 X_predictor_add_timer.stop();
778 res.n_count = res1.n_count + res2.n_count;
781 double time = swatch.getTimeInSeconds();
784 quda_inv_param.use_init_guess = old_guess_policy;
792 r[
A->subset()] -=
tmp;
793 res.resid = sqrt(norm2(
r,
A->subset()));
796 Double rel_resid = res.resid/sqrt(norm2(
chi,
A->subset()));
798 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: " << res.n_count <<
" iterations. Rsd = " << res.resid <<
" Relative Rsd = " << rel_resid << std::endl
804 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Time: Y_predict: " << Y_prediction_timer.getTimeInSeconds() <<
" (s) "
805 <<
"Y_solve: " << Y_solve_timer.getTimeInSeconds() <<
" (s) "
806 <<
"Y_register: " << Y_predictor_add_timer.getTimeInSeconds() <<
" (s) "
807 <<
"X_predict: " << X_prediction_timer.getTimeInSeconds() <<
" (s) "
808 <<
"X_solve: " << X_solve_timer.getTimeInSeconds() <<
" (s) "
809 <<
"X_register: " << X_predictor_add_timer.getTimeInSeconds() <<
" (s) "
810 <<
"Total time: " << time <<
"(s)" << std::endl;
812 if ( toBool( rel_resid > invParam.RsdToleranceFactor*invParam.RsdTarget) ) {
813 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Solver Failed to Converge! Aborting" << std::endl;
824 SystemSolverResults_t res;
832 switch( invParam.solverType ) {
860 QUDA4DChronoPredictor& quda_predictor =
861 dynamic_cast<QUDA4DChronoPredictor&
>(predictor);
863 res = (*this)(
psi,
chi,quda_predictor);
868 catch(std::bad_cast) {}
872 AbsTwoStepChronologicalPredictor4D<T>& abs_two_step_predictor =
873 dynamic_cast<AbsTwoStepChronologicalPredictor4D<T>&
>(predictor);
874 res = (*this)(
psi,
chi,abs_two_step_predictor);
878 catch(std::bad_cast) {
880 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Two Step Solver with two step incapable predictor" << std::endl;
887 StopWatch X_prediction_timer; X_prediction_timer.reset();
888 StopWatch X_solve_timer; X_solve_timer.reset();
889 StopWatch X_predictor_add_timer; X_predictor_add_timer.reset();
892 QudaUseInitGuess old_guess_policy = quda_inv_param.use_init_guess;
893 quda_inv_param.use_init_guess = QUDA_USE_INIT_GUESS_YES;
897 Handle< LinearOperator<T> >
MdagM(
new MdagMLinOp<T>(
A) );
903 QDPIO::cout <<
"Single Step Solve" << std::endl;
904 X_prediction_timer.start();
906 X_prediction_timer.stop();
908 X_solve_timer.start();
909 res = qudaInvert(*clov,
913 X_solve_timer.stop();
915 X_predictor_add_timer.start();
917 X_predictor_add_timer.stop();
920 quda_inv_param.use_init_guess = old_guess_policy;
928 r[
A->subset()] -=
tmp;
929 res.resid = sqrt(norm2(
r,
A->subset()));
932 double time=swatch.getTimeInSeconds();
933 Double rel_resid = res.resid/sqrt(norm2(
chi,
A->subset()));
935 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: " << res.n_count <<
" iterations. Rsd = " << res.resid <<
" Relative Rsd = " << rel_resid << std::endl
937 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Time: X_predict: " << X_prediction_timer.getTimeInSeconds() <<
" (s) "
938 <<
"X_solve: " << X_solve_timer.getTimeInSeconds() <<
" (s) "
939 <<
"X_register: " << X_predictor_add_timer.getTimeInSeconds() <<
" (s) "
940 <<
"Total time: " << time <<
"(s)" << std::endl;
942 if ( toBool( rel_resid > invParam.RsdToleranceFactor*invParam.RsdTarget) ) {
943 QDPIO::cout <<
"QUDA_"<< solver_string <<
"_CLOVER_SOLVER: Solver Failed to Converge! Aborting" << std::endl;
955 MdagMSysSolverQUDAClover() {}
960 QudaPrecision_s cpu_prec;
961 QudaPrecision_s gpu_prec;
962 QudaPrecision_s gpu_half_prec;
964 Handle< LinearOperator<T> >
A;
965 Handle< FermState<T,Q,Q> >
state;
966 const SysSolverQUDACloverParams invParam;
967 QudaGaugeParam q_gauge_param;
968 mutable QudaInvertParam quda_inv_param;
970 Handle< CloverTermT<T, U> > clov;
971 Handle< CloverTermT<T, U> > invclov;
973 SystemSolverResults_t qudaInvert(
const CloverTermT<T, U>& clover,
974 const CloverTermT<T, U>& inv_clov,
Abstract interface for a Chronological Solution predictor.
virtual void newVector(const T &psi)=0
Abstract interface for a Chronological Solution predictor.
virtual void predictY(T &Y, const T &chi, const Subset &s) const
virtual void newYVector(const T &Y)=0
virtual void predictX(T &X, const T &chi, const Subset &s) const
virtual void newXVector(const T &X)=0
Zero initial guess predictor.
Include possibly optimized Clover terms.
void temporalGauge(multi1d< LatticeColorMatrix > &ug, LatticeColorMatrix &g, int decay_dir)
Temporal gauge fixing.
Class for counted reference semantics.
M^dag*M composition of a linear operator.
bool registerAll()
Register all the factories.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
multi1d< LatticeFermion > chi(Ncb)
QDPCloverTermT< T, U > CloverTermT
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< Real > makeFermCoeffs(const AnisoParam_t &aniso)
Make fermion coefficients.
multi1d< LatticeFermion > s(Ncb)
FloatingPoint< double > Double
Null predictor: Leaves input x0 unchanged.
Periodic ferm state and a creator.
Pick channel for QUDA Predictor.
Reunitarize in place a color matrix to SU(N)
Support class for fermion actions and linear operators.
Handle< LinearOperator< T > > MdagM
multi1d< LatticeColorMatrix > U
multi1d< LatticeColorMatrix > Q
multi1d< LatticeColorMatrixF > QF
multi1d< LatticeColorMatrixD > QD