27 const double b2 =
norm2(b);
30 printfQuda(
"Warning: inverting on zero-field source\n");
47 double r2 = xmyNormCuda(b,r);
74 r0r = cDotProductCuda(r0,r);
75 alpha = r0r/cDotProductCuda(r0,Ap);
78 Complex omega_num = cDotProductCuda(r,Ar)
79 - alpha*cDotProductCuda(r,A2p)
80 -
conj(alpha)*cDotProductCuda(Ap,Ar)
81 +
conj(alpha)*alpha*cDotProductCuda(Ap,A2p);
84 Complex omega_denom = cDotProductCuda(Ar,Ar)
85 - alpha*cDotProductCuda(Ar,A2p)
86 -
conj(alpha)*cDotProductCuda(A2p,Ar)
87 +
conj(alpha)*alpha*cDotProductCuda(A2p,A2p);
90 omega = omega_num/omega_denom;
97 caxpyCuda(-alpha*
omega,Ap,x);
102 caxpyCuda(-
omega,Ar,r_new);
103 caxpyCuda(-alpha,Ap,r_new);
104 caxpyCuda(alpha*
omega,A2p,r_new);
106 beta = (cDotProductCuda(r0,r_new)/r0r)*(alpha/
omega);
111 caxpyCuda(beta, p, p_new);
112 caxpyCuda(-beta*
omega, Ap, p_new);
void operator()(ColorSpinorField &out, ColorSpinorField &in)
virtual ~SimpleBiCGstab()
SimpleBiCGstab(const DiracMatrix &mat, SolverParam ¶m, TimeProfile &profile)
bool convergence(double r2, double hq2, double r2_tol, double hq_tol)
void PrintSummary(const char *name, int k, double r2, double b2, double r2_tol, double hq_tol)
Prints out the summary of the solver convergence (requires a verbosity of QUDA_SUMMARIZE)....
static double stopping(double tol, double b2, QudaResidualType residual_type)
Set the solver L2 stopping condition.
void PrintStats(const char *name, int k, double r2, double b2, double hq2)
Prints out the running statistics of the solver (requires a verbosity of QUDA_VERBOSE)
void mat(void *out, void **link, void *in, int dagger_bit, int mu, QudaPrecision sPrecision, QudaPrecision gPrecision)
void stop()
Stop profiling.
__host__ __device__ ValueType conj(ValueType x)
double norm2(const CloverField &a, bool inverse=false)
std::complex< double > Complex
__host__ __device__ ValueType sqrt(ValueType x)
QudaResidualType residual_type