p?getrs
p?getrs
Solves a system of distributed linear equations with a general square matrix, using the
LU
factorization computed by p?getrf
.Syntax
void
psgetrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
float
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
float
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_INT
*info
);
void
pdgetrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
double
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
double
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_INT
*info
);
void
pcgetrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
MKL_Complex8
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
MKL_Complex8
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_INT
*info
);
void
pzgetrs
(
char
*trans
,
MKL_INT
*n
,
MKL_INT
*nrhs
,
MKL_Complex16
*a
,
MKL_INT
*ia
,
MKL_INT
*ja
,
MKL_INT
*desca
,
MKL_INT
*ipiv
,
MKL_Complex16
*b
,
MKL_INT
*ib
,
MKL_INT
*jb
,
MKL_INT
*descb
,
MKL_INT
*info
);
Include Files
- mkl_scalapack.h
Description
The
p?getrs
function
solves a system of distributed linear equations with a general n
-by-n
distributed matrix sub(A
) = A
(ia
:ia
+n
-1, ja
:ja
+n
-1) using the LU
factorization computed by p?getrf
. The system has one of the following forms specified by
trans
:sub(
A
)*X
= sub(B
) (no transpose), sub(*
A
)T
X
= sub(B
) (transpose), sub(*
A
)H
X
= sub(B
) (conjugate transpose),where sub(
B
) = B
(ib
:ib
+n
-1, jb
:jb
+nrhs
-1).Before calling this
function
,you must call p?getrf
to compute the LU
factorization of sub(A
).Input Parameters
- trans
- (global) Must be'N'or'T'or'C'.Indicates the form of the equations:If, then sub(trans='N'A)*X= sub(B) is solved forX.If, then sub(trans='T'A)*TX= sub(B) is solved forX.If, then sub(trans='C'A)*HX= sub(B) is solved forX.
- n
- (global) The number of linear equations; the order of the matrix sub(A) (n≥0).
- nrhs
- (global) The number of right hand sides; the number of columns of the distributed matrix sub(B) (nrhs≥0).
- a,b
- (local)Pointers into the local memory to arrays of local sizesandlld_a*LOCc(ja+n-1), respectively.lld_b*LOCc(jb+nrhs-1)On entry, the arrayacontains the local pieces of the factorsLandUfrom the factorization sub(A) =P*L*U; the unit diagonal elements ofLare not stored. On entry, the arraybcontains the right hand sides sub(B).
- ia,ja
- (global) The row and column indices in the global matrixAindicating the first row and the first column of the matrix sub(A), respectively.
- desca
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixA.
- ipiv
- (local) Array of size of. Contains the pivoting information: local rowLOCr(m_a) +mb_aiof the matrix was interchanged with the global rowipiv[.i-1]This array is tied to the distributed matrixA.
- ib,jb
- (global) The row and column indices in the global matrixBindicating the first row and the first column of the matrix sub(B), respectively.
- descb
- (global and local) array of sizedlen_. The array descriptor for the distributed matrixB.
Output Parameters
- b
- On exit, overwritten by the solution distributed matrixX.
- info
- If, the execution is successful.info=0:info< 0If thei-th argument is an array and thej-th entry, indexedhad an illegal value, thenj- 1,info= -(i*100+j); if thei-th argument is a scalar and had an illegal value, theninfo=-i.