SuperLU 6.0.1
Functions
sgst02.c File Reference
#include "slu_sdefs.h"
Include dependency graph for sgst02.c:

Functions

int sgst02 (trans_t trans, int m, int n, int nrhs, SuperMatrix *A, float *x, int ldx, float *b, int ldb, float *resid)
 

Detailed Description

SGST02 computes the residual for a solution of a system of linear equations A*x = b or A'*x = b.

Function Documentation

◆ sgst02()

int sgst02 ( trans_t  trans,
int  m,
int  n,
int  nrhs,
SuperMatrix A,
float *  x,
int  ldx,
float *  b,
int  ldb,
float *  resid 
)

SGST02 computes the residual for a solution of a system of linear equations A*x = b or A'*x = b: RESID = norm(B - A*X) / ( norm(A) * norm(X) * EPS ), where EPS is the machine epsilon.

Parameters
[in]transSpecifies the form of the system of equations: = NOTRANS: A *x = b = TRANS : A'*x = b, where A' is the transpose of A = CONJ : A'*x = b, where A' is the transpose of A
[in]mThe number of rows of the matrix A. M >= 0.
[in]nThe number of columns of the matrix A. N >= 0.
[in]nrhsThe number of columns of B, the matrix of right hand sides. NRHS >= 0.
[in]AThe original M x N sparse matrix A, dimension(LDA,N).
[in]xThe computed solution vectors for the system of linear equations, dimension(LDX,NRHS).
[in]ldxThe leading dimension of the array X. If TRANS = NOTRANS, LDX >= max(1,N); if TRANS = TRANS or CONJ, LDX >= max(1,M).
[in,out]bOn entry, the right hand side vectors for the system of linear equations. On exit, B is overwritten with the difference B - A*X. dimension(LDB,NRHS).
[in]ldbThe leading dimension of the array B. IF TRANS = NOTRANS, LDB >= max(1,M); if TRANS = TRANS or CONJ, LDB >= max(1,N).
[out]residThe maximum over the number of right hand sides of norm(B - A*X) / ( norm(A) * norm(X) * EPS ).
Here is the call graph for this function: