34 if (x_sloppy)
delete x_sloppy;
35 if (tmp_sloppy)
delete tmp_sloppy;
36 if (tmpp)
delete tmpp;
38 if (r_sloppy)
delete r_sloppy;
112 bool converged =
false;
124 scale = c2 > 0.0 ?
sqrt(c2) : 1.0;
136 while (k < param.maxiter && r2 > 0.0) {
149 printfQuda(
"MR: %d cycle, %d iterations, <r|A|r> = (%e, %e)\n", step, k+1, Ar3.x, Ar3.y);
184 printfQuda(
"MR: %d cycle, Converged after %d iterations, relative residual: true = %e\n",
199 printfQuda(
"MR: %d cycle, Converged after %d iterations, relative residual: iterated = %e\n",
static ColorSpinorField * Create(const ColorSpinorParam ¶m)
unsigned long long flops() const
MR(const DiracMatrix &mat, const DiracMatrix &matSloppy, SolverParam ¶m, TimeProfile &profile)
void operator()(ColorSpinorField &out, ColorSpinorField &in)
const DiracMatrix & matSloppy
double Last(QudaProfileType idx)
void commAsyncReductionSet(bool global_reduce)
void commGlobalReductionSet(bool global_reduce)
void mat(void *out, void **link, void *in, int dagger_bit, int mu, QudaPrecision sPrecision, QudaPrecision gPrecision)
cudaColorSpinorField * tmp
@ QUDA_USE_INIT_GUESS_YES
@ QUDA_PRESERVE_SOURCE_NO
@ QUDA_PRESERVE_SOURCE_YES
@ QUDA_MULTIPLICATIVE_SCHWARZ
#define checkPrecision(...)
void init()
Create the BLAS context.
double xmyNorm(ColorSpinorField &x, ColorSpinorField &y)
void caxpyXmaz(const Complex &a, ColorSpinorField &x, ColorSpinorField &y, ColorSpinorField &z)
void ax(double a, ColorSpinorField &x)
void caxpyXmazMR(const double &a, ColorSpinorField &x, ColorSpinorField &y, ColorSpinorField &z)
void zero(ColorSpinorField &a)
double norm2(const ColorSpinorField &a)
void axpy(double a, ColorSpinorField &x, ColorSpinorField &y)
double3 cDotProductNormA(ColorSpinorField &a, ColorSpinorField &b)
void copy(ColorSpinorField &dst, const ColorSpinorField &src)
void stop()
Stop profiling.
std::complex< double > Complex
__host__ __device__ ValueType sqrt(ValueType x)
QudaPreserveSource preserve_source
bool is_preconditioner
verbosity to use for preconditioner
QudaSchwarzType schwarz_type
QudaResidualType residual_type
QudaPrecision precision_sloppy
QudaUseInitGuess use_init_guess
bool global_reduction
whether the solver acting as a preconditioner for another solver
QudaVerbosity getVerbosity()